Skip to content

Commit

Permalink
automatic injection support string defaults value.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhi1ong committed Apr 17, 2019
1 parent 93b3285 commit 1a06912
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private String buildStatement(String originalValue, String statement, int type,
statement += (isActivity ? ("getDoubleExtra($S, " + originalValue + ")") : ("getDouble($S)"));
break;
case STRING:
statement += (isActivity ? ("getStringExtra($S)") : ("getString($S)"));
statement += (isActivity ? ("getExtras() == null ? " + originalValue + " : substitute.getIntent().getExtras().getString($S, " + originalValue + ")") : ("getString($S)"));
break;
case SERIALIZABLE:
statement += (isActivity ? ("getSerializableExtra($S)") : ("getSerializable($S)"));
Expand Down

0 comments on commit 1a06912

Please sign in to comment.