Merge "Add mBouncer null checks for view-related requests." into rvc-dev am: 66bf0f533c am: adce052f32 am: 668670a0d9

Change-Id: I029f004171d2002b63e42cf3ba41af2251b344b0
This commit is contained in:
TreeHugger Robot
2020-04-29 18:49:37 +00:00
committed by Automerger Merge Worker

View File

@@ -151,7 +151,9 @@ public class CarKeyguardViewController extends OverlayViewController implements
@Override @Override
public void notifyKeyguardAuthenticated(boolean strongAuth) { public void notifyKeyguardAuthenticated(boolean strongAuth) {
mBouncer.notifyKeyguardAuthenticated(strongAuth); if (mBouncer != null) {
mBouncer.notifyKeyguardAuthenticated(strongAuth);
}
} }
@Override @Override
@@ -204,11 +206,15 @@ public class CarKeyguardViewController extends OverlayViewController implements
@Override @Override
public void onFinishedGoingToSleep() { public void onFinishedGoingToSleep() {
mBouncer.onScreenTurnedOff(); if (mBouncer != null) {
mBouncer.onScreenTurnedOff();
}
} }
@Override @Override
public void onCancelClicked() { public void onCancelClicked() {
if (!mShowing) return;
getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ false); getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ false);
getOverlayViewGlobalStateController().setWindowNeedsInput(/* needsInput= */ false); getOverlayViewGlobalStateController().setWindowNeedsInput(/* needsInput= */ false);
@@ -228,6 +234,8 @@ public class CarKeyguardViewController extends OverlayViewController implements
@Override @Override
public void startPreHideAnimation(Runnable finishRunnable) { public void startPreHideAnimation(Runnable finishRunnable) {
if (!mShowing) return;
mBouncer.startPreHideAnimation(finishRunnable); mBouncer.startPreHideAnimation(finishRunnable);
} }
@@ -260,12 +268,12 @@ public class CarKeyguardViewController extends OverlayViewController implements
@Override @Override
public boolean isBouncerShowing() { public boolean isBouncerShowing() {
return mBouncer.isShowing(); return mBouncer != null && mBouncer.isShowing();
} }
@Override @Override
public boolean bouncerIsOrWillBeShowing() { public boolean bouncerIsOrWillBeShowing() {
return mBouncer.isShowing() || mBouncer.inTransit(); return mBouncer != null && (mBouncer.isShowing() || mBouncer.inTransit());
} }
@Override @Override