Merge "Background activity starts are now blocked by default." into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-23 09:43:27 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 3 deletions

View File

@@ -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);
}
}

View File

@@ -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);