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

Commit b4ddb4a4 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5285806 from a3a280e4 to pi-qpr3-release

Change-Id: Id60a5a6a2ed73055a8591f60a97579eacaf670e6
parents e2ff1b26 a3a280e4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
 * <p>For more information about using a ContentResolver with content providers, read the
 * <a href="{@docRoot}guide/topics/providers/content-providers.html">Content Providers</a>
 * developer guide.</p>
 * </div>
 */
public abstract class ContentResolver {
    /**
+3 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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;
        }
+2 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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();
    }