Fix NPE crash in PermissionController

Fix: 192101825
Test: manual test
Change-Id: I18dec61f41bedb121863f78898e105b1e3f82bf9
This commit is contained in:
Mill Chen
2021-06-26 05:57:33 +08:00
parent c652532c05
commit 5165374be0

View File

@@ -59,7 +59,9 @@ public abstract class CollapsingToolbarBaseFragment extends Fragment implements
false);
mCollapsingToolbarLayout = view.findViewById(R.id.collapsing_toolbar);
mAppBarLayout = view.findViewById(R.id.app_bar);
mAppBarLayout.addOnOffsetChangedListener(this);
if (mAppBarLayout != null) {
mAppBarLayout.addOnOffsetChangedListener(this);
}
if (savedInstanceState != null) {
mIsToolbarCollapsed = savedInstanceState.getBoolean(KEY_IS_TOOLBAR_COLLAPSED);
}