Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49f492c7 authored by Zhi Dou's avatar Zhi Dou Committed by Android (Google) Code Review
Browse files

Merge "Clear the calling uid if the call is a binder transaction call" into main

parents 2b900582 8ff4f48d
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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