Merge "Check AppOps bit for TelephonyManager#getForbiddenPlmns" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-03-15 04:37:28 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 4 deletions

View File

@@ -5183,7 +5183,7 @@ public class TelephonyManager {
ITelephony telephony = getITelephony();
if (telephony == null)
return null;
return telephony.getForbiddenPlmns(subId, appType);
return telephony.getForbiddenPlmns(subId, appType, mContext.getOpPackageName());
} catch (RemoteException ex) {
return null;
} catch (NullPointerException ex) {

View File

@@ -1444,13 +1444,12 @@ interface ITelephony {
* Returns a list of Forbidden PLMNs from the specified SIM App
* Returns null if the query fails.
*
*
* <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE
* <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE or READ_PHONE_STATE
*
* @param subId subscription ID used for authentication
* @param appType the icc application type, like {@link #APPTYPE_USIM}
*/
String[] getForbiddenPlmns(int subId, int appType);
String[] getForbiddenPlmns(int subId, int appType, String callingPackage);
/**
* Check if phone is in emergency callback mode