summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-02-27 01:56:48 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-02-27 01:56:48 +0000
commitee47af62071c43d434c6cf06b3974ee89b7ce748 (patch)
treeac71bfa8de215a8ea4b53ca997e5c743fef00ca4
parent0a71d6063d3ef3770fa6dc6439f510e669f11e1c (diff)
parent679609721c4a7422ac3612dde69c9e2639ea6883 (diff)
Merge "Turn on QS media player by default" into rvc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/util/Utils.java3
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapperTest.java4
2 files changed, 6 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/util/Utils.java b/packages/SystemUI/src/com/android/systemui/util/Utils.java
index cfa2947eb862..5f821187e30c 100644
--- a/packages/SystemUI/src/com/android/systemui/util/Utils.java
+++ b/packages/SystemUI/src/com/android/systemui/util/Utils.java
@@ -126,9 +126,10 @@ public class Utils {
/**
* Allow the media player to be shown in the QS area, controlled by 2 flags.
+ * On by default, but can be disabled by setting to 0
*/
public static boolean useQsMediaPlayer(Context context) {
- int flag = Settings.System.getInt(context.getContentResolver(), "qs_media_player", 0);
+ int flag = Settings.System.getInt(context.getContentResolver(), "qs_media_player", 1);
return flag > 0;
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapperTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapperTest.java
index 69e4f2205c35..18ea774e56f0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapperTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapperTest.java
@@ -25,6 +25,7 @@ import android.app.Notification;
import android.media.MediaMetadata;
import android.media.session.MediaSession;
import android.media.session.PlaybackState;
+import android.provider.Settings;
import android.testing.AndroidTestingRunner;
import android.testing.TestableLooper.RunWithLooper;
import android.view.View;
@@ -66,6 +67,9 @@ public class NotificationMediaTemplateViewWrapperTest extends SysuiTestCase {
allowTestableLooperAsMainThread();
mDependency.injectTestDependency(MetricsLogger.class, mMetricsLogger);
+
+ // These tests are for regular media style notifications, not controls in quick settings
+ Settings.System.putInt(mContext.getContentResolver(), "qs_media_player", 0);
}
private void makeTestNotification(long duration, boolean allowSeeking) throws Exception {