Merge "API tweaks round 2"

am: 3c0a49ec48

Change-Id: I672796cc23b917efe89eb0d54a7098856221fe63
This commit is contained in:
Hall Liu
2019-03-01 16:47:39 -08:00
committed by android-build-merger
7 changed files with 34 additions and 28 deletions

View File

@@ -41736,7 +41736,7 @@ package android.telecom {
public final class PhoneAccountSuggestion implements android.os.Parcelable {
method public int describeContents();
method public android.telecom.PhoneAccountHandle getPhoneAccountHandle();
method @NonNull public android.telecom.PhoneAccountHandle getPhoneAccountHandle();
method public int getReason();
method public boolean shouldAutoSelect();
method public void writeToParcel(android.os.Parcel, int);

View File

@@ -5413,7 +5413,7 @@ package android.telecom {
}
public final class PhoneAccountSuggestion implements android.os.Parcelable {
ctor public PhoneAccountSuggestion(android.telecom.PhoneAccountHandle, int, boolean);
ctor public PhoneAccountSuggestion(@NonNull android.telecom.PhoneAccountHandle, int, boolean);
}
public class PhoneAccountSuggestionService extends android.app.Service {
@@ -6100,7 +6100,7 @@ package android.telephony {
public final class PhoneNumberRange implements android.os.Parcelable {
ctor public PhoneNumberRange(@NonNull String, @NonNull String, @NonNull String, @NonNull String);
method public int describeContents();
method public boolean matches(String);
method public boolean matches(@NonNull String);
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.telephony.PhoneNumberRange> CREATOR;
}
@@ -6366,6 +6366,7 @@ package android.telephony {
method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimDomain();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst();
method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.util.Pair<java.lang.Integer,java.lang.Integer>> getLogicalToPhysicalSlotMapping();
method public static long getMaxNumberVerificationTimeoutMillis();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getPreferredNetworkTypeBitmap();
method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public int getRadioPowerState();
method public int getSimApplicationState();
@@ -6426,7 +6427,6 @@ package android.telephony {
field public static final String EXTRA_SIM_STATE = "android.telephony.extra.SIM_STATE";
field public static final String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL";
field public static final String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING";
field public static final long MAX_NUMBER_VERIFICATION_TIMEOUT_MILLIS = 60000L; // 0xea60L
field public static final long NETWORK_TYPE_BITMASK_1xRTT = 64L; // 0x40L
field public static final long NETWORK_TYPE_BITMASK_CDMA = 8L; // 0x8L
field public static final long NETWORK_TYPE_BITMASK_EDGE = 2L; // 0x2L
@@ -7710,12 +7710,12 @@ package android.telephony.mbms.vendor {
public class MbmsGroupCallServiceBase extends android.app.Service {
ctor public MbmsGroupCallServiceBase();
method public void dispose(int) throws android.os.RemoteException;
method public int initialize(android.telephony.mbms.MbmsGroupCallSessionCallback, int) throws android.os.RemoteException;
method public int initialize(@NonNull android.telephony.mbms.MbmsGroupCallSessionCallback, int) throws android.os.RemoteException;
method public void onAppCallbackDied(int, int);
method public android.os.IBinder onBind(android.content.Intent);
method public int startGroupCall(int, long, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>, android.telephony.mbms.GroupCallCallback);
method public int startGroupCall(int, long, @NonNull java.util.List<java.lang.Integer>, @NonNull java.util.List<java.lang.Integer>, @NonNull android.telephony.mbms.GroupCallCallback);
method public void stopGroupCall(int, long);
method public void updateGroupCall(int, long, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>);
method public void updateGroupCall(int, long, @NonNull java.util.List<java.lang.Integer>, @NonNull java.util.List<java.lang.Integer>);
}
public class MbmsStreamingServiceBase extends android.os.Binder {

View File

@@ -1440,7 +1440,7 @@ package android.telecom {
}
public final class PhoneAccountSuggestion implements android.os.Parcelable {
ctor public PhoneAccountSuggestion(android.telecom.PhoneAccountHandle, int, boolean);
ctor public PhoneAccountSuggestion(@NonNull android.telecom.PhoneAccountHandle, int, boolean);
}
public class PhoneAccountSuggestionService extends android.app.Service {
@@ -1544,12 +1544,12 @@ package android.telephony.mbms.vendor {
public class MbmsGroupCallServiceBase extends android.app.Service {
ctor public MbmsGroupCallServiceBase();
method public void dispose(int) throws android.os.RemoteException;
method public int initialize(android.telephony.mbms.MbmsGroupCallSessionCallback, int) throws android.os.RemoteException;
method public int initialize(@NonNull android.telephony.mbms.MbmsGroupCallSessionCallback, int) throws android.os.RemoteException;
method public void onAppCallbackDied(int, int);
method public android.os.IBinder onBind(android.content.Intent);
method public int startGroupCall(int, long, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>, android.telephony.mbms.GroupCallCallback);
method public int startGroupCall(int, long, @NonNull java.util.List<java.lang.Integer>, @NonNull java.util.List<java.lang.Integer>, @NonNull android.telephony.mbms.GroupCallCallback);
method public void stopGroupCall(int, long);
method public void updateGroupCall(int, long, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>);
method public void updateGroupCall(int, long, @NonNull java.util.List<java.lang.Integer>, @NonNull java.util.List<java.lang.Integer>);
}
public class MbmsStreamingServiceBase extends android.os.Binder {

View File

@@ -17,6 +17,7 @@
package android.telecom;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.os.Parcel;
@@ -72,7 +73,7 @@ public final class PhoneAccountSuggestion implements Parcelable {
*/
@SystemApi
@TestApi
public PhoneAccountSuggestion(PhoneAccountHandle handle, @SuggestionReason int reason,
public PhoneAccountSuggestion(@NonNull PhoneAccountHandle handle, @SuggestionReason int reason,
boolean shouldAutoSelect) {
this.mHandle = handle;
this.mReason = reason;
@@ -101,7 +102,7 @@ public final class PhoneAccountSuggestion implements Parcelable {
/**
* @return The {@link PhoneAccountHandle} for this suggestion.
*/
public PhoneAccountHandle getPhoneAccountHandle() {
@NonNull public PhoneAccountHandle getPhoneAccountHandle() {
return mHandle;
}

View File

@@ -149,7 +149,7 @@ public final class PhoneNumberRange implements Parcelable {
* @param number A phone number, with or without separators or a country code.
* @return {@code true} if the number matches, {@code false} otherwise.
*/
public boolean matches(String number) {
public boolean matches(@NonNull String number) {
// Check the prefix, make sure it matches either with or without the country code.
String normalizedNumber = number.replaceAll("[^0-9]", "");
String prefixWithCountryCode = mCountryCode + mPrefix;

View File

@@ -1344,12 +1344,7 @@ public class TelephonyManager {
*/
public static final String EXTRA_RECOVERY_ACTION = "recoveryAction";
/**
* The max value for the timeout passed in {@link #requestNumberVerification}.
* @hide
*/
@SystemApi
public static final long MAX_NUMBER_VERIFICATION_TIMEOUT_MILLIS = 60000;
private static final long MAX_NUMBER_VERIFICATION_TIMEOUT_MILLIS = 60000;
/**
* Intent sent when an error occurs that debug tools should log and possibly take further
@@ -1992,6 +1987,15 @@ public class TelephonyManager {
return cmdline;
}
/**
* @return The max value for the timeout passed in {@link #requestNumberVerification}.
* @hide
*/
@SystemApi
public static long getMaxNumberVerificationTimeoutMillis() {
return MAX_NUMBER_VERIFICATION_TIMEOUT_MILLIS;
}
/** Kernel command line */
private static final String sKernelCmdLine = getProcCmdLine();
@@ -5720,8 +5724,8 @@ public class TelephonyManager {
*
* @hide
* @param range The range of phone numbers the caller expects a phone call from.
* @param timeoutMillis The amount of time to wait for such a call, or
* {@link #MAX_NUMBER_VERIFICATION_TIMEOUT_MILLIS}, whichever is lesser.
* @param timeoutMillis The amount of time to wait for such a call, or the value of
* {@link #getMaxNumberVerificationTimeoutMillis()}, whichever is lesser.
* @param executor The {@link Executor} that callbacks should be executed on.
* @param callback The callback to use for delivering results.
*/

View File

@@ -16,6 +16,7 @@
package android.telephony.mbms.vendor;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.app.Service;
@@ -187,7 +188,7 @@ public class MbmsGroupCallServiceBase extends Service {
*
* May throw an {@link IllegalArgumentException} or a {@link SecurityException}, which
* will be intercepted and passed to the app as
* {@link MbmsErrors.InitializationErrors#ERROR_UNABLE_TO_INITIALIZE}
* {@link MbmsErrors.InitializationErrtrors#ERROR_UNABLE_TO_INITIALIZE}
*
* May return any value from {@link MbmsErrors.InitializationErrors}
* or {@link MbmsErrors#SUCCESS}. Non-successful error codes will be passed to the app via
@@ -196,7 +197,7 @@ public class MbmsGroupCallServiceBase extends Service {
* @param callback The callback to use to communicate with the app.
* @param subscriptionId The subscription ID to use.
*/
public int initialize(MbmsGroupCallSessionCallback callback, int subscriptionId)
public int initialize(@NonNull MbmsGroupCallSessionCallback callback, int subscriptionId)
throws RemoteException {
throw new UnsupportedOperationException("Not implemented");
}
@@ -215,8 +216,8 @@ public class MbmsGroupCallServiceBase extends Service {
* @param callback The callback object on which the app wishes to receive updates.
* @return Any error in {@link MbmsErrors.GeneralErrors}
*/
public int startGroupCall(int subscriptionId, long tmgi, List<Integer> saiList,
List<Integer> frequencyList, GroupCallCallback callback) {
public int startGroupCall(int subscriptionId, long tmgi, @NonNull List<Integer> saiList,
@NonNull List<Integer> frequencyList, @NonNull GroupCallCallback callback) {
throw new UnsupportedOperationException("Not implemented");
}
@@ -241,8 +242,8 @@ public class MbmsGroupCallServiceBase extends Service {
* @param saiList New list of SAIs that the call is available on.
* @param frequencyList New list of frequencies that the call is available on.
*/
public void updateGroupCall(int subscriptionId, long tmgi, List<Integer> saiList,
List<Integer> frequencyList) {
public void updateGroupCall(int subscriptionId, long tmgi, @NonNull List<Integer> saiList,
@NonNull List<Integer> frequencyList) {
throw new UnsupportedOperationException("Not implemented");
}