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

Commit 8b4f4ac0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "SystemUI: Make rotation lock toggle always visible"

parents b561fb18 62833329
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -90,10 +90,12 @@ public final class RotationPolicy {
     * Returns true if the rotation-lock toggle should be shown in system UI.
     */
    public static boolean isRotationLockToggleVisible(Context context) {
        return isRotationSupported(context) &&
        boolean forceSupportRotationLock = context.getResources().getBoolean(
                com.android.internal.R.bool.config_forceSupportRotationLockToggle);
        return isRotationSupported(context) && (forceSupportRotationLock ||
                Settings.System.getIntForUser(context.getContentResolver(),
                        Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 0,
                        UserHandle.USER_CURRENT) == 0;
                        UserHandle.USER_CURRENT) == 0);
    }

    /**
+3 −0
Original line number Diff line number Diff line
@@ -471,6 +471,9 @@
         docked if the dock is configured to enable the accelerometer. -->
    <bool name="config_supportAutoRotation">true</bool>

    <!-- Configuration to support rotation lock toggle -->
    <bool name="config_forceSupportRotationLockToggle">false</bool>

    <!-- If true, the screen can be rotated via the accelerometer in all 4
         rotations as the default behavior. -->
    <bool name="config_allowAllRotations">false</bool>
+1 −0
Original line number Diff line number Diff line
@@ -1466,6 +1466,7 @@
  <java-symbol type="bool" name="config_reverseDefaultRotation" />
  <java-symbol type="bool" name="config_showNavigationBar" />
  <java-symbol type="bool" name="config_supportAutoRotation" />
  <java-symbol type="bool" name="config_forceSupportRotationLockToggle" />
  <java-symbol type="bool" name="target_honeycomb_needs_options_menu" />
  <java-symbol type="dimen" name="navigation_bar_height" />
  <java-symbol type="dimen" name="navigation_bar_height_landscape" />