Snap for 5612230 from f6fec1e8b246ed82065b8534487644188ce39a1c to rvc-release
Change-Id: I58eaaab3a2b80a51fd489c42e2c4357fb463419f
diff --git a/src/com/android/providers/blockednumber/BlockedNumberProvider.java b/src/com/android/providers/blockednumber/BlockedNumberProvider.java
index 68a8c65..2e029d8 100644
--- a/src/com/android/providers/blockednumber/BlockedNumberProvider.java
+++ b/src/com/android/providers/blockednumber/BlockedNumberProvider.java
@@ -632,7 +632,7 @@
final TelephonyManager telephonyManager =
getContext().getSystemService(TelephonyManager.class);
- return telephonyManager.checkCarrierPrivilegesForPackage(callingPackage) ==
+ return telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(callingPackage) ==
TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
}
return false;
diff --git a/tests/src/com/android/providers/blockednumber/BlockedNumberProviderTest.java b/tests/src/com/android/providers/blockednumber/BlockedNumberProviderTest.java
index 828028f..8b5e82b 100644
--- a/tests/src/com/android/providers/blockednumber/BlockedNumberProviderTest.java
+++ b/tests/src/com/android/providers/blockednumber/BlockedNumberProviderTest.java
@@ -479,7 +479,7 @@
public void testCarrierAppCanAccessApis() {
doReturn(PackageManager.PERMISSION_DENIED)
.when(mMockContext).checkCallingPermission(anyString());
- when(mMockContext.mTelephonyManager.checkCarrierPrivilegesForPackage(anyString()))
+ when(mMockContext.mTelephonyManager.checkCarrierPrivilegesForPackageAnyPhone(anyString()))
.thenReturn(TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS);
mResolver.insert(
@@ -489,7 +489,7 @@
// Dialer check is executed twice: once for insert, and once for isBlocked.
verify(mMockContext.mTelephonyManager, times(2))
- .checkCarrierPrivilegesForPackage(anyString());
+ .checkCarrierPrivilegesForPackageAnyPhone(anyString());
}
public void testSelfCanAccessApis() {