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

Commit fffccda6 authored by Yan Yan's avatar Yan Yan Committed by Automerger Merge Worker
Browse files

Merge "VCN: Remove hidden APIs for data directory and Settings constants" into...

Merge "VCN: Remove hidden APIs for data directory and Settings constants" into main am: 5c75a964 am: 8a6ced43

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3273120



Change-Id: I6cba936d8665fe11af4af12f386014f28d73029d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 00b09c68 8a6ced43
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -178,9 +178,10 @@ public class VcnManagementService extends IVcnManagementService.Stub {

    public static final boolean VDBG = false; // STOPSHIP: if true

    // The system path is copied from Environment.getDataSystemDirectory
    @VisibleForTesting(visibility = Visibility.PRIVATE)
    static final String VCN_CONFIG_FILE =
            new File(Environment.getDataSystemDirectory(), "vcn/configs.xml").getPath();
            new File(Environment.getDataDirectory(), "system/vcn/configs.xml").getPath();

    // TODO(b/176956496): Directly use CarrierServiceBindHelper.UNBIND_DELAY_MILLIS
    @VisibleForTesting(visibility = Visibility.PRIVATE)
+5 −1
Original line number Diff line number Diff line
@@ -86,6 +86,9 @@ public class Vcn extends Handler {
    private static final int MSG_EVENT_BASE = 0;
    private static final int MSG_CMD_BASE = 100;

    // Copied from Settings.Global.MOBILE_DATA
    private static final String SETTINGS_GLOBAL_MOBILE_DATA_STRING = "mobile_data";

    /**
     * A carrier app updated the configuration.
     *
@@ -219,7 +222,8 @@ public class Vcn extends Handler {
        mContentResolver = mDeps.newVcnContentResolver(mVcnContext);
        mMobileDataSettingsObserver = new VcnMobileDataContentObserver(this /* handler */);

        final Uri uri = Settings.Global.getUriFor(Settings.Global.MOBILE_DATA);
        // TODO: b/364740845: Replace it with DataEnabledListener
        final Uri uri = Settings.Global.getUriFor(SETTINGS_GLOBAL_MOBILE_DATA_STRING);
        mContentResolver.registerContentObserver(
                uri, true /* notifyForDescendants */, mMobileDataSettingsObserver);