diff options
author | Songchun Fan <schfan@google.com> | 2020-09-03 16:29:24 -0700 |
---|---|---|
committer | Songchun Fan <schfan@google.com> | 2020-09-14 23:41:55 +0000 |
commit | 937eb58169001eeb3bc339b892fdba7cfe42269f (patch) | |
tree | d2f271a50818099fe96d6e02e367d0315e806258 /telephony/common | |
parent | e2a264d0e918c82c08f06ca74f9ca68ffcea0f36 (diff) |
[telephony] system_server should not call non forUser Settings.Secure.get* methods
BUG: 166312046
Test: builds
Change-Id: Ib30eb22c23c7fd60ff498845a4d1876de2bb7799
Diffstat (limited to 'telephony/common')
-rw-r--r-- | telephony/common/com/android/internal/telephony/CarrierAppUtils.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java index d4308c4c30ad..cfc7ac176f89 100644 --- a/telephony/common/com/android/internal/telephony/CarrierAppUtils.java +++ b/telephony/common/com/android/internal/telephony/CarrierAppUtils.java @@ -157,7 +157,8 @@ public final class CarrierAppUtils { List<String> enabledCarrierPackages = new ArrayList<>(); int carrierAppsHandledSdk = - Settings.Secure.getInt(contentResolver, Settings.Secure.CARRIER_APPS_HANDLED, 0); + Settings.Secure.getIntForUser(contentResolver, Settings.Secure.CARRIER_APPS_HANDLED, + 0, contentResolver.getUserId()); if (DEBUG) { Log.i(TAG, "Last execution SDK: " + carrierAppsHandledSdk); } @@ -309,8 +310,8 @@ public final class CarrierAppUtils { // Mark the execution so we do not disable apps again on this SDK version. if (!hasRunEver || !hasRunForSdk) { - Settings.Secure.putInt(contentResolver, Settings.Secure.CARRIER_APPS_HANDLED, - Build.VERSION.SDK_INT); + Settings.Secure.putIntForUser(contentResolver, Settings.Secure.CARRIER_APPS_HANDLED, + Build.VERSION.SDK_INT, contentResolver.getUserId()); } if (!enabledCarrierPackages.isEmpty()) { |