@@ -68,8 +68,8 @@ public void dropShellPermissionIdentityAfterTest() {
6868 .dropShellPermissionIdentity ();
6969 }
7070 /**
71- * Checks that when application does not have READ_DEVICE_CONFIG or WRITE_DEVICE_CONFIG
72- * permissions it cannot access any of DeviceConfig API methods
71+ * Checks that when application does not have WRITE_DEVICE_CONFIG
72+ * permissions it cannot access any write DeviceConfig API methods
7373 * @throws Exception
7474 */
7575 @ Test
@@ -81,10 +81,6 @@ public void testDeviceConfigWithoutPermissions() {
8181 trySetPropertiesWithoutWritePermission (violations );
8282 tryDeletePropertyWithoutWritePermission (violations );
8383
84- // getters without read permission
85- tryGetPropertyWithoutReadPermission (violations );
86- tryGetPropertiesWithoutReadPermission (violations );
87-
8884 // Bail if we found any violations
8985 if (violations .length () > 0 ) {
9086 fail (violations .toString ());
@@ -107,10 +103,6 @@ public void testDeviceConfigWithWritePermission() {
107103 trySetPropertyWithWritePermission (violations );
108104 trySetPropertiesWithWritePermission (violations );
109105
110- // getters without read permission
111- tryGetPropertyWithoutReadPermission (violations );
112- tryGetPropertiesWithoutReadPermission (violations );
113-
114106 // Bail if we found any violations
115107 if (violations .length () > 0 ) {
116108 fail (violations .toString ());
@@ -304,24 +296,6 @@ private void tryDeletePropertyWithoutWritePermission(StringBuilder violations) {
304296 }
305297 }
306298
307- private void tryGetPropertyWithoutReadPermission (StringBuilder violations ) {
308- try {
309- DeviceConfig .getProperty (NAMESPACE , KEY );
310- violations .append ("DeviceConfig.getProperty() must not be accessible without "
311- + "READ_DEVICE_CONFIG permission.\n " );
312- } catch (SecurityException e ) {
313- }
314- }
315-
316- private void tryGetPropertiesWithoutReadPermission (StringBuilder violations ) {
317- try {
318- DeviceConfig .getProperties (NAMESPACE2 );
319- violations .append ("DeviceConfig.getProperties() must not be accessible without "
320- + "READ_DEVICE_CONFIG permission.\n " );
321- } catch (SecurityException e ) {
322- }
323- }
324-
325299 private void trySetPropertyWithWritePermission (StringBuilder violations ) {
326300 try {
327301 DeviceConfig .setProperty (NAMESPACE , KEY , VALUE , /*makeDefault=*/ false );
0 commit comments