Merge "Update VVM API"
This commit is contained in:
@@ -38156,7 +38156,7 @@ package android.telephony {
|
||||
method public int getSimState();
|
||||
method public int getSimState(int);
|
||||
method public java.lang.String getSubscriberId();
|
||||
method public java.lang.String getVisualVoicemailPackageName(android.telecom.PhoneAccountHandle);
|
||||
method public java.lang.String getVisualVoicemailPackageName();
|
||||
method public java.lang.String getVoiceMailAlphaTag();
|
||||
method public java.lang.String getVoiceMailNumber();
|
||||
method public int getVoiceNetworkType();
|
||||
@@ -38292,9 +38292,6 @@ package android.telephony {
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.telephony.VisualVoicemailSmsFilterSettings> CREATOR;
|
||||
field public static final java.lang.String DEFAULT_CLIENT_PREFIX = "//VVM";
|
||||
field public static final int DEFAULT_DESTINATION_PORT = -1; // 0xffffffff
|
||||
field public static final java.util.List<java.lang.String> DEFAULT_ORIGINATING_NUMBERS;
|
||||
field public static final int DESTINATION_PORT_ANY = -1; // 0xffffffff
|
||||
field public static final int DESTINATION_PORT_DATA_SMS = -2; // 0xfffffffe
|
||||
field public final java.lang.String clientPrefix;
|
||||
|
||||
@@ -41370,7 +41370,7 @@ package android.telephony {
|
||||
method public int getSimState(int);
|
||||
method public java.lang.String getSubscriberId();
|
||||
method public java.util.List<android.telephony.TelephonyHistogram> getTelephonyHistograms();
|
||||
method public java.lang.String getVisualVoicemailPackageName(android.telecom.PhoneAccountHandle);
|
||||
method public java.lang.String getVisualVoicemailPackageName();
|
||||
method public java.lang.String getVoiceMailAlphaTag();
|
||||
method public java.lang.String getVoiceMailNumber();
|
||||
method public int getVoiceNetworkType();
|
||||
@@ -41537,9 +41537,6 @@ package android.telephony {
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.telephony.VisualVoicemailSmsFilterSettings> CREATOR;
|
||||
field public static final java.lang.String DEFAULT_CLIENT_PREFIX = "//VVM";
|
||||
field public static final int DEFAULT_DESTINATION_PORT = -1; // 0xffffffff
|
||||
field public static final java.util.List<java.lang.String> DEFAULT_ORIGINATING_NUMBERS;
|
||||
field public static final int DESTINATION_PORT_ANY = -1; // 0xffffffff
|
||||
field public static final int DESTINATION_PORT_DATA_SMS = -2; // 0xfffffffe
|
||||
field public final java.lang.String clientPrefix;
|
||||
|
||||
@@ -38255,7 +38255,7 @@ package android.telephony {
|
||||
method public int getSimState();
|
||||
method public int getSimState(int);
|
||||
method public java.lang.String getSubscriberId();
|
||||
method public java.lang.String getVisualVoicemailPackageName(android.telecom.PhoneAccountHandle);
|
||||
method public java.lang.String getVisualVoicemailPackageName();
|
||||
method public java.lang.String getVoiceMailAlphaTag();
|
||||
method public java.lang.String getVoiceMailNumber();
|
||||
method public int getVoiceNetworkType();
|
||||
@@ -38391,9 +38391,6 @@ package android.telephony {
|
||||
method public int describeContents();
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.telephony.VisualVoicemailSmsFilterSettings> CREATOR;
|
||||
field public static final java.lang.String DEFAULT_CLIENT_PREFIX = "//VVM";
|
||||
field public static final int DEFAULT_DESTINATION_PORT = -1; // 0xffffffff
|
||||
field public static final java.util.List<java.lang.String> DEFAULT_ORIGINATING_NUMBERS;
|
||||
field public static final int DESTINATION_PORT_ANY = -1; // 0xffffffff
|
||||
field public static final int DESTINATION_PORT_DATA_SMS = -2; // 0xfffffffe
|
||||
field public final java.lang.String clientPrefix;
|
||||
|
||||
@@ -24,6 +24,8 @@ import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.SdkConstant;
|
||||
import android.annotation.SdkConstant.SdkConstantType;
|
||||
import android.annotation.WorkerThread;
|
||||
import android.annotation.SystemApi;
|
||||
import android.app.ActivityThread;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ContentResolver;
|
||||
@@ -1508,7 +1510,10 @@ public class TelephonyManager {
|
||||
|
||||
|
||||
/**
|
||||
* Returns the network specifier of the subscription ID pinned to the TelephonyManager.
|
||||
* Returns the network specifier of the subscription ID pinned to the TelephonyManager. The
|
||||
* network specifier is used by {@link
|
||||
* android.net.NetworkRequest.Builder#setNetworkSpecifier(String)} to create a {@link
|
||||
* android.net.NetworkRequest} that connects through the subscription.
|
||||
*
|
||||
* @see android.net.NetworkRequest.Builder#setNetworkSpecifier(String)
|
||||
* @see #createForSubscriptionId(int)
|
||||
@@ -1519,7 +1524,9 @@ public class TelephonyManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the carrier config of the subscription ID pinned to the TelephonyManager.
|
||||
* Returns the carrier config of the subscription ID pinned to the TelephonyManager. If an
|
||||
* invalid subscription ID is pinned to the TelephonyManager, the returned config will contain
|
||||
* default values.
|
||||
*
|
||||
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE
|
||||
* READ_PHONE_STATE}
|
||||
@@ -1528,6 +1535,7 @@ public class TelephonyManager {
|
||||
* @see #createForSubscriptionId(int)
|
||||
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
|
||||
*/
|
||||
@WorkerThread
|
||||
public PersistableBundle getCarrierConfig() {
|
||||
CarrierConfigManager carrierConfigManager = mContext
|
||||
.getSystemService(CarrierConfigManager.class);
|
||||
@@ -2714,19 +2722,24 @@ public class TelephonyManager {
|
||||
|
||||
|
||||
/**
|
||||
* Returns the package responsible of processing visual voicemail for the phone account.
|
||||
* Returns the package responsible of processing visual voicemail for the subscription ID pinned
|
||||
* to the TelephonyManager. Returns {@code null} when there is no package responsible for
|
||||
* processing visual voicemail for the subscription.
|
||||
*
|
||||
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE
|
||||
* READ_PHONE_STATE}
|
||||
*
|
||||
* @see #createForSubscriptionId(int)
|
||||
* @see #createForPhoneAccountHandle(PhoneAccountHandle)
|
||||
* @see VisualVoicemailService
|
||||
*/
|
||||
@Nullable
|
||||
public String getVisualVoicemailPackageName(PhoneAccountHandle phoneAccountHandle) {
|
||||
public String getVisualVoicemailPackageName() {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null) {
|
||||
return telephony
|
||||
.getVisualVoicemailPackageName(mContext.getOpPackageName(),
|
||||
phoneAccountHandle);
|
||||
.getVisualVoicemailPackageName(mContext.getOpPackageName(), mSubId);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
} catch (NullPointerException ex) {
|
||||
|
||||
@@ -63,7 +63,8 @@ public final class VisualVoicemailSms implements Parcelable {
|
||||
|
||||
/**
|
||||
* The key-value pairs sent by the SMS, or {@code null} if the framework cannot parse the SMS as
|
||||
* voicemail but the carrier pattern indicates it is.
|
||||
* voicemail but the carrier pattern indicates it is. The interpretation of the fields is
|
||||
* carrier dependent.
|
||||
*/
|
||||
public Bundle getFields() {
|
||||
return mFields;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
package android.telephony;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
@@ -55,8 +54,17 @@ public final class VisualVoicemailSmsFilterSettings implements Parcelable {
|
||||
*/
|
||||
public static final int DESTINATION_PORT_DATA_SMS = -2;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static final String DEFAULT_CLIENT_PREFIX = "//VVM";
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static final List<String> DEFAULT_ORIGINATING_NUMBERS = Collections.emptyList();
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static final int DEFAULT_DESTINATION_PORT = DESTINATION_PORT_ANY;
|
||||
|
||||
/**
|
||||
|
||||
@@ -504,8 +504,7 @@ interface ITelephony {
|
||||
boolean isVisualVoicemailEnabled(String callingPackage,
|
||||
in PhoneAccountHandle accountHandle);
|
||||
|
||||
String getVisualVoicemailPackageName(String callingPackage,
|
||||
in PhoneAccountHandle phoneAccountHandle);
|
||||
String getVisualVoicemailPackageName(String callingPackage, int subId);
|
||||
|
||||
// Not oneway, caller needs to make sure the vaule is set before receiving a SMS
|
||||
void enableVisualVoicemailSmsFilter(String callingPackage, int subId,
|
||||
|
||||
Reference in New Issue
Block a user