From a643342375e5042fd275b58f47452193fc9d4592 Mon Sep 17 00:00:00 2001 From: Abel Tesfaye Date: Thu, 4 Mar 2021 21:59:47 +0000 Subject: [PATCH] Fix long press auto rotate implementation bug Test: locally with flame Bug: 181741815 Change-Id: Ie0a69ab7f8320ac688ee4182113d8396d541bf4c --- core/api/current.txt | 1 + core/java/android/provider/Settings.java | 7 +++++++ .../com/android/systemui/qs/tiles/RotationLockTile.java | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/api/current.txt b/core/api/current.txt index a9303a7fa1a86..9b32cf945e2a5 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -34673,6 +34673,7 @@ package android.provider { field public static final String ACTION_APP_NOTIFICATION_SETTINGS = "android.settings.APP_NOTIFICATION_SETTINGS"; field public static final String ACTION_APP_SEARCH_SETTINGS = "android.settings.APP_SEARCH_SETTINGS"; field public static final String ACTION_APP_USAGE_SETTINGS = "android.settings.action.APP_USAGE_SETTINGS"; + field public static final String ACTION_AUTO_ROTATE_SETTINGS = "android.settings.AUTO_ROTATE_SETTINGS"; field public static final String ACTION_BATTERY_SAVER_SETTINGS = "android.settings.BATTERY_SAVER_SETTINGS"; field public static final String ACTION_BIOMETRIC_ENROLL = "android.settings.BIOMETRIC_ENROLL"; field public static final String ACTION_BLUETOOTH_SETTINGS = "android.settings.BLUETOOTH_SETTINGS"; diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 85cef84d8d30c..4dfbb6fa2d053 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -824,6 +824,13 @@ public final class Settings { public static final String ACTION_DISPLAY_SETTINGS = "android.settings.DISPLAY_SETTINGS"; + /** + * Activity Action: Show Auto Rotate configuration settings. + */ + @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION) + public static final String ACTION_AUTO_ROTATE_SETTINGS = + "android.settings.AUTO_ROTATE_SETTINGS"; + /** * Activity Action: Show settings to allow configuration of Night display. *

diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java index 4bf27e2aa4b88..c46cc4f9aa0a5 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java @@ -71,7 +71,7 @@ public class RotationLockTile extends QSTileImpl { @Override public Intent getLongClickIntent() { - return new Intent(Settings.ACTION_DISPLAY_SETTINGS); + return new Intent(Settings.ACTION_AUTO_ROTATE_SETTINGS); } @Override