Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25692c48 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Defaults for NIM for Q

- 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
parent 3fd1b494
Loading
Loading
Loading
Loading
+4 −6
Original line number Original line Diff line number Diff line
@@ -7380,8 +7380,7 @@ public class NotificationManagerService extends SystemService {
        static final String TAG_ENABLED_NOTIFICATION_ASSISTANTS = "enabled_assistants";
        static final String TAG_ENABLED_NOTIFICATION_ASSISTANTS = "enabled_assistants";


        private static final String ATT_USER_SET = "user_set";
        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";
        private static final String TAG_ALLOWED_ADJUSTMENT_TYPES = "allowed_adjustments_tmp2";
        private static final String ATT_TYPES = "types";
        private static final String ATT_TYPES = "types";


        private final Object mLock = new Object();
        private final Object mLock = new Object();
@@ -7394,7 +7393,6 @@ public class NotificationManagerService extends SystemService {
                IPackageManager pm) {
                IPackageManager pm) {
            super(context, lock, up, 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,
            // Add all default allowed adjustment types. Will be overwritten by values in xml,
            // if they exist
            // if they exist
            for (int i = 0; i < DEFAULT_ALLOWED_ADJUSTMENTS.length; i++) {
            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 {
        protected void readExtraTag(String tag, XmlPullParser parser) throws IOException {
            if (TAG_ALLOWED_ADJUSTMENT_TYPES.equals(tag)) {
            if (TAG_ALLOWED_ADJUSTMENT_TYPES.equals(tag)) {
                final String types = XmlUtils.readStringAttribute(parser, ATT_TYPES);
                final String types = XmlUtils.readStringAttribute(parser, ATT_TYPES);
                if (!TextUtils.isEmpty(types)) {
                synchronized (mLock) {
                synchronized (mLock) {
                    mAllowedAdjustments.clear();
                    mAllowedAdjustments.clear();
                    if (!TextUtils.isEmpty(types)) {
                        mAllowedAdjustments.addAll(Arrays.asList(types.split(",")));
                        mAllowedAdjustments.addAll(Arrays.asList(types.split(",")));
                    }
                    }
                }
                }
+2 −2
Original line number Original line Diff line number Diff line
@@ -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_APP_USER_LOCKED_FIELDS = "app_user_locked_fields";
    private static final String ATT_ENABLED = "enabled";
    private static final String ATT_ENABLED = "enabled";
    private static final String ATT_USER_ALLOWED = "allowed";
    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_PRIORITY = Notification.PRIORITY_DEFAULT;
    private static final int DEFAULT_VISIBILITY = NotificationManager.VISIBILITY_NO_OVERRIDE;
    private static final int DEFAULT_VISIBILITY = NotificationManager.VISIBILITY_NO_OVERRIDE;
    private static final int DEFAULT_IMPORTANCE = NotificationManager.IMPORTANCE_UNSPECIFIED;
    private static final int DEFAULT_IMPORTANCE = NotificationManager.IMPORTANCE_UNSPECIFIED;
    @VisibleForTesting
    @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_SHOW_BADGE = true;
    private static final boolean DEFAULT_ALLOW_BUBBLE = true;
    private static final boolean DEFAULT_ALLOW_BUBBLE = true;
    private static final boolean DEFAULT_OEM_LOCKED_IMPORTANCE  = false;
    private static final boolean DEFAULT_OEM_LOCKED_IMPORTANCE  = false;