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: I3bc83265bcbc9cc09167e0d73916f28156a64fe8
This commit is contained in:
Jeff Sharkey
2021-07-14 23:38:05 +00:00
committed by Automerger Merge Worker

View File

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