OSDN Git Service

Defaults for NIM for Q
authorJulia Reynolds <juliacr@google.com>
Fri, 3 May 2019 19:01:24 +0000 (15:01 -0400)
committerJulia Reynolds <juliacr@google.com>
Fri, 3 May 2019 20:24:21 +0000 (16:24 -0400)
- Show status icons for gentle notifications
- NAS is enabled for priorizing, contextual actions, and quick replies

Note: existing preferences will be reset to test onboarding

Test: atest
Fixes: 131913566
Change-Id: I3db20e27b0502897afa449945c4dc45418aab86e

services/core/java/com/android/server/notification/NotificationManagerService.java
services/core/java/com/android/server/notification/PreferencesHelper.java

index cdcb641..907502e 100644 (file)
@@ -7380,8 +7380,7 @@ public class NotificationManagerService extends SystemService {
         static final String TAG_ENABLED_NOTIFICATION_ASSISTANTS = "enabled_assistants";
 
         private static final String ATT_USER_SET = "user_set";
-        // TODO: STOPSHIP (b/127994217) switch to final value when onboarding flow is implemented
-        private static final String TAG_ALLOWED_ADJUSTMENT_TYPES = "allowed_adjustments_tmp2";
+        private static final String TAG_ALLOWED_ADJUSTMENT_TYPES = "allowed_adjustments";
         private static final String ATT_TYPES = "types";
 
         private final Object mLock = new Object();
@@ -7394,7 +7393,6 @@ public class NotificationManagerService extends SystemService {
                 IPackageManager pm) {
             super(context, lock, up, pm);
 
-            // TODO: STOPSHIP (b/127994217) remove when the onboarding flow is implemented
             // Add all default allowed adjustment types. Will be overwritten by values in xml,
             // if they exist
             for (int i = 0; i < DEFAULT_ALLOWED_ADJUSTMENTS.length; i++) {
@@ -7463,9 +7461,9 @@ public class NotificationManagerService extends SystemService {
         protected void readExtraTag(String tag, XmlPullParser parser) throws IOException {
             if (TAG_ALLOWED_ADJUSTMENT_TYPES.equals(tag)) {
                 final String types = XmlUtils.readStringAttribute(parser, ATT_TYPES);
-                if (!TextUtils.isEmpty(types)) {
-                    synchronized (mLock) {
-                        mAllowedAdjustments.clear();
+                synchronized (mLock) {
+                    mAllowedAdjustments.clear();
+                    if (!TextUtils.isEmpty(types)) {
                         mAllowedAdjustments.addAll(Arrays.asList(types.split(",")));
                     }
                 }
index 627b65c..3f1a248 100644 (file)
@@ -92,13 +92,13 @@ public class PreferencesHelper implements RankingConfig {
     private static final String ATT_APP_USER_LOCKED_FIELDS = "app_user_locked_fields";
     private static final String ATT_ENABLED = "enabled";
     private static final String ATT_USER_ALLOWED = "allowed";
-    private static final String ATT_HIDE_SILENT = "hide_silent";
+    private static final String ATT_HIDE_SILENT = "hide_gentle";
 
     private static final int DEFAULT_PRIORITY = Notification.PRIORITY_DEFAULT;
     private static final int DEFAULT_VISIBILITY = NotificationManager.VISIBILITY_NO_OVERRIDE;
     private static final int DEFAULT_IMPORTANCE = NotificationManager.IMPORTANCE_UNSPECIFIED;
     @VisibleForTesting
-    static final boolean DEFAULT_HIDE_SILENT_STATUS_BAR_ICONS = true;
+    static final boolean DEFAULT_HIDE_SILENT_STATUS_BAR_ICONS = false;
     private static final boolean DEFAULT_SHOW_BADGE = true;
     private static final boolean DEFAULT_ALLOW_BUBBLE = true;
     private static final boolean DEFAULT_OEM_LOCKED_IMPORTANCE  = false;