summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
Diffstat (limited to 'telephony/java')
-rw-r--r--telephony/java/android/telephony/CarrierConfigManager.java36
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java4
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java22
-rw-r--r--telephony/java/com/android/ims/internal/IImsCallSession.aidl7
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl26
5 files changed, 65 insertions, 30 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index cdf77b4..d103fbf 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -78,6 +78,38 @@ public class CarrierConfigManager {
*/
public static final String INT_VOLTE_REPLACEMENT_RAT = "int_volte_replacement_rat";
+ /* The following 3 fields are related to carrier visual voicemail. */
+
+ /**
+ * The carrier number MO sms messages are sent to.
+ *
+ * @hide
+ */
+ public static final String STRING_VVM_DESTINATION_NUMBER = "string_vvm_destination_number";
+
+ /**
+ * The port through which the MO sms messages are sent through.
+ *
+ * @hide
+ */
+ public static final String INT_VVM_PORT_NUMBER = "int_vvm_port_number";
+
+ /**
+ * The type of visual voicemail protocol the carrier adheres to (see below).
+ *
+ * @hide
+ */
+ public static final String STRING_VVM_TYPE = "string_vvm_type";
+
+ /* Visual voicemail protocols */
+
+ /**
+ * The OMTP protocol.
+ *
+ * @hide
+ */
+ public static final String VVM_TYPE_OMTP = "vvm_type_omtp";
+
private final static String TAG = "CarrierConfigManager";
/** The default value for every variable. */
@@ -91,6 +123,10 @@ public class CarrierConfigManager {
sDefaults.putBoolean(BOOL_SHOW_APN_SETTING_CDMA, false);
sDefaults.putInt(INT_VOLTE_REPLACEMENT_RAT, 0);
+
+ sDefaults.putString(STRING_VVM_DESTINATION_NUMBER, "");
+ sDefaults.putString(STRING_VVM_TYPE, "");
+ sDefaults.putInt(INT_VVM_PORT_NUMBER, 0);
}
/**
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 6eb87b5..c62197d 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) {
@@ -782,7 +782,7 @@ public class TelephonyManager {
ITelephony telephony = getITelephony();
if (telephony == null)
return null;
- Bundle bundle = telephony.getCellLocation();
+ Bundle bundle = telephony.getCellLocation(mContext.getOpPackageName());
if (bundle.isEmpty()) return null;
CellLocation cl = CellLocation.newFromBundle(bundle);
if (cl.isEmpty())
@@ -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) {
}
@@ -2570,10 +2571,11 @@ public class TelephonyManager {
* LISTEN_ flags.
*/
public void listen(PhoneStateListener listener, int events) {
- String pkgForDebug = mContext != null ? mContext.getPackageName() : "<unknown>";
+ if (mContext == null) return;
try {
Boolean notifyNow = (getITelephony() != null);
- sRegistry.listenForSubscriber(listener.mSubId, pkgForDebug, listener.callback, events, notifyNow);
+ sRegistry.listenForSubscriber(listener.mSubId, mContext.getOpPackageName(),
+ listener.callback, events, notifyNow);
} catch (RemoteException ex) {
// system process dead
} catch (NullPointerException ex) {
@@ -2728,7 +2730,7 @@ public class TelephonyManager {
ITelephony telephony = getITelephony();
if (telephony == null)
return null;
- return telephony.getAllCellInfo();
+ return telephony.getAllCellInfo(mContext.getOpPackageName());
} catch (RemoteException ex) {
return null;
} catch (NullPointerException ex) {
@@ -3342,7 +3344,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];
}
@@ -3765,7 +3767,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);
}
@@ -4032,7 +4034,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/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
index 9b435dc..b1f2d32 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
@@ -255,11 +255,4 @@ interface IImsCallSession {
* @return {@code True} if the session is multiparty.
*/
boolean isMultiparty();
-
- /**
- * Gets the call substate for this session.
- *
- * @return the call substate for this session.
- */
- int getCallSubstate();
}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index d24dba7..0bd3f1c 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.
@@ -341,7 +343,7 @@ interface ITelephony {
*/
boolean isDataConnectivityPossible();
- Bundle getCellLocation();
+ Bundle getCellLocation(String callingPkg);
/**
* Returns the neighboring cell information of the device.
@@ -505,7 +507,7 @@ interface ITelephony {
/**
* Returns the all observed cell information of the device.
*/
- List<CellInfo> getAllCellInfo();
+ List<CellInfo> getAllCellInfo(String callingPkg);
/**
* Sets minimum time in milli-seconds between onCellInfoChanged
@@ -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
@@ -769,19 +773,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();
@@ -873,9 +879,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.
@@ -926,10 +933,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.