Merge "NetworkStatAccess Should checkCarrierPrivileges cross all subscriptions" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-30 01:00:44 +00:00
committed by Android (Google) Code Review

View File

@@ -109,7 +109,7 @@ public final class NetworkStatsAccess {
final TelephonyManager tm = (TelephonyManager)
context.getSystemService(Context.TELEPHONY_SERVICE);
boolean hasCarrierPrivileges = tm != null &&
tm.checkCarrierPrivilegesForPackage(callingPackage) ==
tm.checkCarrierPrivilegesForPackageAnyPhone(callingPackage) ==
TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
boolean isDeviceOwner = dpmi != null && dpmi.isActiveAdminWithPolicy(callingUid,
DeviceAdminInfo.USES_POLICY_DEVICE_OWNER);