Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Interpret @extra annotated params as extras with @receiver{Action}
  • Loading branch information
WonderCsabo committed Mar 4, 2016
commit 92051dd90368fcd102bdab45816e0a8852a79dbe
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ private void addActionInOnReceive(EReceiverHolder holder, ExecutableElement exec

if (extraParamClass.equals(getClasses().CONTEXT)) {
callActionInvocation.arg(holder.getOnReceiveContext());
} else if (extraParamClass.equals(getClasses().INTENT)) {
} else if (extraParamClass.equals(getClasses().INTENT) && param.getAnnotation(ReceiverAction.Extra.class) == null) {
callActionInvocation.arg(intent);
} else if (param.getAnnotation(ReceiverAction.Extra.class) != null) {
if (extras == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private JFieldVar createReceiverField(HasReceiverRegistration holder, String rec

if (extraParamClass.equals(getClasses().CONTEXT)) {
methodCall.arg(contextVar);
} else if (extraParamClass.equals(getClasses().INTENT)) {
} else if (extraParamClass.equals(getClasses().INTENT) && param.getAnnotation(Receiver.Extra.class) == null) {
methodCall.arg(intentVar);
} else if (param.getAnnotation(Receiver.Extra.class) != null) {
if (extras == null) {
Expand Down