Protect the Settings application from potential null pointer exceptions.

Summary: The app bar is not available, causing a null pointer exception.

Test: Successful Build on master branch

Change-Id: I36849606f6587d6e7f004ae21e1a6e6a5206735a
Signed-off-by: Abdelrahman Daim <adaim@meta.com>
This commit is contained in:
Abdelrahman Daim
2024-09-25 02:54:13 -07:00
parent feee29caf8
commit 996afd17a1

View File

@@ -1034,6 +1034,9 @@ public class ManageApplications extends InstrumentedFragment
}
private void autoSetCollapsingToolbarLayoutScrolling() {
if (mAppBarLayout == null) {
return;
}
final CoordinatorLayout.LayoutParams params =
(CoordinatorLayout.LayoutParams) mAppBarLayout.getLayoutParams();
final AppBarLayout.Behavior behavior = new AppBarLayout.Behavior();