Merge "Add getVisualVoicemailSettings()" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1c35554c5f
@@ -43719,6 +43719,7 @@ package android.telephony {
|
||||
method public java.lang.String getSubscriberId();
|
||||
method public java.util.List<android.telephony.TelephonyHistogram> getTelephonyHistograms();
|
||||
method public java.lang.String getVisualVoicemailPackageName();
|
||||
method public android.os.Bundle getVisualVoicemailSettings();
|
||||
method public java.lang.String getVoiceMailAlphaTag();
|
||||
method public java.lang.String getVoiceMailNumber();
|
||||
method public int getVoiceNetworkType();
|
||||
@@ -43812,7 +43813,9 @@ package android.telephony {
|
||||
field public static final java.lang.String EXTRA_STATE_IDLE;
|
||||
field public static final java.lang.String EXTRA_STATE_OFFHOOK;
|
||||
field public static final java.lang.String EXTRA_STATE_RINGING;
|
||||
field public static final java.lang.String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL";
|
||||
field public static final java.lang.String EXTRA_VOICEMAIL_NUMBER = "android.telephony.extra.VOICEMAIL_NUMBER";
|
||||
field public static final java.lang.String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING";
|
||||
field public static final java.lang.String METADATA_HIDE_VOICEMAIL_SETTINGS_MENU = "android.telephony.HIDE_VOICEMAIL_SETTINGS_MENU";
|
||||
field public static final int NETWORK_TYPE_1xRTT = 7; // 0x7
|
||||
field public static final int NETWORK_TYPE_CDMA = 4; // 0x4
|
||||
|
||||
@@ -877,6 +877,30 @@ public class TelephonyManager {
|
||||
*/
|
||||
public static final String VVM_TYPE_CVVM = "vvm_type_cvvm";
|
||||
|
||||
/**
|
||||
* Key in bundle returned by {@link #getVisualVoicemailPackageName()}, indicating whether visual
|
||||
* voicemail was enabled or disabled by the user. If the user never explicitly changed this
|
||||
* setting, this key will not exist.
|
||||
*
|
||||
* @see #getVisualVoicemailSettings()
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL =
|
||||
"android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL";
|
||||
|
||||
/**
|
||||
* Key in bundle returned by {@link #getVisualVoicemailPackageName()}, indicating the voicemail
|
||||
* access PIN scrambled during the auto provisioning process. The user is expected to reset
|
||||
* their PIN if this value is not {@code null}.
|
||||
*
|
||||
* @see #getVisualVoicemailSettings()
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public static final String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING =
|
||||
"android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING";
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@@ -2747,6 +2771,33 @@ public class TelephonyManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an opaque bundle of settings formerly used by the visual voicemail client for the
|
||||
* subscription ID pinned to the TelephonyManager, or {@code null} if the subscription ID is
|
||||
* invalid. This method allows the system dialer to migrate settings out of the pre-O visual
|
||||
* voicemail client in telephony.
|
||||
*
|
||||
* <p>Requires the caller to be the system dialer.
|
||||
*
|
||||
* @see #KEY_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL
|
||||
* @see #KEY_VOICEMAIL_SCRAMBLED_PIN_STRING
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@Nullable
|
||||
public Bundle getVisualVoicemailSettings(){
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null) {
|
||||
return telephony
|
||||
.getVisualVoicemailSettings(mContext.getOpPackageName(), mSubId);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
} catch (NullPointerException ex) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the package responsible of processing visual voicemail for the subscription ID pinned
|
||||
|
||||
@@ -498,6 +498,8 @@ interface ITelephony {
|
||||
*/
|
||||
boolean isConcurrentVoiceAndDataAllowed(int subId);
|
||||
|
||||
Bundle getVisualVoicemailSettings(String callingPackage, int subId);
|
||||
|
||||
String getVisualVoicemailPackageName(String callingPackage, int subId);
|
||||
|
||||
// Not oneway, caller needs to make sure the vaule is set before receiving a SMS
|
||||
|
||||
Reference in New Issue
Block a user