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

Commit 0e54e579 authored by Danny Baumann's avatar Danny Baumann Committed by Gerrit Code Review
Browse files

Merge "Remove the navigation camera icon in keyguard if disabled by DPM" into cm-11.0

parents 905841fb 6eef309a
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -489,10 +489,9 @@ public class NavigationBarView extends LinearLayout {
            try {
                final int userId = ActivityManagerNative.getDefault().getCurrentUser().id;
                final int disabledFlags = dpm.getKeyguardDisabledFeatures(null, userId);
                final  boolean disabledBecauseKeyguardSecure =
                        (disabledFlags & DevicePolicyManager.KEYGUARD_DISABLE_SECURE_CAMERA) != 0
                        && KeyguardTouchDelegate.getInstance(getContext()).isSecure();
                return dpm.getCameraDisabled(null) || disabledBecauseKeyguardSecure;
                final boolean disabledInKeyguard =
                        (disabledFlags & DevicePolicyManager.KEYGUARD_DISABLE_SECURE_CAMERA) != 0;
                return dpm.getCameraDisabled(null) || disabledInKeyguard;
            } catch (RemoteException e) {
                Log.e(TAG, "Can't get userId", e);
            }