From 9a15d478e9578dcb486e7a912d7b58d0601e2ff0 Mon Sep 17 00:00:00 2001 From: Beth Thibodeau Date: Tue, 29 Jun 2021 22:33:28 -0400 Subject: [PATCH] Rename media control flag Some users had a bad default value from a previous build. This renames the flag so that they will still get the correct default when upgrading. Fixes: 191786947 Test: manual, atest Change-Id: I8fa3077bf7c8a4414ebc259174214538684f6560 --- core/java/android/provider/Settings.java | 2 +- .../NotificationSectionsFeatureManagerTest.kt | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index cb87653718c2a..a6332d76ca65f 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -11005,7 +11005,7 @@ public final class Settings { */ @Readable public static final String SHOW_MEDIA_ON_QUICK_SETTINGS = - "qs_media_player"; + "qs_media_controls"; /** * The interval in milliseconds at which location requests will be throttled when they are diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManagerTest.kt index 3a948f18ad821..540d2918319fa 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManagerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationSectionsFeatureManagerTest.kt @@ -44,15 +44,16 @@ class NotificationSectionsFeatureManagerTest : SysuiTestCase() { public fun setup() { manager = NotificationSectionsFeatureManager(proxyFake, mContext) manager!!.clearCache() - originalQsMediaPlayer = Settings.System.getInt(context.getContentResolver(), - "qs_media_player", 1) - Settings.Global.putInt(context.getContentResolver(), "qs_media_player", 0) + originalQsMediaPlayer = Settings.Global.getInt(context.getContentResolver(), + Settings.Global.SHOW_MEDIA_ON_QUICK_SETTINGS, 1) + Settings.Global.putInt(context.getContentResolver(), + Settings.Global.SHOW_MEDIA_ON_QUICK_SETTINGS, 0) } @After public fun teardown() { - Settings.Global.putInt(context.getContentResolver(), "qs_media_player", - originalQsMediaPlayer) + Settings.Global.putInt(context.getContentResolver(), + Settings.Global.SHOW_MEDIA_ON_QUICK_SETTINGS, originalQsMediaPlayer) } @Test