Skip to content

Commit

Permalink
Mixing uri and string path will cause some parameters to be overwritten
Browse files Browse the repository at this point in the history
  • Loading branch information
zhi1ong committed May 9, 2017
1 parent 14a5add commit a2ba815
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.ActivityOptionsCompat;
Expand Down Expand Up @@ -64,10 +65,16 @@ public void onClick(View v) {
.navigation();
break;
case R.id.normalNavigationWithParams:
ARouter.getInstance()
.build("/test/activity2")
// ARouter.getInstance()
// .build("/test/activity2")
// .withString("key1", "value1")
// .navigation();

Uri testUriMix = Uri.parse("arouter://m.aliyun.com/test/activity2");
ARouter.getInstance().build(testUriMix)
.withString("key1", "value1")
.navigation();

break;
case R.id.oldVersionAnim:
ARouter.getInstance()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ public synchronized static void completion(Postcard postcard) {
* @param value value
*/
private static void setValue(Postcard postcard, Integer typeDef, String key, String value) {
if (TextUtils.isEmpty(key) || TextUtils.isEmpty(value)) {
return;
}

try {
if (null != typeDef) {
if (typeDef == TypeKind.BOOLEAN.ordinal()) {
Expand Down

0 comments on commit a2ba815

Please sign in to comment.