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

Commit 303c31f4 authored by Alan Stokes's avatar Alan Stokes
Browse files

Background activity starts are now blocked by default.

Change the default for "Allow background activity starts" to off,
matching the logic in the activity manager.

Bug: 129955487
Bug: 129533810
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=AllowBackgroundActivityStartsPreferenceControllerTest

Change-Id: If9eeae699f9c8b7913da4456a45286f816cc7463
parent ef0f8a4d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -82,10 +82,10 @@ public class AllowBackgroundActivityStartsPreferenceController

    private boolean isDefaultEnabled() {
        // The default in the absence of user preference is settable via DeviceConfig.
        // Note that the default default is enabled.
        // Note that the default default is disabled.
        return DeviceConfig.getBoolean(
                DeviceConfig.NAMESPACE_ACTIVITY_MANAGER,
                KEY_DEFAULT_BACKGROUND_ACTIVITY_STARTS_ENABLED,
                /*defaultValue*/ true);
                /*defaultValue*/ false);
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ public class AllowBackgroundActivityStartsPreferenceControllerTest {
    public void onDeveloperOptionsSwitchDisabled_noDefault_shouldResetPreference() {
        mController.onDeveloperOptionsSwitchDisabled();

        verify(mPreference).setChecked(true);
        verify(mPreference).setChecked(false);
        verify(mPreference).setEnabled(false);

        assertThat(getModeFroMSettings()).isEqualTo(-1);