diff options
| author | 2022-11-10 13:54:26 +0000 | |
|---|---|---|
| committer | 2022-12-05 10:45:22 +0000 | |
| commit | 1d9b83ed175f7ef60d92a028e8eafab256330d26 (patch) | |
| tree | b645e5a09457c59daf88b1dac1defacd7d6e501f | |
| parent | d063f91638730e40c49ba29749dd2c0fb81e8c8f (diff) | |
Expose Setting.Config APIs
As part of moving DeviceConfig.java to packages/modules/ConfigInfrastructure.
Need to expose setting.config hidden apis to be able to access it
ConfigInfrastructure module.
Test: atest CtsProviderTestCases:android.provider.cts.settings.Settings_ConfigTest
Bug: 258220607
Change-Id: Ia9935e6b4a9b42841f1ece69c0f4ec230e56bd99
8 files changed, 111 insertions, 55 deletions
diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index b6e2d2a3e98b..160bc455f9a1 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -425,6 +425,26 @@ package android.provider { field public static final String NAMESPACE_DEVICE_IDLE = "device_idle"; } + public final class Settings { + field public static final int RESET_MODE_PACKAGE_DEFAULTS = 1; // 0x1 + field public static final int RESET_MODE_TRUSTED_DEFAULTS = 4; // 0x4 + field public static final int RESET_MODE_UNTRUSTED_CHANGES = 3; // 0x3 + field public static final int RESET_MODE_UNTRUSTED_DEFAULTS = 2; // 0x2 + } + + public static final class Settings.Config extends android.provider.Settings.NameValueTable { + method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static boolean deleteString(@NonNull String, @NonNull String); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static String getString(@NonNull String); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static java.util.Map<java.lang.String,java.lang.String> getStrings(@NonNull String, @NonNull java.util.List<java.lang.String>); + method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static int getSyncDisabledMode(); + method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static boolean putString(@NonNull String, @NonNull String, @Nullable String, boolean); + method public static void registerContentObserver(@Nullable String, boolean, @NonNull android.database.ContentObserver); + method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static void resetToDefaults(int, @Nullable String); + method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static boolean setStrings(@NonNull String, @NonNull java.util.Map<java.lang.String,java.lang.String>) throws android.provider.DeviceConfig.BadConfigException; + method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static void setSyncDisabledMode(int); + method public static void unregisterContentObserver(@NonNull android.database.ContentObserver); + } + public static final class Settings.Global extends android.provider.Settings.NameValueTable { field public static final String BLE_SCAN_ALWAYS_AVAILABLE = "ble_scan_always_enabled"; field public static final String BLE_SCAN_BACKGROUND_MODE = "ble_scan_background_mode"; diff --git a/core/java/android/provider/DeviceConfig.java b/core/java/android/provider/DeviceConfig.java index ca88ae306c59..27f4d08d2f9a 100644 --- a/core/java/android/provider/DeviceConfig.java +++ b/core/java/android/provider/DeviceConfig.java @@ -55,13 +55,6 @@ import java.util.concurrent.Executor; @SystemApi public final class DeviceConfig { /** - * The content:// style URL for the config table. - * - * @hide - */ - public static final Uri CONTENT_URI = Uri.parse("content://" + Settings.AUTHORITY + "/config"); - - /** * Namespace for activity manager related features. These features will be applied * immediately upon change. * @@ -1194,11 +1187,6 @@ public final class DeviceConfig { } } - private static Uri createNamespaceUri(@NonNull String namespace) { - Preconditions.checkNotNull(namespace); - return CONTENT_URI.buildUpon().appendPath(namespace).build(); - } - /** * Increment the count used to represent the number of listeners subscribed to the given * namespace. If this is the first (i.e. incrementing from 0 to 1) for the given namespace, a @@ -1223,7 +1211,7 @@ public final class DeviceConfig { } }; Settings.Config - .registerContentObserver(createNamespaceUri(namespace), true, contentObserver); + .registerContentObserver(namespace, true, contentObserver); sNamespaces.put(namespace, new Pair<>(contentObserver, 1)); } } diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 630ad6c31560..4ca5a93a2802 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2819,6 +2819,7 @@ public final class Settings { */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @TestApi + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int RESET_MODE_PACKAGE_DEFAULTS = 1; /** @@ -2828,6 +2829,7 @@ public final class Settings { * the setting will be deleted. This mode is only available to the system. * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int RESET_MODE_UNTRUSTED_DEFAULTS = 2; /** @@ -2838,6 +2840,7 @@ public final class Settings { * This mode is only available to the system. * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int RESET_MODE_UNTRUSTED_CHANGES = 3; /** @@ -2849,6 +2852,7 @@ public final class Settings { * to the system. * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final int RESET_MODE_TRUSTED_DEFAULTS = 4; /** @hide */ @@ -17986,6 +17990,7 @@ public final class Settings { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static final class Config extends NameValueTable { /** @@ -18020,12 +18025,19 @@ public final class Settings { */ public static final int SYNC_DISABLED_MODE_UNTIL_REBOOT = 2; + /** + * The content:// style URL for the config table. + * + * @hide + */ + public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/config"); + private static final ContentProviderHolder sProviderHolder = - new ContentProviderHolder(DeviceConfig.CONTENT_URI); + new ContentProviderHolder(CONTENT_URI); // Populated lazily, guarded by class object: private static final NameValueCache sNameValueCache = new NameValueCache( - DeviceConfig.CONTENT_URI, + CONTENT_URI, CALL_METHOD_GET_CONFIG, CALL_METHOD_PUT_CONFIG, CALL_METHOD_DELETE_CONFIG, @@ -18034,6 +18046,10 @@ public final class Settings { sProviderHolder, Config.class); + // Should never be invoked + private Config() { + } + /** * Look up a name in the database. * @param name to look up in the table @@ -18041,8 +18057,10 @@ public final class Settings { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) + @Nullable @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) - static String getString(String name) { + public static String getString(@NonNull String name) { ContentResolver resolver = getContentResolver(); return sNameValueCache.getStringForUser(resolver, name, resolver.getUserId()); } @@ -18057,6 +18075,8 @@ public final class Settings { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) + @NonNull @RequiresPermission(Manifest.permission.READ_DEVICE_CONFIG) public static Map<String, String> getStrings(@NonNull String namespace, @NonNull List<String> names) { @@ -18113,6 +18133,7 @@ public final class Settings { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) public static boolean putString(@NonNull String namespace, @NonNull String name, @Nullable String value, boolean makeDefault) { @@ -18132,6 +18153,7 @@ public final class Settings { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) public static boolean setStrings(@NonNull String namespace, @NonNull Map<String, String> keyValues) @@ -18182,8 +18204,9 @@ public final class Settings { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) - static boolean deleteString(@NonNull String namespace, + public static boolean deleteString(@NonNull String namespace, @NonNull String name) { ContentResolver resolver = getContentResolver(); return sNameValueCache.deleteStringForUser(resolver, @@ -18203,8 +18226,9 @@ public final class Settings { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) - static void resetToDefaults(@ResetMode int resetMode, + public static void resetToDefaults(@ResetMode int resetMode, @Nullable String namespace) { try { ContentResolver resolver = getContentResolver(); @@ -18218,7 +18242,7 @@ public final class Settings { cp.call(resolver.getAttributionSource(), sProviderHolder.mUri.getAuthority(), CALL_METHOD_RESET_CONFIG, null, arg); } catch (RemoteException e) { - Log.w(TAG, "Can't reset to defaults for " + DeviceConfig.CONTENT_URI, e); + Log.w(TAG, "Can't reset to defaults for " + CONTENT_URI, e); } } @@ -18228,9 +18252,10 @@ public final class Settings { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @SuppressLint("AndroidFrameworkRequiresPermission") @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) - static void setSyncDisabledMode(@SyncDisabledMode int disableSyncMode) { + public static void setSyncDisabledMode(@SyncDisabledMode int disableSyncMode) { try { ContentResolver resolver = getContentResolver(); Bundle args = new Bundle(); @@ -18239,7 +18264,7 @@ public final class Settings { cp.call(resolver.getAttributionSource(), sProviderHolder.mUri.getAuthority(), CALL_METHOD_SET_SYNC_DISABLED_MODE_CONFIG, null, args); } catch (RemoteException e) { - Log.w(TAG, "Can't set sync disabled mode " + DeviceConfig.CONTENT_URI, e); + Log.w(TAG, "Can't set sync disabled mode " + CONTENT_URI, e); } } @@ -18249,9 +18274,10 @@ public final class Settings { * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) @SuppressLint("AndroidFrameworkRequiresPermission") @RequiresPermission(Manifest.permission.WRITE_DEVICE_CONFIG) - static int getSyncDisabledMode() { + public static int getSyncDisabledMode() { try { ContentResolver resolver = getContentResolver(); Bundle args = Bundle.EMPTY; @@ -18262,7 +18288,7 @@ public final class Settings { null, args); return bundle.getInt(KEY_CONFIG_GET_SYNC_DISABLED_MODE_RETURN); } catch (RemoteException e) { - Log.w(TAG, "Can't query sync disabled mode " + DeviceConfig.CONTENT_URI, e); + Log.w(TAG, "Can't query sync disabled mode " + CONTENT_URI, e); } return -1; } @@ -18282,21 +18308,26 @@ public final class Settings { /** - * Register a content observer + * Register a content observer. * * @hide */ - public static void registerContentObserver(@NonNull Uri uri, boolean notifyForDescendants, - @NonNull ContentObserver observer) { + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) + public static void registerContentObserver(@Nullable String namespace, + boolean notifyForDescendants, @NonNull ContentObserver observer) { ActivityThread.currentApplication().getContentResolver() - .registerContentObserver(uri, notifyForDescendants, observer); + .registerContentObserver(createNamespaceUri(namespace), + notifyForDescendants, observer); } /** - * Unregister a content observer + * Unregister a content observer. + * this may only be used with content observers registered through + * {@link Config#registerContentObserver} * * @hide */ + @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static void unregisterContentObserver(@NonNull ContentObserver observer) { ActivityThread.currentApplication().getContentResolver() .unregisterContentObserver(observer); @@ -18357,6 +18388,11 @@ public final class Settings { return namespace + "/"; } + private static Uri createNamespaceUri(@NonNull String namespace) { + Preconditions.checkNotNull(namespace); + return CONTENT_URI.buildUpon().appendPath(namespace).build(); + } + private static ContentResolver getContentResolver() { return ActivityThread.currentApplication().getContentResolver(); } diff --git a/core/tests/coretests/src/android/provider/DeviceConfigTest.java b/core/tests/coretests/src/android/provider/DeviceConfigTest.java index 352c6a736af1..aa1853f50028 100644 --- a/core/tests/coretests/src/android/provider/DeviceConfigTest.java +++ b/core/tests/coretests/src/android/provider/DeviceConfigTest.java @@ -857,7 +857,10 @@ public class DeviceConfigTest { ContentResolver resolver = InstrumentationRegistry.getContext().getContentResolver(); String compositeName = namespace + "/" + key; Bundle result = resolver.call( - DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, compositeName, null); + Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_DELETE_CONFIG, + compositeName, + null); assertThat(result).isNotNull(); return compositeName.equals(result.getString(Settings.NameValueTable.VALUE)); } diff --git a/core/tests/coretests/src/android/provider/NameValueCacheTest.java b/core/tests/coretests/src/android/provider/NameValueCacheTest.java index ee0b127c696b..2e31bb581fbc 100644 --- a/core/tests/coretests/src/android/provider/NameValueCacheTest.java +++ b/core/tests/coretests/src/android/provider/NameValueCacheTest.java @@ -76,7 +76,7 @@ public class NameValueCacheTest { when(mMockContentProvider.getIContentProvider()).thenReturn(mMockIContentProvider); mMockContentResolver = new MockContentResolver(InstrumentationRegistry .getInstrumentation().getContext()); - mMockContentResolver.addProvider(DeviceConfig.CONTENT_URI.getAuthority(), + mMockContentResolver.addProvider(Settings.Config.CONTENT_URI.getAuthority(), mMockContentProvider); mCacheGenerationStore = new MemoryIntArray(1); mStorage = new HashMap<>(); @@ -84,7 +84,7 @@ public class NameValueCacheTest { // Stores keyValues for a given prefix and increments the generation. (Note that this // increments the generation no matter what, it doesn't pay attention to if anything // actually changed). - when(mMockIContentProvider.call(any(), eq(DeviceConfig.CONTENT_URI.getAuthority()), + when(mMockIContentProvider.call(any(), eq(Settings.Config.CONTENT_URI.getAuthority()), eq(Settings.CALL_METHOD_SET_ALL_CONFIG), any(), any(Bundle.class))).thenAnswer(invocationOnMock -> { Bundle incomingBundle = invocationOnMock.getArgument(4); @@ -104,7 +104,7 @@ public class NameValueCacheTest { // Returns the keyValues corresponding to a namespace, or an empty map if the namespace // doesn't have anything stored for it. Returns the generation key if the caller asked // for one. - when(mMockIContentProvider.call(any(), eq(DeviceConfig.CONTENT_URI.getAuthority()), + when(mMockIContentProvider.call(any(), eq(Settings.Config.CONTENT_URI.getAuthority()), eq(Settings.CALL_METHOD_LIST_CONFIG), any(), any(Bundle.class))).thenAnswer(invocationOnMock -> { Bundle incomingBundle = invocationOnMock.getArgument(4); diff --git a/core/tests/coretests/src/android/provider/SettingsProviderTest.java b/core/tests/coretests/src/android/provider/SettingsProviderTest.java index 4adbc9134698..133177935984 100644 --- a/core/tests/coretests/src/android/provider/SettingsProviderTest.java +++ b/core/tests/coretests/src/android/provider/SettingsProviderTest.java @@ -345,27 +345,33 @@ public class SettingsProviderTest extends AndroidTestCase { try { // value is empty Bundle results = - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_GET_CONFIG, name, null); + r.call(Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_GET_CONFIG, name, null); assertNull(results.get(Settings.NameValueTable.VALUE)); // save value - results = r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, name, args); + results = r.call(Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_PUT_CONFIG, name, args); assertNull(results); // value is no longer empty - results = r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_GET_CONFIG, name, null); + results = r.call(Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_GET_CONFIG, name, null); assertEquals(value, results.get(Settings.NameValueTable.VALUE)); // save new value args.putString(Settings.NameValueTable.VALUE, newValue); - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, name, args); + r.call(Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_PUT_CONFIG, name, args); // new value is returned - results = r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_GET_CONFIG, name, null); + results = r.call(Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_GET_CONFIG, name, null); assertEquals(newValue, results.get(Settings.NameValueTable.VALUE)); } finally { // clean up - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, name, null); + r.call(Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_DELETE_CONFIG, name, null); } } @@ -379,23 +385,25 @@ public class SettingsProviderTest extends AndroidTestCase { try { // save value - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, name, args); + r.call(Settings.Config.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, name, args); // get value Bundle results = - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_GET_CONFIG, name, null); + r.call(Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_GET_CONFIG, name, null); assertEquals(value, results.get(Settings.NameValueTable.VALUE)); // delete value - results = r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, name, + results = r.call(Settings.Config.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, name, null); // value is empty now - results = r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_GET_CONFIG, name, null); + results = r.call(Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_GET_CONFIG, name, null); assertNull(results.get(Settings.NameValueTable.VALUE)); } finally { // clean up - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, name, null); + r.call(Settings.Config.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, name, null); } } @@ -413,12 +421,12 @@ public class SettingsProviderTest extends AndroidTestCase { try { // save both values - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, name, args); + r.call(Settings.Config.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, name, args); args.putString(Settings.NameValueTable.VALUE, newValue); - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, newName, args); + r.call(Settings.Config.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, newName, args); // list all values - Bundle result = r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_LIST_CONFIG, + Bundle result = r.call(Settings.Config.CONTENT_URI, Settings.CALL_METHOD_LIST_CONFIG, null, null); Map<String, String> keyValueMap = (HashMap) result.getSerializable(Settings.NameValueTable.VALUE); @@ -428,14 +436,15 @@ public class SettingsProviderTest extends AndroidTestCase { // list values for prefix args.putString(Settings.CALL_METHOD_PREFIX_KEY, prefix); - result = r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_LIST_CONFIG, null, args); + result = r.call(Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_LIST_CONFIG, null, args); keyValueMap = (HashMap) result.getSerializable(Settings.NameValueTable.VALUE); assertThat(keyValueMap, aMapWithSize(1)); assertEquals(value, keyValueMap.get(name)); } finally { // clean up - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, name, null); - r.call(DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, newName, null); + r.call(Settings.Config.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, name, null); + r.call(Settings.Config.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, newName, null); } } } diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 0b7b2f935e91..503859b8dc38 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -3595,8 +3595,8 @@ public class SettingsProvider extends ContentProvider { private Uri getNotificationUriFor(int key, String name) { if (isConfigSettingsKey(key)) { - return (name != null) ? Uri.withAppendedPath(DeviceConfig.CONTENT_URI, name) - : DeviceConfig.CONTENT_URI; + return (name != null) ? Uri.withAppendedPath(Settings.Config.CONTENT_URI, name) + : Settings.Config.CONTENT_URI; } else if (isGlobalSettingsKey(key)) { return (name != null) ? Uri.withAppendedPath(Settings.Global.CONTENT_URI, name) : Settings.Global.CONTENT_URI; diff --git a/packages/SettingsProvider/test/src/com/android/providers/settings/DeviceConfigServiceTest.java b/packages/SettingsProvider/test/src/com/android/providers/settings/DeviceConfigServiceTest.java index e588b3d594ca..753378bc487b 100644 --- a/packages/SettingsProvider/test/src/com/android/providers/settings/DeviceConfigServiceTest.java +++ b/packages/SettingsProvider/test/src/com/android/providers/settings/DeviceConfigServiceTest.java @@ -22,7 +22,6 @@ import static junit.framework.Assert.assertNull; import android.content.ContentResolver; import android.os.Bundle; -import android.provider.DeviceConfig; import android.provider.Settings; import androidx.test.InstrumentationRegistry; @@ -180,14 +179,14 @@ public class DeviceConfigServiceTest { args.putBoolean(Settings.CALL_METHOD_MAKE_DEFAULT_KEY, true); } resolver.call( - DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, compositeName, args); + Settings.Config.CONTENT_URI, Settings.CALL_METHOD_PUT_CONFIG, compositeName, args); } private static String getFromContentProvider(ContentResolver resolver, String namespace, String key) { String compositeName = namespace + "/" + key; Bundle result = resolver.call( - DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_GET_CONFIG, compositeName, null); + Settings.Config.CONTENT_URI, Settings.CALL_METHOD_GET_CONFIG, compositeName, null); assertNotNull(result); return result.getString(Settings.NameValueTable.VALUE); } @@ -196,7 +195,8 @@ public class DeviceConfigServiceTest { String key) { String compositeName = namespace + "/" + key; Bundle result = resolver.call( - DeviceConfig.CONTENT_URI, Settings.CALL_METHOD_DELETE_CONFIG, compositeName, null); + Settings.Config.CONTENT_URI, + Settings.CALL_METHOD_DELETE_CONFIG, compositeName, null); assertNotNull(result); return compositeName.equals(result.getString(Settings.NameValueTable.VALUE)); } |