summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hall Liu <hallliu@google.com> 2019-02-26 17:58:53 -0800
committer Hall Liu <hallliu@google.com> 2019-03-06 11:32:18 -0800
commitee609ff1c1e7dc972a621dc23afcd483fcfd115b (patch)
tree4ddc4fc7cfe8e8b7e52b1d88c6fb7f8b63427338
parentd14d29ca8fa5f823cee1c5eabe139e2733374f71 (diff)
API tweaks
* 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: Ic6d44989efd28420a5e9e7e9c365318538d140bb
-rwxr-xr-xapi/current.txt1
-rw-r--r--api/system-current.txt4
-rw-r--r--api/test-current.txt4
-rw-r--r--core/res/AndroidManifest.xml4
-rw-r--r--telecomm/java/android/telecom/PhoneAccountSuggestion.java13
5 files changed, 11 insertions, 15 deletions
diff --git a/api/current.txt b/api/current.txt
index 9ebd4b4f18be..8ab7b19b70e4 100755
--- a/api/current.txt
+++ b/api/current.txt
@@ -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();
diff --git a/api/system-current.txt b/api/system-current.txt
index fd6a37c135a0..46c420a572cd 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -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);
diff --git a/api/test-current.txt b/api/test-current.txt
index 271f7cbfa823..73910254b850 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -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);
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index e40d97bb1396..35bc46ae33ab 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1839,12 +1839,12 @@
<!-- 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.
diff --git a/telecomm/java/android/telecom/PhoneAccountSuggestion.java b/telecomm/java/android/telecom/PhoneAccountSuggestion.java
index f23f4c9b9e9e..563c2dc9ee5e 100644
--- a/telecomm/java/android/telecom/PhoneAccountSuggestion.java
+++ b/telecomm/java/android/telecom/PhoneAccountSuggestion.java
@@ -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;