summaryrefslogtreecommitdiffstats
path: root/telephony/java/android
diff options
context:
space:
mode:
Diffstat (limited to 'telephony/java/android')
-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
3 files changed, 48 insertions, 14 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);
}