diff options
| author | 2022-10-17 10:11:35 +0000 | |
|---|---|---|
| committer | 2022-10-17 10:11:35 +0000 | |
| commit | ed74a53d23d2964723378debbff35ec1a2867b42 (patch) | |
| tree | 0454b308dce01ba335bb1797bbac28ea6f270d43 | |
| parent | acfd93fe409e7b37379c076576bdc039c6ee754b (diff) | |
| parent | 27be95df6039d047b909d592f68158437063a665 (diff) | |
Merge "Cleanup code that should never be null" into tm-qpr-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index 3df7273f17ed..34935db72467 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -91,7 +91,6 @@ import android.util.EventLog; import android.util.IndentingPrintWriter; import android.util.Log; import android.util.MathUtils; -import android.util.Slog; import android.view.Display; import android.view.IRemoteAnimationRunner; import android.view.IWindowManager; @@ -3812,8 +3811,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { if (mDevicePolicyManager.getCameraDisabled(null, mLockscreenUserManager.getCurrentUserId())) { return false; - } else if (mStatusBarKeyguardViewManager == null - || (isKeyguardShowing() && isKeyguardSecure())) { + } else if (isKeyguardShowing() && isKeyguardSecure()) { // Check if the admin has disabled the camera specifically for the keyguard return (mDevicePolicyManager.getKeyguardDisabledFeatures(null, mLockscreenUserManager.getCurrentUserId()) @@ -4221,14 +4219,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { @Override public boolean isKeyguardSecure() { - if (mStatusBarKeyguardViewManager == null) { - // startKeyguard() hasn't been called yet, so we don't know. - // Make sure anything that needs to know isKeyguardSecure() checks and re-checks this - // value onVisibilityChanged(). - Slog.w(TAG, "isKeyguardSecure() called before startKeyguard(), returning false", - new Throwable()); - return false; - } return mStatusBarKeyguardViewManager.isSecure(); } @Override @@ -4288,11 +4278,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { .Callback() { @Override public void onFinished() { - if (mStatusBarKeyguardViewManager == null) { - Log.w(TAG, "Tried to notify keyguard visibility when " - + "mStatusBarKeyguardViewManager was null"); - return; - } if (mKeyguardStateController.isKeyguardFadingAway()) { mStatusBarKeyguardViewManager.onKeyguardFadedAway(); } |