diff options
Diffstat (limited to 'core')
| -rw-r--r-- | core/java/com/android/internal/view/RotationPolicy.java | 4 | ||||
| -rwxr-xr-x | core/res/res/values/strings.xml | 3 | ||||
| -rw-r--r-- | core/res/res/values/symbols.xml | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/core/java/com/android/internal/view/RotationPolicy.java b/core/java/com/android/internal/view/RotationPolicy.java index 95130c8..a86c323 100644 --- a/core/java/com/android/internal/view/RotationPolicy.java +++ b/core/java/com/android/internal/view/RotationPolicy.java @@ -58,7 +58,9 @@ public final class RotationPolicy { return isRotationLockToggleSupported(context) && Settings.System.getIntForUser(context.getContentResolver(), Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, 0, - UserHandle.USER_CURRENT) == 0; + UserHandle.USER_CURRENT) == 0 && + !context.getResources().getBoolean(com.android + .internal.R.bool.config_hasRotationLockSwitch); } /** diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index b571519..d590f67 100755 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -4055,4 +4055,7 @@ <!-- label for item that opens the profile choosing dialog --> <string name="global_action_choose_profile">Profile</string> + <!-- Hardware Rotation lock string --> + <string name="toast_rotation_unlocked">Display rotation unlocked</string> + <string name="toast_rotation_locked">Display rotation locked</string> </resources> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index c1131f7..2e63708 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -1883,4 +1883,8 @@ <!-- Lock screen always show battery --> <java-symbol type="string" name="lockscreen_discharging" /> + <!-- HW rotation lock --> + <java-symbol type="string" name="toast_rotation_unlocked" /> + <java-symbol type="string" name="toast_rotation_locked" /> + </resources> |
