diff options
Diffstat (limited to 'telecomm/java/android/telecom/PhoneAccount.java')
-rw-r--r-- | telecomm/java/android/telecom/PhoneAccount.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java index c20e5ad8ce7c..5024ae27ee49 100644 --- a/telecomm/java/android/telecom/PhoneAccount.java +++ b/telecomm/java/android/telecom/PhoneAccount.java @@ -21,13 +21,13 @@ import static android.Manifest.permission.MODIFY_PHONE_STATE; import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.annotation.SystemApi; -import android.annotation.TestApi; import android.content.Intent; import android.graphics.drawable.Icon; import android.net.Uri; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; +import android.telephony.TelephonyManager; import android.text.TextUtils; import java.util.ArrayList; @@ -48,12 +48,20 @@ import java.util.Objects; public final class PhoneAccount implements Parcelable { /** - * String extra which determines the order in which {@link PhoneAccount}s are sorted + * Integer extra which determines the order in which {@link PhoneAccount}s are sorted * * This is an extras key set via {@link Builder#setExtras} which determines the order in which * {@link PhoneAccount}s from the same {@link ConnectionService} are sorted. The accounts - * are sorted by this key via standard lexicographical order, and this ordering is used to + * are sorted in ascending order by this key, and this ordering is used to * determine priority when a call can be placed via multiple accounts. + * + * When multiple {@link PhoneAccount}s are supplied with the same sort order key, no ordering is + * guaranteed between those {@link PhoneAccount}s. Additionally, no ordering is guaranteed + * between {@link PhoneAccount}s that do not supply this extra, and all such accounts + * will be sorted after the accounts that do supply this extra. + * + * An example of a sort order key is slot index (see {@link TelephonyManager#getSlotIndex()}), + * which is the one used by the cell Telephony stack. * @hide */ @SystemApi @@ -626,7 +634,6 @@ public final class PhoneAccount implements Parcelable { * @hide */ @SystemApi - @TestApi @RequiresPermission(MODIFY_PHONE_STATE) public @NonNull Builder setGroupId(@NonNull String groupId) { if (groupId != null) { |