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

Commit 802a962d authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Merge remote-tracking branch 'origin/lineage-18.1' into v1-r

parents d539f91f e68894cd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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();
+4 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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
+5 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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) {
+10 −9
Original line number Diff line number Diff line
@@ -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;
@@ -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);
@@ -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);
                }
@@ -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) {
+2 −2
Original line number Diff line number Diff line
@@ -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;