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

Commit 13b0abe1 authored by Ricky Wai's avatar Ricky Wai Committed by Michal Karpinski
Browse files

Add feature flag for "show hidden launcher icon apps"

and "install app notification"

Bug: 111214100
Test: CTS test will be submitted with flag enabling commit
Change-Id: I604d75dc48e09039619f571d418a700106cbdd5d
parent a9e4db58
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -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.
+3 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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;
}
+2 −0
Original line number Diff line number Diff line
@@ -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,
+3 −2
Original line number Diff line number Diff line
@@ -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;

/**
@@ -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;
        }

+6 −0
Original line number Diff line number Diff line
@@ -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,
@@ -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