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

Commit 81ad972f authored by Robin Lee's avatar Robin Lee
Browse files

Feature flag for stopping restricted profiles

Defaults to true by default. Some devices may override this to force the
restricted profile to stop when not in use to save all the memory it
consumes where that is an issue.

There is no framework / first-party code setting it, but since this
is checked every time a user switches into the profile rolling it out
should be relatively straightfoward.

Bug: 71626497
Test: make droid
Change-Id: I7a718c4fdd2d80131df083908129b715d94e824e
parent 650fa857
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -10519,6 +10519,18 @@ public final class Settings {
         */
        public static final String NETWORK_WATCHLIST_ENABLED = "network_watchlist_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.
         * Type: int (0 for false, 1 for true)
         *
         * Overridden by the system based on device information. If null, the value specified
         * by {@code config_keepRestrictedProfilesInBackground} is used.
         *
         * @hide
         */
        public static final String KEEP_PROFILE_IN_BACKGROUND = "keep_profile_in_background";

        /**
         * Get the key that retrieves a bluetooth headset's priority.
         * @hide
+2 −0
Original line number Diff line number Diff line
@@ -3269,4 +3269,6 @@
    <string name="config_defaultAssistantAccessPackage" translatable="false">android.ext.services</string>

    <bool name="config_supportBluetoothPersistedState">true</bool>

    <bool name="config_keepRestrictedProfilesInBackground">true</bool>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -3241,4 +3241,6 @@
  <java-symbol type="string" name="slices_permission_request" />

  <java-symbol type="string" name="screenshot_edit" />

  <java-symbol type="bool" name="config_keepRestrictedProfilesInBackground" />
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ public class SettingsBackupTest {
                    Settings.Global.INTENT_FIREWALL_UPDATE_CONTENT_URL,
                    Settings.Global.INTENT_FIREWALL_UPDATE_METADATA_URL,
                    Settings.Global.JOB_SCHEDULER_CONSTANTS,
                    Settings.Global.KEEP_PROFILE_IN_BACKGROUND,
                    Settings.Global.LANG_ID_UPDATE_CONTENT_URL,
                    Settings.Global.LANG_ID_UPDATE_METADATA_URL,
                    Settings.Global.LOCATION_BACKGROUND_THROTTLE_INTERVAL_MS,