Merge "Root UID can synthesize AttributionSource values." into sc-dev am: 9d0ddef67b

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15285879

Change-Id: I0b1bfb252147c3b4b66ac30d2b5d5f3b71fa0b7c
This commit is contained in:
Jeff Sharkey
2021-07-16 01:50:29 +00:00
committed by Automerger Merge Worker

View File

@@ -252,7 +252,8 @@ public final class AttributionSource implements Parcelable {
*/ */
public boolean checkCallingUid() { public boolean checkCallingUid() {
final int callingUid = Binder.getCallingUid(); final int callingUid = Binder.getCallingUid();
if (callingUid != Process.SYSTEM_UID if (callingUid != Process.ROOT_UID
&& callingUid != Process.SYSTEM_UID
&& callingUid != mAttributionSourceState.uid) { && callingUid != mAttributionSourceState.uid) {
return false; return false;
} }