Skip to content

Commit

Permalink
fix: findPage getTitle() 增加非空判断 (#164)
Browse files Browse the repository at this point in the history
* fix title default not blank

Co-authored-by: shenliming <348515494@qq.com>
  • Loading branch information
YoloMao and cpacm authored Jul 13, 2022
1 parent 14224e2 commit d81e5e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public static void viewOnClick(View view) {

// 为了防止click事件重复发送
if (ClassUtil.isDuplicateClick(view)) {
view.hasOnClickListeners();
Logger.e(TAG, "Duplicate Click");
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,16 @@ public Page<?> findPage(View view) {
return ALL_PAGE_TREE.get(activity);
} else {
//一般不会进入,如果出现则新生成page返回
//如穿山甲广告:会自己生成一个ActivityWrapper做代理并自己控制生命周期导致sdk的page无法命中,具体类为:PluginFragmentActivityWrapper
ActivityPage newPage = new ActivityPage(activity);
newPage.setTitle(activity.getTitle().toString());
if (!TextUtils.isEmpty(activity.getTitle())) {
newPage.setTitle(activity.getTitle().toString());
} else {
newPage.setTitle("WrapperActivity");
}
return newPage;
}
}

// TODO: 2020/6/10 这种情况需要观察
throw new NullPointerException("Page is NULL");
return null;
}
}

0 comments on commit d81e5e8

Please sign in to comment.