From e7704769a576b941e9ce3c08cc717966c425a02a Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Thu, 25 Apr 2019 10:59:08 -0700 Subject: [PATCH] Rollback SHELL UID check for CarrierConfigLoader When a test calls adoptShellPermissionIdentity before calling a command, it doesn't adopt the shell UID, only the permissions. So, we can not use Binder#getCallingIdentity to determine it the API is being called as part of a test. For now, we must only use MODIFY_PHONE_STATE until a better pattern is established. Test: Manual Bug: 131185660 Merged-In: I607b7c9afe1c384a41ce12b92ae43747b2ee1bc3 Change-Id: I59d32a2e36950b2485e1a46a25e3724928676219 --- telephony/java/android/telephony/CarrierConfigManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index c32e164954e3b..c449dbf02c2e5 100755 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -3159,8 +3159,7 @@ public class CarrierConfigManager { * May throw an {@link IllegalArgumentException} if {@code overrideValues} contains invalid * values for the specified config keys. * - * NOTE: This API is meant for testing purposes only and may only be accessed from the shell UID - * during instrumentation testing. + * NOTE: This API is meant for testing purposes only. * * @param subscriptionId The subscription ID for which the override should be done. * @param overrideValues Key-value pairs of the values that are to be overridden. If set to