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

Commit 91b34610 authored by shafik's avatar shafik
Browse files

Make DeviceConfig's storage nam space _native_boot

Replace all uses of DeviceConfig#NAMESPACE_STORAGE with
DeviceConfig#NAMESPACE_STORAGE_NATIVE_BOOT.
Keep DeviceConfig#NAMESPACE_STORAGE (to keep api checks happy) and mark
it as @Deprecated.

Test: build and flash - device successfully boots
Bug: 140803239
Change-Id: I9b1f0d1fd1996fe12cad67374d9a321c272e1da5
parent 12431859
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5890,7 +5890,8 @@ package android.provider {
    field public static final String NAMESPACE_RUNTIME_NATIVE = "runtime_native";
    field public static final String NAMESPACE_RUNTIME_NATIVE_BOOT = "runtime_native_boot";
    field public static final String NAMESPACE_SCHEDULER = "scheduler";
    field public static final String NAMESPACE_STORAGE = "storage";
    field @Deprecated public static final String NAMESPACE_STORAGE = "storage";
    field public static final String NAMESPACE_STORAGE_NATIVE_BOOT = "storage_native_boot";
    field public static final String NAMESPACE_SYSTEMUI = "systemui";
    field public static final String NAMESPACE_TELEPHONY = "telephony";
    field public static final String NAMESPACE_TEXTCLASSIFIER = "textclassifier";
+10 −0
Original line number Diff line number Diff line
@@ -257,11 +257,21 @@ public final class DeviceConfig {
    /**
     * Namespace for storage-related features.
     *
     * @deprecated Replace storage namespace with storage_native_boot.
     * @hide
     */
    @Deprecated
    @SystemApi
    public static final String NAMESPACE_STORAGE = "storage";

    /**
     * Namespace for storage-related features, including native and boot.
     *
     * @hide
     */
    @SystemApi
    public static final String NAMESPACE_STORAGE_NATIVE_BOOT = "storage_native_boot";

    /**
     * Namespace for System UI related features.
     *
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ class SettingsProtoDumpUtil {
                ConfigSettingsProto.RUNTIME_NATIVE_SETTINGS);
        namespaceToFieldMap.put(DeviceConfig.NAMESPACE_RUNTIME_NATIVE_BOOT,
                ConfigSettingsProto.RUNTIME_NATIVE_BOOT_SETTINGS);
        namespaceToFieldMap.put(DeviceConfig.NAMESPACE_STORAGE,
        namespaceToFieldMap.put(DeviceConfig.NAMESPACE_STORAGE_NATIVE_BOOT,
                ConfigSettingsProto.STORAGE_SETTINGS);
        namespaceToFieldMap.put(DeviceConfig.NAMESPACE_SYSTEMUI,
                ConfigSettingsProto.SYSTEMUI_SETTINGS);
+3 −2
Original line number Diff line number Diff line
@@ -808,7 +808,7 @@ class StorageManagerService extends IStorageManager.Stub
                }
            });
        // For now, simply clone property when it changes
        DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_STORAGE,
        DeviceConfig.addOnPropertiesChangedListener(DeviceConfig.NAMESPACE_STORAGE_NATIVE_BOOT,
                mContext.getMainExecutor(), (properties) -> {
                    refreshIsolatedStorageSettings();
                });
@@ -848,7 +848,8 @@ class StorageManagerService extends IStorageManager.Stub
        // Always copy value from newer DeviceConfig location
        Settings.Global.putString(mResolver,
                Settings.Global.ISOLATED_STORAGE_REMOTE,
                DeviceConfig.getProperty(DeviceConfig.NAMESPACE_STORAGE, ISOLATED_STORAGE_ENABLED));
                DeviceConfig.getProperty(DeviceConfig.NAMESPACE_STORAGE_NATIVE_BOOT,
                        ISOLATED_STORAGE_ENABLED));

        final int local = Settings.Global.getInt(mContext.getContentResolver(),
                Settings.Global.ISOLATED_STORAGE_LOCAL, 0);
+2 −1
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ public class SettingsToPropertiesMapper {
        DeviceConfig.NAMESPACE_NETD_NATIVE,
        DeviceConfig.NAMESPACE_RUNTIME_NATIVE,
        DeviceConfig.NAMESPACE_RUNTIME_NATIVE_BOOT,
        DeviceConfig.NAMESPACE_STORAGE_NATIVE_BOOT,
    };

    private final String[] mGlobalSettings;