Loading core/java/com/android/internal/view/RotationPolicy.java +2 −2 Original line number Diff line number Diff line Loading @@ -168,8 +168,8 @@ public final class RotationPolicy { } private static boolean isCurrentRotationAllowed(Context context) { int userRotationAngles = Settings.System.getInt(context.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION_ANGLES, -1); int userRotationAngles = Settings.System.getIntForUser(context.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION_ANGLES, -1, UserHandle.USER_CURRENT); boolean allowAllRotations = context.getResources().getBoolean( com.android.internal.R.bool.config_allowAllRotations); final IWindowManager wm = WindowManagerGlobal.getWindowManagerService(); Loading packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java +4 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.keyguard; import android.content.Context; import android.os.UserHandle; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -132,8 +133,9 @@ public class KeyguardPINView extends KeyguardPinBasedInputView { }); } mScramblePin = LineageSettings.System.getInt(getContext().getContentResolver(), LineageSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0) == 1; mScramblePin = LineageSettings.System.getIntForUser(getContext().getContentResolver(), LineageSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0, UserHandle.USER_CURRENT) == 1; if (mScramblePin) { Collections.shuffle(sNumbers); // get all children who are NumPadKey's Loading packages/SystemUI/src/com/android/keyguard/NumPadKey.java +5 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.content.res.TypedArray; import android.os.PowerManager; import android.os.SystemClock; import android.os.UserHandle; import android.util.AttributeSet; import android.view.HapticFeedbackConstants; import android.view.LayoutInflater; Loading Loading @@ -115,8 +116,10 @@ public class NumPadKey extends ViewGroup { } private void updateText() { boolean scramblePin = (LineageSettings.System.getInt(getContext().getContentResolver(), LineageSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0) == 1); boolean scramblePin = LineageSettings.System.getIntForUser( getContext().getContentResolver(), LineageSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0, UserHandle.USER_CURRENT) == 1; if (mDigit >= 0) { mDigitText.setText(Integer.toString(mDigit)); if (sKlondike == null) { Loading packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java +10 −9 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.widget.ImageView; import com.android.internal.BrightnessSynchronizer; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.settingslib.RestrictedLockUtils; import com.android.settingslib.RestrictedLockUtilsInternal; import com.android.systemui.Dependency; import com.android.systemui.broadcast.BroadcastDispatcher; Loading @@ -62,6 +63,7 @@ public class BrightnessController implements ToggleSlider.Listener { private static final int MSG_ATTACH_LISTENER = 3; private static final int MSG_DETACH_LISTENER = 4; private static final int MSG_VR_MODE_CHANGED = 5; private static final int MSG_BRIGHTNESS_RESTRICTION = 6; private static final Uri BRIGHTNESS_MODE_URI = Settings.System.getUriFor(Settings.System.SCREEN_BRIGHTNESS_MODE); Loading Loading @@ -292,6 +294,10 @@ public class BrightnessController implements ToggleSlider.Listener { case MSG_VR_MODE_CHANGED: updateVrMode(msg.arg1 != 0); break; case MSG_BRIGHTNESS_RESTRICTION: ((ToggleSliderView)mControl).setEnforcedAdmin( (RestrictedLockUtils.EnforcedAdmin) msg.obj); break; default: super.handleMessage(msg); } Loading Loading @@ -426,15 +432,10 @@ public class BrightnessController implements ToggleSlider.Listener { } public void checkRestrictionAndSetEnabled() { mBackgroundHandler.post(new Runnable() { @Override public void run() { ((ToggleSliderView)mControl).setEnforcedAdmin( mHandler.obtainMessage(MSG_BRIGHTNESS_RESTRICTION, RestrictedLockUtilsInternal.checkIfRestrictionEnforced(mContext, UserManager.DISALLOW_CONFIG_BRIGHTNESS, mUserTracker.getCurrentUserId())); } }); mUserTracker.getCurrentUserId())).sendToTarget(); } private void setMode(int mode) { Loading services/core/java/com/android/server/wm/DisplayRotation.java +2 −2 Original line number Diff line number Diff line Loading @@ -1410,8 +1410,8 @@ public class DisplayRotation { shouldUpdateRotation = true; } final int userRotationAngles = Settings.System.getInt(resolver, Settings.System.ACCELEROMETER_ROTATION_ANGLES, -1); final int userRotationAngles = Settings.System.getIntForUser(resolver, Settings.System.ACCELEROMETER_ROTATION_ANGLES, -1, UserHandle.USER_CURRENT); if (mUserRotationAngles != userRotationAngles) { mUserRotationAngles = userRotationAngles; shouldUpdateRotation = true; Loading Loading
core/java/com/android/internal/view/RotationPolicy.java +2 −2 Original line number Diff line number Diff line Loading @@ -168,8 +168,8 @@ public final class RotationPolicy { } private static boolean isCurrentRotationAllowed(Context context) { int userRotationAngles = Settings.System.getInt(context.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION_ANGLES, -1); int userRotationAngles = Settings.System.getIntForUser(context.getContentResolver(), Settings.System.ACCELEROMETER_ROTATION_ANGLES, -1, UserHandle.USER_CURRENT); boolean allowAllRotations = context.getResources().getBoolean( com.android.internal.R.bool.config_allowAllRotations); final IWindowManager wm = WindowManagerGlobal.getWindowManagerService(); Loading
packages/SystemUI/src/com/android/keyguard/KeyguardPINView.java +4 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.keyguard; import android.content.Context; import android.os.UserHandle; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -132,8 +133,9 @@ public class KeyguardPINView extends KeyguardPinBasedInputView { }); } mScramblePin = LineageSettings.System.getInt(getContext().getContentResolver(), LineageSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0) == 1; mScramblePin = LineageSettings.System.getIntForUser(getContext().getContentResolver(), LineageSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0, UserHandle.USER_CURRENT) == 1; if (mScramblePin) { Collections.shuffle(sNumbers); // get all children who are NumPadKey's Loading
packages/SystemUI/src/com/android/keyguard/NumPadKey.java +5 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.Context; import android.content.res.TypedArray; import android.os.PowerManager; import android.os.SystemClock; import android.os.UserHandle; import android.util.AttributeSet; import android.view.HapticFeedbackConstants; import android.view.LayoutInflater; Loading Loading @@ -115,8 +116,10 @@ public class NumPadKey extends ViewGroup { } private void updateText() { boolean scramblePin = (LineageSettings.System.getInt(getContext().getContentResolver(), LineageSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0) == 1); boolean scramblePin = LineageSettings.System.getIntForUser( getContext().getContentResolver(), LineageSettings.System.LOCKSCREEN_PIN_SCRAMBLE_LAYOUT, 0, UserHandle.USER_CURRENT) == 1; if (mDigit >= 0) { mDigitText.setText(Integer.toString(mDigit)); if (sKlondike == null) { Loading
packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java +10 −9 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import android.widget.ImageView; import com.android.internal.BrightnessSynchronizer; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.settingslib.RestrictedLockUtils; import com.android.settingslib.RestrictedLockUtilsInternal; import com.android.systemui.Dependency; import com.android.systemui.broadcast.BroadcastDispatcher; Loading @@ -62,6 +63,7 @@ public class BrightnessController implements ToggleSlider.Listener { private static final int MSG_ATTACH_LISTENER = 3; private static final int MSG_DETACH_LISTENER = 4; private static final int MSG_VR_MODE_CHANGED = 5; private static final int MSG_BRIGHTNESS_RESTRICTION = 6; private static final Uri BRIGHTNESS_MODE_URI = Settings.System.getUriFor(Settings.System.SCREEN_BRIGHTNESS_MODE); Loading Loading @@ -292,6 +294,10 @@ public class BrightnessController implements ToggleSlider.Listener { case MSG_VR_MODE_CHANGED: updateVrMode(msg.arg1 != 0); break; case MSG_BRIGHTNESS_RESTRICTION: ((ToggleSliderView)mControl).setEnforcedAdmin( (RestrictedLockUtils.EnforcedAdmin) msg.obj); break; default: super.handleMessage(msg); } Loading Loading @@ -426,15 +432,10 @@ public class BrightnessController implements ToggleSlider.Listener { } public void checkRestrictionAndSetEnabled() { mBackgroundHandler.post(new Runnable() { @Override public void run() { ((ToggleSliderView)mControl).setEnforcedAdmin( mHandler.obtainMessage(MSG_BRIGHTNESS_RESTRICTION, RestrictedLockUtilsInternal.checkIfRestrictionEnforced(mContext, UserManager.DISALLOW_CONFIG_BRIGHTNESS, mUserTracker.getCurrentUserId())); } }); mUserTracker.getCurrentUserId())).sendToTarget(); } private void setMode(int mode) { Loading
services/core/java/com/android/server/wm/DisplayRotation.java +2 −2 Original line number Diff line number Diff line Loading @@ -1410,8 +1410,8 @@ public class DisplayRotation { shouldUpdateRotation = true; } final int userRotationAngles = Settings.System.getInt(resolver, Settings.System.ACCELEROMETER_ROTATION_ANGLES, -1); final int userRotationAngles = Settings.System.getIntForUser(resolver, Settings.System.ACCELEROMETER_ROTATION_ANGLES, -1, UserHandle.USER_CURRENT); if (mUserRotationAngles != userRotationAngles) { mUserRotationAngles = userRotationAngles; shouldUpdateRotation = true; Loading