Make setMetered and setOpportunistic public.

Making SubscriptionManager#setMetered and #setOpportunistic public
APIs. Adding proper permission checks and descriptions.

Bug: 120138251
Test: cts, unittest

Change-Id: Id6f074b15a1c03d00ede2665d44595fa7be965e4
Merged-In: Id6f074b15a1c03d00ede2665d44595fa7be965e4
This commit is contained in:
Malcolm Chen
2018-12-11 13:56:53 -08:00
parent 97c9aba888
commit d4dc4ee269
5 changed files with 45 additions and 15 deletions

View File

@@ -6665,8 +6665,8 @@ public class TelephonyManager {
try {
ITelephony telephony = getITelephony();
if (telephony != null) {
return telephony.getCarrierPrivilegeStatus(subId) ==
CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
return telephony.getCarrierPrivilegeStatus(subId)
== CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
}
} catch (RemoteException ex) {
Rlog.e(TAG, "hasCarrierPrivileges RemoteException", ex);