Loading api/system-current.txt +4 −4 Original line number Original line Diff line number Diff line Loading @@ -5216,10 +5216,10 @@ package android.telephony { method public boolean handlePinMmi(java.lang.String); method public boolean handlePinMmi(java.lang.String); method public boolean handlePinMmiForSubscriber(int, java.lang.String); method public boolean handlePinMmiForSubscriber(int, java.lang.String); method public boolean isDataConnectivityPossible(); method public boolean isDataConnectivityPossible(); method public boolean isIdle(); method public deprecated boolean isIdle(); method public boolean isOffhook(); method public deprecated boolean isOffhook(); method public boolean isRadioOn(); method public deprecated boolean isRadioOn(); method public boolean isRinging(); method public deprecated boolean isRinging(); method public boolean isVideoCallingEnabled(); method public boolean isVideoCallingEnabled(); method public deprecated boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle); method public deprecated boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle); method public boolean needsOtaServiceProvisioning(); method public boolean needsOtaServiceProvisioning(); Loading telephony/java/android/telephony/TelephonyManager.java +44 −16 Original line number Original line Diff line number Diff line Loading @@ -1462,6 +1462,7 @@ public class TelephonyManager { * {@hide} * {@hide} */ */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCurrentPhoneType() { public int getCurrentPhoneType() { return getCurrentPhoneType(getSubId()); return getCurrentPhoneType(getSubId()); } } Loading @@ -1477,7 +1478,17 @@ public class TelephonyManager { * @hide * @hide */ */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCurrentPhoneType(int subId) { public int getCurrentPhoneType(int subId) { return getCurrentPhoneType(subId, false); } /** * getCurrentPhoneType() with optional check if device is voice capable. * * @hide */ public int getCurrentPhoneType(int subId, boolean checkIsVoiceCapable) { int phoneId; int phoneId; if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) { if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) { // if we don't have any sims, we don't have subscriptions, but we // if we don't have any sims, we don't have subscriptions, but we Loading @@ -1486,8 +1497,7 @@ public class TelephonyManager { } else { } else { phoneId = SubscriptionManager.getPhoneId(subId); phoneId = SubscriptionManager.getPhoneId(subId); } } return getCurrentPhoneTypeForSlot(phoneId, checkIsVoiceCapable); return getCurrentPhoneTypeForSlot(phoneId); } } /** /** Loading @@ -1495,11 +1505,15 @@ public class TelephonyManager { * * * @hide * @hide */ */ public int getCurrentPhoneTypeForSlot(int slotIndex) { public int getCurrentPhoneTypeForSlot(int slotIndex, boolean checkIsVoiceCapable) { try{ try{ ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); if (telephony != null) { if (telephony != null) { if (checkIsVoiceCapable) { return telephony.getVoiceCapableActivePhoneTypeForSlot(slotIndex); } else { return telephony.getActivePhoneTypeForSlot(slotIndex); return telephony.getActivePhoneTypeForSlot(slotIndex); } } else { } else { // This can happen when the ITelephony interface is not up yet. // This can happen when the ITelephony interface is not up yet. return getPhoneTypeFromProperty(slotIndex); return getPhoneTypeFromProperty(slotIndex); Loading @@ -1525,10 +1539,7 @@ public class TelephonyManager { * @see #PHONE_TYPE_SIP * @see #PHONE_TYPE_SIP */ */ public int getPhoneType() { public int getPhoneType() { if (!isVoiceCapable()) { return getCurrentPhoneType(getSubId(), true); return PHONE_TYPE_NONE; } return getCurrentPhoneType(); } } private int getPhoneTypeFromProperty() { private int getPhoneTypeFromProperty() { Loading Loading @@ -5857,12 +5868,14 @@ public class TelephonyManager { /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public List<String> getCarrierPackageNamesForIntent(Intent intent) { public List<String> getCarrierPackageNamesForIntent(Intent intent) { return getCarrierPackageNamesForIntentAndPhone(intent, getPhoneId()); return getCarrierPackageNamesForIntentAndPhone(intent, getPhoneId()); } } /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) { public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) { try { try { ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); Loading Loading @@ -5972,7 +5985,11 @@ public class TelephonyManager { } } } } /** @hide */ /** * @deprecated Use {@link android.telecom.TelecomManager#isInCall} instead * @hide */ @Deprecated @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(anyOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Loading @@ -5989,7 +6006,11 @@ public class TelephonyManager { return false; return false; } } /** @hide */ /** * @deprecated Use {@link android.telecom.TelecomManager#isRinging} instead * @hide */ @Deprecated @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(anyOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Loading @@ -6006,7 +6027,11 @@ public class TelephonyManager { return false; return false; } } /** @hide */ /** * @deprecated Use {@link android.telecom.TelecomManager#isInCall} instead * @hide */ @Deprecated @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(anyOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Loading @@ -6023,7 +6048,11 @@ public class TelephonyManager { return true; return true; } } /** @hide */ /** * @deprecated Use {@link android.telephony.TelephonyManager#getServiceState} instead * @hide */ @Deprecated @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(anyOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Loading Loading @@ -6314,6 +6343,7 @@ public class TelephonyManager { /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataConnectivityPossible() { public boolean isDataConnectivityPossible() { try { try { ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); Loading @@ -6328,6 +6358,7 @@ public class TelephonyManager { /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean needsOtaServiceProvisioning() { public boolean needsOtaServiceProvisioning() { try { try { ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); Loading Loading @@ -6430,10 +6461,7 @@ public class TelephonyManager { /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE }) public boolean isVideoCallingEnabled() { public boolean isVideoCallingEnabled() { try { try { ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); Loading telephony/java/com/android/internal/telephony/ITelephony.aidl +22 −0 Original line number Original line Diff line number Diff line Loading @@ -375,6 +375,8 @@ interface ITelephony { /** /** * Report whether data connectivity is possible. * Report whether data connectivity is possible. * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE */ */ boolean isDataConnectivityPossible(int subId); boolean isDataConnectivityPossible(int subId); Loading Loading @@ -413,10 +415,24 @@ interface ITelephony { * Returns the current active phone type as integer for particular slot. * Returns the current active phone type as integer for particular slot. * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE * * @param slotIndex - slot to query. * @param slotIndex - slot to query. */ */ int getActivePhoneTypeForSlot(int slotIndex); int getActivePhoneTypeForSlot(int slotIndex); /** * Returns the current active phone type as integer for particular slot. * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE * * If the device is not voice-capable, return PHONE_TYPE_NONE * * @param slotIndex - slot to query. */ int getVoiceCapableActivePhoneTypeForSlot(int slotIndex); /** /** * Returns the CDMA ERI icon index to display * Returns the CDMA ERI icon index to display * @param callingPackage package making the call. * @param callingPackage package making the call. Loading Loading @@ -464,6 +480,8 @@ interface ITelephony { * Returns true if OTA service provisioning needs to run. * Returns true if OTA service provisioning needs to run. * Only relevant on some technologies, others will always * Only relevant on some technologies, others will always * return false. * return false. * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE */ */ boolean needsOtaServiceProvisioning(); boolean needsOtaServiceProvisioning(); Loading Loading @@ -970,6 +988,8 @@ interface ITelephony { * Returns list of the package names of the carrier apps that should handle the input intent * Returns list of the package names of the carrier apps that should handle the input intent * and have carrier privileges for the given phoneId. * and have carrier privileges for the given phoneId. * * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE * * @param intent Intent that will be sent. * @param intent Intent that will be sent. * @param phoneId The phoneId on which the carrier app has carrier privileges. * @param phoneId The phoneId on which the carrier app has carrier privileges. * @return list of carrier app package names that can handle the intent on phoneId. * @return list of carrier app package names that can handle the intent on phoneId. Loading Loading @@ -1094,6 +1114,8 @@ interface ITelephony { /** /** * Whether video calling has been enabled by the user. * Whether video calling has been enabled by the user. * * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE * * @param callingPackage The package making the call. * @param callingPackage The package making the call. * @return {@code true} if the user has enabled video calling, {@code false} otherwise. * @return {@code true} if the user has enabled video calling, {@code false} otherwise. */ */ Loading Loading
api/system-current.txt +4 −4 Original line number Original line Diff line number Diff line Loading @@ -5216,10 +5216,10 @@ package android.telephony { method public boolean handlePinMmi(java.lang.String); method public boolean handlePinMmi(java.lang.String); method public boolean handlePinMmiForSubscriber(int, java.lang.String); method public boolean handlePinMmiForSubscriber(int, java.lang.String); method public boolean isDataConnectivityPossible(); method public boolean isDataConnectivityPossible(); method public boolean isIdle(); method public deprecated boolean isIdle(); method public boolean isOffhook(); method public deprecated boolean isOffhook(); method public boolean isRadioOn(); method public deprecated boolean isRadioOn(); method public boolean isRinging(); method public deprecated boolean isRinging(); method public boolean isVideoCallingEnabled(); method public boolean isVideoCallingEnabled(); method public deprecated boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle); method public deprecated boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle); method public boolean needsOtaServiceProvisioning(); method public boolean needsOtaServiceProvisioning(); Loading
telephony/java/android/telephony/TelephonyManager.java +44 −16 Original line number Original line Diff line number Diff line Loading @@ -1462,6 +1462,7 @@ public class TelephonyManager { * {@hide} * {@hide} */ */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCurrentPhoneType() { public int getCurrentPhoneType() { return getCurrentPhoneType(getSubId()); return getCurrentPhoneType(getSubId()); } } Loading @@ -1477,7 +1478,17 @@ public class TelephonyManager { * @hide * @hide */ */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCurrentPhoneType(int subId) { public int getCurrentPhoneType(int subId) { return getCurrentPhoneType(subId, false); } /** * getCurrentPhoneType() with optional check if device is voice capable. * * @hide */ public int getCurrentPhoneType(int subId, boolean checkIsVoiceCapable) { int phoneId; int phoneId; if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) { if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) { // if we don't have any sims, we don't have subscriptions, but we // if we don't have any sims, we don't have subscriptions, but we Loading @@ -1486,8 +1497,7 @@ public class TelephonyManager { } else { } else { phoneId = SubscriptionManager.getPhoneId(subId); phoneId = SubscriptionManager.getPhoneId(subId); } } return getCurrentPhoneTypeForSlot(phoneId, checkIsVoiceCapable); return getCurrentPhoneTypeForSlot(phoneId); } } /** /** Loading @@ -1495,11 +1505,15 @@ public class TelephonyManager { * * * @hide * @hide */ */ public int getCurrentPhoneTypeForSlot(int slotIndex) { public int getCurrentPhoneTypeForSlot(int slotIndex, boolean checkIsVoiceCapable) { try{ try{ ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); if (telephony != null) { if (telephony != null) { if (checkIsVoiceCapable) { return telephony.getVoiceCapableActivePhoneTypeForSlot(slotIndex); } else { return telephony.getActivePhoneTypeForSlot(slotIndex); return telephony.getActivePhoneTypeForSlot(slotIndex); } } else { } else { // This can happen when the ITelephony interface is not up yet. // This can happen when the ITelephony interface is not up yet. return getPhoneTypeFromProperty(slotIndex); return getPhoneTypeFromProperty(slotIndex); Loading @@ -1525,10 +1539,7 @@ public class TelephonyManager { * @see #PHONE_TYPE_SIP * @see #PHONE_TYPE_SIP */ */ public int getPhoneType() { public int getPhoneType() { if (!isVoiceCapable()) { return getCurrentPhoneType(getSubId(), true); return PHONE_TYPE_NONE; } return getCurrentPhoneType(); } } private int getPhoneTypeFromProperty() { private int getPhoneTypeFromProperty() { Loading Loading @@ -5857,12 +5868,14 @@ public class TelephonyManager { /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public List<String> getCarrierPackageNamesForIntent(Intent intent) { public List<String> getCarrierPackageNamesForIntent(Intent intent) { return getCarrierPackageNamesForIntentAndPhone(intent, getPhoneId()); return getCarrierPackageNamesForIntentAndPhone(intent, getPhoneId()); } } /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) { public List<String> getCarrierPackageNamesForIntentAndPhone(Intent intent, int phoneId) { try { try { ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); Loading Loading @@ -5972,7 +5985,11 @@ public class TelephonyManager { } } } } /** @hide */ /** * @deprecated Use {@link android.telecom.TelecomManager#isInCall} instead * @hide */ @Deprecated @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(anyOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Loading @@ -5989,7 +6006,11 @@ public class TelephonyManager { return false; return false; } } /** @hide */ /** * @deprecated Use {@link android.telecom.TelecomManager#isRinging} instead * @hide */ @Deprecated @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(anyOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Loading @@ -6006,7 +6027,11 @@ public class TelephonyManager { return false; return false; } } /** @hide */ /** * @deprecated Use {@link android.telecom.TelecomManager#isInCall} instead * @hide */ @Deprecated @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(anyOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Loading @@ -6023,7 +6048,11 @@ public class TelephonyManager { return true; return true; } } /** @hide */ /** * @deprecated Use {@link android.telephony.TelephonyManager#getServiceState} instead * @hide */ @Deprecated @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(anyOf = { android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, Loading Loading @@ -6314,6 +6343,7 @@ public class TelephonyManager { /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataConnectivityPossible() { public boolean isDataConnectivityPossible() { try { try { ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); Loading @@ -6328,6 +6358,7 @@ public class TelephonyManager { /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean needsOtaServiceProvisioning() { public boolean needsOtaServiceProvisioning() { try { try { ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); Loading Loading @@ -6430,10 +6461,7 @@ public class TelephonyManager { /** @hide */ /** @hide */ @SystemApi @SystemApi @RequiresPermission(anyOf = { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE }) public boolean isVideoCallingEnabled() { public boolean isVideoCallingEnabled() { try { try { ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony(); Loading
telephony/java/com/android/internal/telephony/ITelephony.aidl +22 −0 Original line number Original line Diff line number Diff line Loading @@ -375,6 +375,8 @@ interface ITelephony { /** /** * Report whether data connectivity is possible. * Report whether data connectivity is possible. * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE */ */ boolean isDataConnectivityPossible(int subId); boolean isDataConnectivityPossible(int subId); Loading Loading @@ -413,10 +415,24 @@ interface ITelephony { * Returns the current active phone type as integer for particular slot. * Returns the current active phone type as integer for particular slot. * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE * * @param slotIndex - slot to query. * @param slotIndex - slot to query. */ */ int getActivePhoneTypeForSlot(int slotIndex); int getActivePhoneTypeForSlot(int slotIndex); /** * Returns the current active phone type as integer for particular slot. * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE * * If the device is not voice-capable, return PHONE_TYPE_NONE * * @param slotIndex - slot to query. */ int getVoiceCapableActivePhoneTypeForSlot(int slotIndex); /** /** * Returns the CDMA ERI icon index to display * Returns the CDMA ERI icon index to display * @param callingPackage package making the call. * @param callingPackage package making the call. Loading Loading @@ -464,6 +480,8 @@ interface ITelephony { * Returns true if OTA service provisioning needs to run. * Returns true if OTA service provisioning needs to run. * Only relevant on some technologies, others will always * Only relevant on some technologies, others will always * return false. * return false. * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE */ */ boolean needsOtaServiceProvisioning(); boolean needsOtaServiceProvisioning(); Loading Loading @@ -970,6 +988,8 @@ interface ITelephony { * Returns list of the package names of the carrier apps that should handle the input intent * Returns list of the package names of the carrier apps that should handle the input intent * and have carrier privileges for the given phoneId. * and have carrier privileges for the given phoneId. * * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE * * @param intent Intent that will be sent. * @param intent Intent that will be sent. * @param phoneId The phoneId on which the carrier app has carrier privileges. * @param phoneId The phoneId on which the carrier app has carrier privileges. * @return list of carrier app package names that can handle the intent on phoneId. * @return list of carrier app package names that can handle the intent on phoneId. Loading Loading @@ -1094,6 +1114,8 @@ interface ITelephony { /** /** * Whether video calling has been enabled by the user. * Whether video calling has been enabled by the user. * * * <p>Requires that the calling app has READ_PRIVILEGED_PHONE_STATE * * @param callingPackage The package making the call. * @param callingPackage The package making the call. * @return {@code true} if the user has enabled video calling, {@code false} otherwise. * @return {@code true} if the user has enabled video calling, {@code false} otherwise. */ */ Loading