diff options
| author | 2023-09-19 19:46:22 +0000 | |
|---|---|---|
| committer | 2023-09-20 02:43:00 +0000 | |
| commit | 8ff4f48d57974ba1ee1b65eec04d984ad3764f0c (patch) | |
| tree | fc57f84f3039dc80d20682d02c943de1c06761f4 | |
| parent | 374910ad47b08ec9f086c7189c8573ff7a47b78b (diff) | |
Clear the calling uid if the call is a binder transaction call
The method getStringsForPrefix only clear the uid only if the namespace
if for policy manager. But now with tunk flag the binder call will be
more often.
Bug: 300704684
Test: presubmit
Change-Id: I43c325b658ed20d43944c4532d7decd2969cffef
| -rw-r--r-- | core/java/android/provider/Settings.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 7e71134f55bb..c19c20c8429d 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -3596,12 +3596,9 @@ public final class Settings { } Bundle b; - // b/252663068: if we're in system server and the caller did not call + // If we're in system server and the caller did not call // clearCallingIdentity, the read would fail due to mismatched AttributionSources. - // TODO(b/256013480): remove this bypass after fixing the callers in system server. - if (namespace.equals(DeviceConfig.NAMESPACE_DEVICE_POLICY_MANAGER) - && Settings.isInSystemServer() - && Binder.getCallingUid() != Process.myUid()) { + if (Settings.isInSystemServer() && Binder.getCallingUid() != Process.myUid()) { final long token = Binder.clearCallingIdentity(); try { // Fetch all flags for the namespace at once for caching purposes |