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

Commit c0309868 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Topics can now have an Importance."

parents 21217af6 5d25ee7a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ interface INotificationManager
    int getTopicVisibilityOverride(String pkg, int uid, in Notification.Topic topic);
    void setTopicPriority(String pkg, int uid, in Notification.Topic topic, int priority);
    int getTopicPriority(String pkg, int uid, in Notification.Topic topic);
    void setTopicImportance(String pkg, int uid, in Notification.Topic topic, int importance);
    int getTopicImportance(String pkg, int uid, in Notification.Topic topic);

    // TODO: Remove this when callers have been migrated to the equivalent
    // INotificationListener method.
+24 −2
Original line number Diff line number Diff line
@@ -823,9 +823,9 @@ public abstract class NotificationListenerService extends Service {
        public static final int VISIBILITY_NO_OVERRIDE = -1000;

        /**
         * Value signifying thatn the has not expressed an importance.
         * Value signifying that the user has not expressed an importance.
         *
         * This value is for persisting preferences, and should never ve associated with
         * This value is for persisting preferences, and should never be associated with
         * an actual notification.
         */
        public static final int IMPORTANCE_UNSPECIFIED = -1000;
@@ -952,6 +952,28 @@ public abstract class NotificationListenerService extends Service {
            mVisibilityOverride = visibilityOverride;
            mSuppressedVisualEffects = suppressedVisualEffects;
        }

        /**
         * {@hide}
         */
        public static String importanceToString(int importance) {
            switch (importance) {
                case IMPORTANCE_UNSPECIFIED:
                    return "UNSPECIFIED";
                case IMPORTANCE_NONE:
                    return "NONE";
                case IMPORTANCE_LOW:
                    return "LOW";
                case IMPORTANCE_DEFAULT:
                    return "DEFAULT";
                case IMPORTANCE_HIGH:
                    return "HIGH";
                case IMPORTANCE_MAX:
                    return "MAX";
                default:
                    return "UNKNOWN(" + String.valueOf(importance) + ")";
            }
        }
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -1960,6 +1960,7 @@
        <item>com.android.server.notification.TopicPriorityExtractor</item>
        <item>com.android.server.notification.NotificationIntrusivenessExtractor</item>
        <item>com.android.server.notification.TopicVisibilityExtractor</item>
        <item>com.android.server.notification.TopicImportanceExtractor</item>
    </string-array>

    <!-- Flag indicating that this device does not rotate and will always remain in its default
+16 −0
Original line number Diff line number Diff line
@@ -3954,6 +3954,22 @@
    <!-- [CHAR_LIMIT=NONE] Battery saver: Feature description -->
    <string name="battery_saver_description">To help improve battery life, battery saver reduces your device’s performance and limits vibration, location services, and most background data. Email, messaging, and other apps that rely on syncing may not update unless you open them.\n\nBattery saver turns off automatically when your device is charging.</string>


    <!-- [CHAR LIMIT=100] Notification Importance slider: blocked importance level description -->
    <string name="notification_importance_blocked">Blocked: Never show these notifications</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: low importance level description -->
    <string name="notification_importance_low">Low: Silently show at the bottom of the notification list</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: normal importance level description -->
    <string name="notification_importance_default">Normal: Silently show these notifications</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: high importance level description -->
    <string name="notification_importance_high">High: Show at the top of the notifications list and make sound</string>

    <!-- [CHAR LIMIT=100] Notification Importance slider: max importance level description -->
    <string name="notification_importance_max">Urgent: Peek onto the screen and make sound</string>

    <!-- Zen mode condition - summary: time duration in minutes. [CHAR LIMIT=NONE] -->
    <plurals name="zen_mode_duration_minutes_summary">
        <item quantity="one">For one minute (until <xliff:g id="formattedTime" example="10:00 PM">%2$s</xliff:g>)</item>
+5 −0
Original line number Diff line number Diff line
@@ -2086,6 +2086,11 @@
  <java-symbol type="array" name="config_system_condition_providers" />
  <java-symbol type="string" name="muted_by" />
  <java-symbol type="string" name="zen_mode_alarm" />
  <java-symbol type="string" name="notification_importance_blocked" />
  <java-symbol type="string" name="notification_importance_low" />
  <java-symbol type="string" name="notification_importance_default" />
  <java-symbol type="string" name="notification_importance_high" />
  <java-symbol type="string" name="notification_importance_max" />

  <java-symbol type="string" name="select_day" />
  <java-symbol type="string" name="select_year" />
Loading