summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/Notification.java28
-rw-r--r--core/java/android/provider/Settings.java43
-rw-r--r--packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java3
3 files changed, 3 insertions, 71 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 60506b53d2a3..f4e214c540ac 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -12423,10 +12423,6 @@ public class Notification implements Parcelable
*/
public static final int DECORATION_FULL_CONSTRAINED = 4;
- private static final boolean DEFAULT_BACKPORT_S_NOTIF_RULES = false;
- private static final int DEFAULT_FULLY_CUSTOM_DECORATION = DECORATION_MINIMAL;
- private static final int DEFAULT_DECORATED_DECORATION = DECORATION_PARTIAL;
-
/**
* Used by unit tests to force that this class returns its default values, which is required
* in cases where the ContentResolver instance is a mock.
@@ -12439,11 +12435,7 @@ public class Notification implements Parcelable
* @hide
*/
public static boolean shouldBackportSNotifRules(@NonNull ContentResolver contentResolver) {
- if (sForceDefaults) {
- return DEFAULT_BACKPORT_S_NOTIF_RULES;
- }
- return Settings.Global.getInt(contentResolver, Settings.Global.BACKPORT_S_NOTIF_RULES,
- DEFAULT_BACKPORT_S_NOTIF_RULES ? 1 : 0) == 1;
+ return false;
}
/**
@@ -12452,14 +12444,7 @@ public class Notification implements Parcelable
*/
public static int getFullyCustomViewNotifDecoration(
@NonNull ContentResolver contentResolver) {
- if (sForceDefaults) {
- return DEFAULT_FULLY_CUSTOM_DECORATION;
- }
- final int decoration = Settings.Global.getInt(contentResolver,
- Settings.Global.FULLY_CUSTOM_VIEW_NOTIF_DECORATION,
- DEFAULT_FULLY_CUSTOM_DECORATION);
- // clamp to a valid decoration value
- return Math.max(DECORATION_NONE, Math.min(decoration, DECORATION_FULL_CONSTRAINED));
+ return DECORATION_MINIMAL;
}
/**
@@ -12468,14 +12453,7 @@ public class Notification implements Parcelable
*/
public static int getDecoratedCustomViewNotifDecoration(
@NonNull ContentResolver contentResolver) {
- if (sForceDefaults) {
- return DEFAULT_DECORATED_DECORATION;
- }
- final int decoration = Settings.Global.getInt(contentResolver,
- Settings.Global.DECORATED_CUSTOM_VIEW_NOTIF_DECORATION,
- DEFAULT_DECORATED_DECORATION);
- // clamp to a valid decoration value (and don't allow decoration to be NONE or MINIMAL)
- return Math.max(DECORATION_PARTIAL, Math.min(decoration, DECORATION_FULL_CONSTRAINED));
+ return DECORATION_PARTIAL;
}
}
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 52517b07f861..71ffa92a81bb 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -15795,49 +15795,6 @@ public final class Settings {
public static final String SHOW_NEW_NOTIF_DISMISS = "show_new_notif_dismiss";
/**
- * Whether to enforce the new notification rules (aka rules that are only applied to
- * notifications from apps targeting S) on all notifications.
- * - Collapsed custom view notifications will get the new 76dp height instead of 106dp.
- * - Custom view notifications will be partially decorated.
- * - Large icons will be given an aspect ratio of up to 16:9.
- *
- * Values are:
- * 0: Disabled (Only apps targeting S will receive the new rules)
- * 1: Enabled (All apps will receive the new rules)
- * @hide
- */
- @Readable
- public static final String BACKPORT_S_NOTIF_RULES = "backport_s_notif_rules";
-
- /**
- * The decoration to put on fully custom views that target S.
- *
- * <p>Values are:
- * <br>0: DECORATION_NONE: no decorations.
- * <br>1: DECORATION_MINIMAL: most minimal template; just the icon and the expander.
- * <br>2: DECORATION_PARTIAL: basic template without the top line.
- * <br>3: DECORATION_FULL_COMPATIBLE: basic template with the top line; 40dp of height.
- * <br>4: DECORATION_FULL_CONSTRAINED: basic template with the top line; 28dp of height.
- * <p>See {@link android.app.Notification.DevFlags} for more details.
- * @hide
- */
- public static final String FULLY_CUSTOM_VIEW_NOTIF_DECORATION =
- "fully_custom_view_notif_decoration";
-
- /**
- * The decoration to put on decorated custom views that target S.
- *
- * <p>Values are:
- * <br>2: DECORATION_PARTIAL: basic template without the top line.
- * <br>3: DECORATION_FULL_COMPATIBLE: basic template with the top line; 40dp of height.
- * <br>4: DECORATION_FULL_CONSTRAINED: basic template with the top line; 28dp of height.
- * <p>See {@link android.app.Notification.DevFlags} for more details.
- * @hide
- */
- public static final String DECORATED_CUSTOM_VIEW_NOTIF_DECORATION =
- "decorated_custom_view_notif_decoration";
-
- /**
* Block untrusted touches mode.
*
* Can be one of:
diff --git a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
index c520568a78e5..068efac5ce71 100644
--- a/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
+++ b/packages/SettingsProvider/test/src/android/provider/SettingsBackupTest.java
@@ -139,7 +139,6 @@ public class SettingsBackupTest {
Settings.Global.AUTOFILL_MAX_VISIBLE_DATASETS,
Settings.Global.AUTOMATIC_POWER_SAVE_MODE,
Settings.Global.AVERAGE_TIME_TO_DISCHARGE,
- Settings.Global.BACKPORT_S_NOTIF_RULES,
Settings.Global.BATTERY_CHARGING_STATE_UPDATE_DELAY,
Settings.Global.BATTERY_ESTIMATES_LAST_UPDATE_TIME,
Settings.Global.BROADCAST_BG_CONSTANTS,
@@ -217,7 +216,6 @@ public class SettingsBackupTest {
Settings.Global.DEBUG_APP,
Settings.Global.DEBUG_VIEW_ATTRIBUTES,
Settings.Global.DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE,
- Settings.Global.DECORATED_CUSTOM_VIEW_NOTIF_DECORATION,
Settings.Global.DEFAULT_DNS_SERVER,
Settings.Global.DEFAULT_INSTALL_LOCATION,
Settings.Global.DEFAULT_RESTRICT_BACKGROUND_DATA,
@@ -289,7 +287,6 @@ public class SettingsBackupTest {
Settings.Global.WIFI_ON_WHEN_PROXY_DISCONNECTED,
Settings.Global.FSTRIM_MANDATORY_INTERVAL,
Settings.Global.FOREGROUND_SERVICE_STARTS_LOGGING_ENABLED,
- Settings.Global.FULLY_CUSTOM_VIEW_NOTIF_DECORATION,
Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST,
Settings.Global.GLOBAL_HTTP_PROXY_HOST,
Settings.Global.GLOBAL_HTTP_PROXY_PAC,