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

Commit 999dd1d3 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

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

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