Fix permission check for unbundled sharesheet

Only the calling appId should be compared, not the full uid.

Fix: 269106787
Change-Id: I29cd9644a872d1db3eedb6db1fdc3fa6f4dc072b
This commit is contained in:
Mark Renouf
2023-03-08 15:30:05 +00:00
parent dc94ae961f
commit f26e1728d9

View File

@@ -1641,7 +1641,7 @@ public class ShortcutService extends IShortcutService.Stub {
return false;
}
int uid = injectGetPackageUid(systemChooser.getPackageName(), UserHandle.USER_SYSTEM);
return uid == callingUid;
return UserHandle.getAppId(uid) == UserHandle.getAppId(callingUid);
}
private void enforceSystemOrShell() {