Loading core/java/android/provider/Settings.java +18 −0 Original line number Diff line number Diff line Loading @@ -11498,6 +11498,24 @@ public final class Settings { */ public static final String NETWORK_WATCHLIST_ENABLED = "network_watchlist_enabled"; /** * Whether or not show hidden launcher icon apps feature is enabled. * Type: int (0 for false, 1 for true) * Default: 0 * @hide */ public static final String SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED = "show_hidden_icon_apps_enabled"; /** * Whether or not show new app installed notification is enabled. * Type: int (0 for false, 1 for true) * Default: 0 * @hide */ public static final String SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED = "show_new_app_installed_notification_enabled"; /** * Flag to keep background restricted profiles running after exiting. If disabled, * the restricted profile can be put into stopped state as soon as the user leaves it. Loading core/proto/android/providers/settings/global.proto +3 −1 Original line number Diff line number Diff line Loading @@ -725,8 +725,10 @@ message GlobalSettingsProto { optional SettingProto set_install_location = 103 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto shortcut_manager_constants = 104; optional SettingProto show_first_crash_dialog = 105 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto show_hidden_launcher_icon_apps_enabled = 141 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto show_restart_in_crash_dialog = 106 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto show_mute_in_crash_dialog = 107 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto show_new_app_installed_notification_enabled = 142 [ (android.privacy).dest = DEST_AUTOMATIC ]; message SmartSelection { option (android.msg_privacy).dest = DEST_EXPLICIT; Loading Loading @@ -966,5 +968,5 @@ message GlobalSettingsProto { // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). // Next tag = 141; // Next tag = 143; } core/tests/coretests/src/android/provider/SettingsBackupTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -393,7 +393,9 @@ public class SettingsBackupTest { Settings.Global.SETTINGS_USE_PSD_API, Settings.Global.SHORTCUT_MANAGER_CONSTANTS, Settings.Global.SHOW_FIRST_CRASH_DIALOG, Settings.Global.SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED, Settings.Global.SHOW_MUTE_IN_CRASH_DIALOG, Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED, Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG, Settings.Global.SHOW_TEMPERATURE_WARNING, Loading packages/PackageInstaller/src/com/android/packageinstaller/PackageInstalledReceiver.java +3 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.provider.Settings; import android.util.Log; /** Loading @@ -29,11 +30,11 @@ public class PackageInstalledReceiver extends BroadcastReceiver { private static final String TAG = PackageInstalledReceiver.class.getSimpleName(); private static final boolean DEBUG = false; private static final boolean APP_INSTALLED_NOTIFICATION_ENABLED = false; @Override public void onReceive(Context context, Intent intent) { if (!APP_INSTALLED_NOTIFICATION_ENABLED) { if (Settings.Global.getInt(context.getContentResolver(), Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED, 0) == 0) { return; } Loading packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +6 −0 Original line number Diff line number Diff line Loading @@ -1120,6 +1120,9 @@ class SettingsProtoDumpUtil { dumpSetting(s, p, Settings.Global.SHOW_FIRST_CRASH_DIALOG, GlobalSettingsProto.SHOW_FIRST_CRASH_DIALOG); dumpSetting(s, p, Settings.Global.SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED, GlobalSettingsProto.SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED); // Settings.Global.SHOW_PROCESSES intentionally excluded since it's deprecated. dumpSetting(s, p, Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG, Loading @@ -1127,6 +1130,9 @@ class SettingsProtoDumpUtil { dumpSetting(s, p, Settings.Global.SHOW_MUTE_IN_CRASH_DIALOG, GlobalSettingsProto.SHOW_MUTE_IN_CRASH_DIALOG); dumpSetting(s, p, Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED, GlobalSettingsProto.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED); final long smartSelectToken = p.start(GlobalSettingsProto.SMART_SELECTION); dumpSetting(s, p, Loading Loading
core/java/android/provider/Settings.java +18 −0 Original line number Diff line number Diff line Loading @@ -11498,6 +11498,24 @@ public final class Settings { */ public static final String NETWORK_WATCHLIST_ENABLED = "network_watchlist_enabled"; /** * Whether or not show hidden launcher icon apps feature is enabled. * Type: int (0 for false, 1 for true) * Default: 0 * @hide */ public static final String SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED = "show_hidden_icon_apps_enabled"; /** * Whether or not show new app installed notification is enabled. * Type: int (0 for false, 1 for true) * Default: 0 * @hide */ public static final String SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED = "show_new_app_installed_notification_enabled"; /** * Flag to keep background restricted profiles running after exiting. If disabled, * the restricted profile can be put into stopped state as soon as the user leaves it. Loading
core/proto/android/providers/settings/global.proto +3 −1 Original line number Diff line number Diff line Loading @@ -725,8 +725,10 @@ message GlobalSettingsProto { optional SettingProto set_install_location = 103 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto shortcut_manager_constants = 104; optional SettingProto show_first_crash_dialog = 105 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto show_hidden_launcher_icon_apps_enabled = 141 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto show_restart_in_crash_dialog = 106 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto show_mute_in_crash_dialog = 107 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto show_new_app_installed_notification_enabled = 142 [ (android.privacy).dest = DEST_AUTOMATIC ]; message SmartSelection { option (android.msg_privacy).dest = DEST_EXPLICIT; Loading Loading @@ -966,5 +968,5 @@ message GlobalSettingsProto { // Please insert fields in alphabetical order and group them into messages // if possible (to avoid reaching the method limit). // Next tag = 141; // Next tag = 143; }
core/tests/coretests/src/android/provider/SettingsBackupTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -393,7 +393,9 @@ public class SettingsBackupTest { Settings.Global.SETTINGS_USE_PSD_API, Settings.Global.SHORTCUT_MANAGER_CONSTANTS, Settings.Global.SHOW_FIRST_CRASH_DIALOG, Settings.Global.SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED, Settings.Global.SHOW_MUTE_IN_CRASH_DIALOG, Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED, Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG, Settings.Global.SHOW_TEMPERATURE_WARNING, Loading
packages/PackageInstaller/src/com/android/packageinstaller/PackageInstalledReceiver.java +3 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.provider.Settings; import android.util.Log; /** Loading @@ -29,11 +30,11 @@ public class PackageInstalledReceiver extends BroadcastReceiver { private static final String TAG = PackageInstalledReceiver.class.getSimpleName(); private static final boolean DEBUG = false; private static final boolean APP_INSTALLED_NOTIFICATION_ENABLED = false; @Override public void onReceive(Context context, Intent intent) { if (!APP_INSTALLED_NOTIFICATION_ENABLED) { if (Settings.Global.getInt(context.getContentResolver(), Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED, 0) == 0) { return; } Loading
packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +6 −0 Original line number Diff line number Diff line Loading @@ -1120,6 +1120,9 @@ class SettingsProtoDumpUtil { dumpSetting(s, p, Settings.Global.SHOW_FIRST_CRASH_DIALOG, GlobalSettingsProto.SHOW_FIRST_CRASH_DIALOG); dumpSetting(s, p, Settings.Global.SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED, GlobalSettingsProto.SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED); // Settings.Global.SHOW_PROCESSES intentionally excluded since it's deprecated. dumpSetting(s, p, Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG, Loading @@ -1127,6 +1130,9 @@ class SettingsProtoDumpUtil { dumpSetting(s, p, Settings.Global.SHOW_MUTE_IN_CRASH_DIALOG, GlobalSettingsProto.SHOW_MUTE_IN_CRASH_DIALOG); dumpSetting(s, p, Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED, GlobalSettingsProto.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED); final long smartSelectToken = p.start(GlobalSettingsProto.SMART_SELECTION); dumpSetting(s, p, Loading