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

Commit 870a7ce5 authored by Justin Weir's avatar Justin Weir Committed by Android (Google) Code Review
Browse files

Merge "Null check some nullables" into main

parents 3bfac476 a47d0bb3
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 ->