Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a47d0bb3 authored by Justin Weir's avatar Justin Weir
Browse files

Null check some nullables

Fixes: 315779193
Test: Presubmits
Flag: N/A
Change-Id: I2ede8b005c8687e9539d57007bdde15964de2a1f
parent 59d4fd4a
Loading
Loading
Loading
Loading
+13 −4
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewRootImpl;
import android.view.WindowInsetsController;
import android.window.BackEvent;
import android.window.OnBackAnimationCallback;
import android.window.OnBackInvokedDispatcher;
@@ -859,10 +860,19 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
        }
    }

    private void setRootViewAnimationDisabled(boolean disabled) {
        ViewGroup windowRootView = mNotificationShadeWindowController.getWindowRootView();
        if (windowRootView != null) {
            WindowInsetsController insetsController = windowRootView.getWindowInsetsController();
            if (insetsController != null) {
                insetsController.setAnimationsDisabled(disabled);
            }
        }
    }

    @Override
    public void onStartedWakingUp() {
        mNotificationShadeWindowController.getWindowRootView().getWindowInsetsController()
                .setAnimationsDisabled(false);
        setRootViewAnimationDisabled(false);
        NavigationBarView navBarView = mCentralSurfaces.getNavigationBarView();
        if (navBarView != null) {
            navBarView.forEachView(view ->
@@ -875,8 +885,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb

    @Override
    public void onStartedGoingToSleep() {
        mNotificationShadeWindowController.getWindowRootView().getWindowInsetsController()
                .setAnimationsDisabled(true);
        setRootViewAnimationDisabled(true);
        NavigationBarView navBarView = mCentralSurfaces.getNavigationBarView();
        if (navBarView != null) {
            navBarView.forEachView(view ->