check entrance
This commit is contained in:
@ -86,6 +86,7 @@ import rx.functions.Action1;
|
||||
import rx.schedulers.Schedulers;
|
||||
|
||||
import static com.gh.common.util.EntranceUtils.KEY_DATA;
|
||||
import static com.gh.common.util.EntranceUtils.KEY_TO;
|
||||
|
||||
/**
|
||||
* 项目的主Activity,3个Fragment都嵌入在这里。
|
||||
@ -105,9 +106,9 @@ public class MainActivity extends BaseActivity {
|
||||
public void run() {
|
||||
if (getIntent() != null && getIntent().getExtras() != null && !isSkipped) {
|
||||
isSkipped = true;
|
||||
Bundle bundle = getIntent().getBundleExtra("data");
|
||||
Bundle bundle = getIntent().getBundleExtra(KEY_DATA);
|
||||
if (bundle != null) {
|
||||
String to = bundle.getString("to");
|
||||
String to = bundle.getString(KEY_TO);
|
||||
if (!TextUtils.isEmpty(to)) {
|
||||
Class<?> clazz = ClassUtils.forName(to);
|
||||
if (clazz != null) {
|
||||
@ -122,7 +123,7 @@ public class MainActivity extends BaseActivity {
|
||||
bundle.putInt("currentItem", 1);
|
||||
}
|
||||
|
||||
skipIntent.putExtra("data", bundle);
|
||||
skipIntent.putExtra(KEY_DATA, bundle);
|
||||
startActivity(skipIntent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user