summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-04-17 21:34:02 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-17 21:34:04 +0000
commitd3c1ddb892f2ef8ae1b8eb0e4c50dfef302c0beb (patch)
tree5abd54a3da632d215a5ac1f1bad5b189852ef048 /telephony
parentf2004061505cdcb2a37072b430104586ca848df2 (diff)
parent16a16899505ec0a9ede5b76650bfb8817b3227c7 (diff)
downloadframeworks_base-d3c1ddb892f2ef8ae1b8eb0e4c50dfef302c0beb.zip
frameworks_base-d3c1ddb892f2ef8ae1b8eb0e4c50dfef302c0beb.tar.gz
frameworks_base-d3c1ddb892f2ef8ae1b8eb0e4c50dfef302c0beb.tar.bz2
Merge "Add OP_READ_PHONE_STATE app op - framework"
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java4
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java13
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl22
3 files changed, 22 insertions, 17 deletions
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 08aec08..3ecf5ac 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -272,10 +272,6 @@ public class SubscriptionManager {
* for #onSubscriptionsChanged to be invoked.
*/
public static class OnSubscriptionsChangedListener {
- /** @hide */
- public static final String PERMISSION_ON_SUBSCRIPTIONS_CHANGED =
- android.Manifest.permission.READ_PHONE_STATE;
-
private final Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 128f6e3..cd3f636 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -664,7 +664,7 @@ public class TelephonyManager {
ITelephony telephony = getITelephony();
if (telephony == null)
return null;
- return telephony.getDeviceId();
+ return telephony.getDeviceId(mContext.getOpPackageName());
} catch (RemoteException ex) {
return null;
} catch (NullPointerException ex) {
@@ -1975,7 +1975,7 @@ public class TelephonyManager {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- number = telephony.getLine1NumberForDisplay(subId);
+ number = telephony.getLine1NumberForDisplay(subId, mContext.getOpPackageName());
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
}
@@ -2096,7 +2096,8 @@ public class TelephonyManager {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- alphaTag = telephony.getLine1AlphaTagForDisplay(subId);
+ alphaTag = telephony.getLine1AlphaTagForDisplay(subId,
+ mContext.getOpPackageName());
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
}
@@ -3342,7 +3343,7 @@ public class TelephonyManager {
ITelephony telephony = getITelephony();
if (telephony == null)
return new String[0];
- return telephony.getPcscfAddress(apnType);
+ return telephony.getPcscfAddress(apnType, mContext.getOpPackageName());
} catch (RemoteException e) {
return new String[0];
}
@@ -3759,7 +3760,7 @@ public class TelephonyManager {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.isSimPinEnabled();
+ return telephony.isSimPinEnabled(mContext.getOpPackageName());
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelephony#isSimPinEnabled", e);
}
@@ -4026,7 +4027,7 @@ public class TelephonyManager {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.isVideoCallingEnabled();
+ return telephony.isVideoCallingEnabled(mContext.getOpPackageName());
} catch (RemoteException e) {
Log.e(TAG, "Error calling ITelephony#isVideoCallingEnabled", e);
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index a24859b..4fe88c4 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -45,6 +45,7 @@ interface ITelephony {
/**
* Place a call to the specified number.
+ * @param callingPackage The package making the call.
* @param number the number to be called.
*/
void call(String callingPackage, String number);
@@ -169,8 +170,9 @@ interface ITelephony {
/**
* Check if the SIM pin lock is enabled.
* @return true if the SIM pin lock is enabled.
+ * @param callingPackage The package making the call.
*/
- boolean isSimPinEnabled();
+ boolean isSimPinEnabled(String callingPackage);
/**
* Supply a pin to unlock the SIM. Blocks until a result is determined.
@@ -644,10 +646,11 @@ interface ITelephony {
/*
* Get the calculated preferred network type.
* Used for device configuration by some CDMA operators.
+ * @param callingPackage The package making the call.
*
* @return the calculated preferred network type, defined in RILConstants.java.
*/
- int getCalculatedPreferredNetworkType();
+ int getCalculatedPreferredNetworkType(String callingPackage);
/*
* Get the preferred network type.
@@ -701,8 +704,9 @@ interface ITelephony {
/**
* Get P-CSCF address from PCO after data connection is established or modified.
* @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN
+ * @param callingPackage The package making the call.
*/
- String[] getPcscfAddress(String apnType);
+ String[] getPcscfAddress(String apnType, String callingPackage);
/**
* Set IMS registration state
@@ -768,19 +772,21 @@ interface ITelephony {
* {@link #setLine1NumberForDisplay}. Otherwise returns null.
*
* @param subId whose dialing number for line 1 is returned.
+ * @param callingPackage The package making the call.
* @return the displayed dialing number if set, or null if not set.
*/
- String getLine1NumberForDisplay(int subId);
+ String getLine1NumberForDisplay(int subId, String callingPackage);
/**
* Returns the displayed alphatag of the dialing number if it was set
* previously via {@link #setLine1NumberForDisplay}. Otherwise returns null.
*
* @param subId whose alphatag associated with line 1 is returned.
+ * @param callingPackage The package making the call.
* @return the displayed alphatag of the dialing number if set, or null if
* not set.
*/
- String getLine1AlphaTagForDisplay(int subId);
+ String getLine1AlphaTagForDisplay(int subId, String callingPackage);
String[] getMergedSubscriberIds();
@@ -872,9 +878,10 @@ interface ITelephony {
/**
* Whether video calling has been enabled by the user.
*
+ * @param callingPackage The package making the call.
* @return {@code true} if the user has enabled video calling, {@code false} otherwise.
*/
- boolean isVideoCallingEnabled();
+ boolean isVideoCallingEnabled(String callingPackage);
/**
* Whether the DTMF tone length can be changed.
@@ -925,10 +932,11 @@ interface ITelephony {
* Returns the unique device ID of phone, for example, the IMEI for
* GSM and the MEID for CDMA phones. Return null if device ID is not available.
*
+ * @param callingPackage The package making the call.
* <p>Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*/
- String getDeviceId();
+ String getDeviceId(String callingPackage);
/**
* Returns the subscription ID associated with the specified PhoneAccount.