Loading packages/SettingsLib/src/com/android/settingslib/Utils.java +3 −4 Original line number Diff line number Diff line Loading @@ -35,8 +35,8 @@ public class Utils { private static final String CURRENT_MODE_KEY = "CURRENT_MODE"; private static final String NEW_MODE_KEY = "NEW_MODE"; @VisibleForTesting static final String STORAGE_MANAGER_SHOW_OPT_IN_PROPERTY = "ro.storage_manager.show_opt_in"; static final String STORAGE_MANAGER_ENABLED_PROPERTY = "ro.storage_manager.enabled"; private static Signature[] sSystemSignature; private static String sPermissionControllerPackageName; Loading Loading @@ -353,8 +353,7 @@ public class Utils { public static boolean isStorageManagerEnabled(Context context) { boolean isDefaultOn; try { // Turn off by default if the opt-in was shown. isDefaultOn = !SystemProperties.getBoolean(STORAGE_MANAGER_SHOW_OPT_IN_PROPERTY, true); isDefaultOn = SystemProperties.getBoolean(STORAGE_MANAGER_ENABLED_PROPERTY, false); } catch (Resources.NotFoundException e) { isDefaultOn = false; } Loading packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.settingslib; import static android.Manifest.permission.WRITE_SECURE_SETTINGS; import static com.android.settingslib.Utils.STORAGE_MANAGER_SHOW_OPT_IN_PROPERTY; import static com.android.settingslib.Utils.STORAGE_MANAGER_ENABLED_PROPERTY; import static com.google.common.truth.Truth.assertThat; import static org.mockito.ArgumentMatchers.argThat; Loading Loading @@ -160,7 +160,7 @@ public class UtilsTest { @Test public void testIsStorageManagerEnabled_UsesSystemProperties() { SystemProperties.set(STORAGE_MANAGER_SHOW_OPT_IN_PROPERTY, "false"); SystemProperties.set(STORAGE_MANAGER_ENABLED_PROPERTY, "true"); assertThat(Utils.isStorageManagerEnabled(mContext)).isTrue(); } Loading Loading
packages/SettingsLib/src/com/android/settingslib/Utils.java +3 −4 Original line number Diff line number Diff line Loading @@ -35,8 +35,8 @@ public class Utils { private static final String CURRENT_MODE_KEY = "CURRENT_MODE"; private static final String NEW_MODE_KEY = "NEW_MODE"; @VisibleForTesting static final String STORAGE_MANAGER_SHOW_OPT_IN_PROPERTY = "ro.storage_manager.show_opt_in"; static final String STORAGE_MANAGER_ENABLED_PROPERTY = "ro.storage_manager.enabled"; private static Signature[] sSystemSignature; private static String sPermissionControllerPackageName; Loading Loading @@ -353,8 +353,7 @@ public class Utils { public static boolean isStorageManagerEnabled(Context context) { boolean isDefaultOn; try { // Turn off by default if the opt-in was shown. isDefaultOn = !SystemProperties.getBoolean(STORAGE_MANAGER_SHOW_OPT_IN_PROPERTY, true); isDefaultOn = SystemProperties.getBoolean(STORAGE_MANAGER_ENABLED_PROPERTY, false); } catch (Resources.NotFoundException e) { isDefaultOn = false; } Loading
packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.settingslib; import static android.Manifest.permission.WRITE_SECURE_SETTINGS; import static com.android.settingslib.Utils.STORAGE_MANAGER_SHOW_OPT_IN_PROPERTY; import static com.android.settingslib.Utils.STORAGE_MANAGER_ENABLED_PROPERTY; import static com.google.common.truth.Truth.assertThat; import static org.mockito.ArgumentMatchers.argThat; Loading Loading @@ -160,7 +160,7 @@ public class UtilsTest { @Test public void testIsStorageManagerEnabled_UsesSystemProperties() { SystemProperties.set(STORAGE_MANAGER_SHOW_OPT_IN_PROPERTY, "false"); SystemProperties.set(STORAGE_MANAGER_ENABLED_PROPERTY, "true"); assertThat(Utils.isStorageManagerEnabled(mContext)).isTrue(); } Loading