Merge "Skip carrier priv check for trusted UIDs" into rvc-dev
This commit is contained in:
@@ -8171,7 +8171,7 @@ public abstract class PackageManager {
|
|||||||
private static final PropertyInvalidatedCache<PackageInfoQuery, PackageInfo>
|
private static final PropertyInvalidatedCache<PackageInfoQuery, PackageInfo>
|
||||||
sPackageInfoCache =
|
sPackageInfoCache =
|
||||||
new PropertyInvalidatedCache<PackageInfoQuery, PackageInfo>(
|
new PropertyInvalidatedCache<PackageInfoQuery, PackageInfo>(
|
||||||
16, PermissionManager.CACHE_KEY_PACKAGE_INFO) {
|
32, PermissionManager.CACHE_KEY_PACKAGE_INFO) {
|
||||||
@Override
|
@Override
|
||||||
protected PackageInfo recompute(PackageInfoQuery query) {
|
protected PackageInfo recompute(PackageInfoQuery query) {
|
||||||
return getPackageInfoAsUserUncached(
|
return getPackageInfoAsUserUncached(
|
||||||
|
|||||||
@@ -623,6 +623,10 @@ public final class TelephonyPermissions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int getCarrierPrivilegeStatus(Context context, int subId, int uid) {
|
private static int getCarrierPrivilegeStatus(Context context, int subId, int uid) {
|
||||||
|
if (uid == Process.SYSTEM_UID || uid == Process.PHONE_UID) {
|
||||||
|
// Skip the check if it's one of these special uids
|
||||||
|
return TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
|
||||||
|
}
|
||||||
final long identity = Binder.clearCallingIdentity();
|
final long identity = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(
|
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(
|
||||||
|
|||||||
Reference in New Issue
Block a user