diff options
| author | 2024-09-25 01:04:42 +0000 | |
|---|---|---|
| committer | 2024-09-25 01:04:42 +0000 | |
| commit | fffccda62fa45ee000963f92e9c2f64bb9e01f7c (patch) | |
| tree | 95a16d989e351e21662c4fdcc33b3c13a74ea7da | |
| parent | 00b09c68e205e79b3f775391945e2bedec9b1979 (diff) | |
| parent | 8a6ced431bad3b3a5e2fe4708ae6bcf5c7b3a1c8 (diff) | |
Merge "VCN: Remove hidden APIs for data directory and Settings constants" into main am: 5c75a96448 am: 8a6ced431b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/3273120
Change-Id: I6cba936d8665fe11af4af12f386014f28d73029d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | services/core/java/com/android/server/VcnManagementService.java | 3 | ||||
| -rw-r--r-- | services/core/java/com/android/server/vcn/Vcn.java | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/VcnManagementService.java b/services/core/java/com/android/server/VcnManagementService.java index d19899f03d71..89dfc736301a 100644 --- a/services/core/java/com/android/server/VcnManagementService.java +++ b/services/core/java/com/android/server/VcnManagementService.java @@ -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) diff --git a/services/core/java/com/android/server/vcn/Vcn.java b/services/core/java/com/android/server/vcn/Vcn.java index 5a5f7ef7b225..5bc2c2dface9 100644 --- a/services/core/java/com/android/server/vcn/Vcn.java +++ b/services/core/java/com/android/server/vcn/Vcn.java @@ -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); |