OSDN Git Service

API tweaks
authorHall Liu <hallliu@google.com>
Wed, 27 Feb 2019 01:58:53 +0000 (17:58 -0800)
committerHall Liu <hallliu@google.com>
Tue, 5 Mar 2019 01:29:52 +0000 (17:29 -0800)
* Make the PhoneAccountSuggestion ctor public
* Change protection level of the bind-suggestion-service permission to
signature-only.

Fixes: 126442573
Fixes: 126442403
Test: CTS
Change-Id: Ie1616e86df6814e4aa05659d4aa3aca1959519d2

api/current.txt
api/system-current.txt
api/test-current.txt
core/res/AndroidManifest.xml
telecomm/java/android/telecom/PhoneAccountSuggestion.java

index 9ebd4b4..8ab7b19 100755 (executable)
@@ -41736,6 +41736,7 @@ package android.telecom {
   }
 
   public final class PhoneAccountSuggestion implements android.os.Parcelable {
+    ctor public PhoneAccountSuggestion(@NonNull android.telecom.PhoneAccountHandle, int, boolean);
     method public int describeContents();
     method @NonNull public android.telecom.PhoneAccountHandle getPhoneAccountHandle();
     method public int getReason();
index fd6a37c..46c420a 100644 (file)
@@ -5412,10 +5412,6 @@ package android.telecom {
     field public static final int CAPABILITY_MULTI_USER = 32; // 0x20
   }
 
-  public final class PhoneAccountSuggestion implements android.os.Parcelable {
-    ctor public PhoneAccountSuggestion(@NonNull android.telecom.PhoneAccountHandle, int, boolean);
-  }
-
   public class PhoneAccountSuggestionService extends android.app.Service {
     ctor public PhoneAccountSuggestionService();
     method public void onAccountSuggestionRequest(@NonNull String);
index 271f7cb..7391025 100644 (file)
@@ -1443,10 +1443,6 @@ package android.telecom {
     method public android.telecom.Connection getPrimaryConnection();
   }
 
-  public final class PhoneAccountSuggestion implements android.os.Parcelable {
-    ctor public PhoneAccountSuggestion(@NonNull android.telecom.PhoneAccountHandle, int, boolean);
-  }
-
   public class PhoneAccountSuggestionService extends android.app.Service {
     ctor public PhoneAccountSuggestionService();
     method public void onAccountSuggestionRequest(@NonNull String);
index e40d97b..35bc46a 100644 (file)
 
     <!-- Must be required by a {@link android.telecom.PhoneAccountSuggestionService},
          to ensure that only the system can bind to it.
-         <p>Protection level: signature|privileged
+         <p>Protection level: signature
          @SystemApi
          @hide
     -->
     <permission android:name="android.permission.BIND_PHONE_ACCOUNT_SUGGESTION_SERVICE"
-        android:protectionLevel="signature|privileged" />
+        android:protectionLevel="signature" />
 
     <!-- Must be required by a {@link android.telecom.CallRedirectionService},
          to ensure that only the system can bind to it.
index f23f4c9..563c2dc 100644 (file)
@@ -18,8 +18,6 @@ package android.telecom;
 
 import android.annotation.IntDef;
 import android.annotation.NonNull;
-import android.annotation.SystemApi;
-import android.annotation.TestApi;
 import android.os.Parcel;
 import android.os.Parcelable;
 
@@ -69,10 +67,15 @@ public final class PhoneAccountSuggestion implements Parcelable {
     private boolean mShouldAutoSelect;
 
     /**
-     * @hide
+     * Creates a new instance of {@link PhoneAccountSuggestion}. This constructor is intended for
+     * use by apps implementing a {@link PhoneAccountSuggestionService}, and generally should not be
+     * used by dialer apps other than for testing purposes.
+     *
+     * @param handle The {@link PhoneAccountHandle} for this suggestion.
+     * @param reason The reason for this suggestion
+     * @param shouldAutoSelect Whether the dialer should automatically place the call using this
+     *                         account. See {@link #shouldAutoSelect()}.
      */
-    @SystemApi
-    @TestApi
     public PhoneAccountSuggestion(@NonNull PhoneAccountHandle handle, @SuggestionReason int reason,
             boolean shouldAutoSelect) {
         this.mHandle = handle;