Merge "Cleanup code that should never be null" into tm-qpr-dev am: ed74a53d23 am: 4bd659a7eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20195507 Change-Id: Ifce7e4cf0a375dc266c2f17141ba2d8615a531b6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -90,7 +90,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;
|
||||
@@ -3793,8 +3792,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())
|
||||
@@ -4202,14 +4200,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
|
||||
@@ -4269,11 +4259,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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user