diff --git a/api/current.txt b/api/current.txt index 8e43167584a3d..3c8e99271c8ba 100755 --- a/api/current.txt +++ b/api/current.txt @@ -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); diff --git a/api/system-current.txt b/api/system-current.txt index 67ff89f19a971..b287527d21b7d 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -5410,7 +5410,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 { @@ -6097,7 +6097,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 CREATOR; } @@ -6363,6 +6363,7 @@ package android.telephony { method @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> 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(); @@ -6423,7 +6424,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 @@ -7701,12 +7701,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.util.List, android.telephony.mbms.GroupCallCallback); + method public int startGroupCall(int, long, @NonNull java.util.List, @NonNull java.util.List, @NonNull android.telephony.mbms.GroupCallCallback); method public void stopGroupCall(int, long); - method public void updateGroupCall(int, long, java.util.List, java.util.List); + method public void updateGroupCall(int, long, @NonNull java.util.List, @NonNull java.util.List); } public class MbmsStreamingServiceBase extends android.os.Binder { diff --git a/api/test-current.txt b/api/test-current.txt index 400046bad74ae..34d737f76ddff 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -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.util.List, android.telephony.mbms.GroupCallCallback); + method public int startGroupCall(int, long, @NonNull java.util.List, @NonNull java.util.List, @NonNull android.telephony.mbms.GroupCallCallback); method public void stopGroupCall(int, long); - method public void updateGroupCall(int, long, java.util.List, java.util.List); + method public void updateGroupCall(int, long, @NonNull java.util.List, @NonNull java.util.List); } public class MbmsStreamingServiceBase extends android.os.Binder { diff --git a/telecomm/java/android/telecom/PhoneAccountSuggestion.java b/telecomm/java/android/telecom/PhoneAccountSuggestion.java index b401bcf0f8761..f23f4c9b9e9e3 100644 --- a/telecomm/java/android/telecom/PhoneAccountSuggestion.java +++ b/telecomm/java/android/telecom/PhoneAccountSuggestion.java @@ -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; } diff --git a/telephony/java/android/telephony/PhoneNumberRange.java b/telephony/java/android/telephony/PhoneNumberRange.java index dba803b2bc199..12df9b5b33fe2 100644 --- a/telephony/java/android/telephony/PhoneNumberRange.java +++ b/telephony/java/android/telephony/PhoneNumberRange.java @@ -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; diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index b8184d9e6186b..1eea0e2dae46c 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -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(); @@ -5718,8 +5722,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. */ diff --git a/telephony/java/android/telephony/mbms/vendor/MbmsGroupCallServiceBase.java b/telephony/java/android/telephony/mbms/vendor/MbmsGroupCallServiceBase.java index e86a47d5bfa12..1335b52673d24 100644 --- a/telephony/java/android/telephony/mbms/vendor/MbmsGroupCallServiceBase.java +++ b/telephony/java/android/telephony/mbms/vendor/MbmsGroupCallServiceBase.java @@ -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 saiList, - List frequencyList, GroupCallCallback callback) { + public int startGroupCall(int subscriptionId, long tmgi, @NonNull List saiList, + @NonNull List 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 saiList, - List frequencyList) { + public void updateGroupCall(int subscriptionId, long tmgi, @NonNull List saiList, + @NonNull List frequencyList) { throw new UnsupportedOperationException("Not implemented"); }