summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2018-01-11 20:22:05 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-01-11 20:22:05 +0000
commitff9bc3a88c32da96cc490b1f059538d78012c47b (patch)
tree1f1b6df175fca202cfcfa35680ad2c82df4ac72e
parent5e093d997adcd0cd5d83720eaaf0f282f92a9630 (diff)
parent17a26c715f26378cd9487a721f7d4a2c24088dde (diff)
Merge "Make Bluetooth constants used by gmscore a system api"
-rw-r--r--api/system-current.txt8
-rw-r--r--core/java/android/bluetooth/BluetoothDevice.java3
-rw-r--r--core/java/android/bluetooth/BluetoothHeadset.java4
-rw-r--r--core/java/android/bluetooth/BluetoothProfile.java3
4 files changed, 16 insertions, 2 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index 2a757efee4e9..4eb5c0875e6d 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -628,6 +628,9 @@ package android.bluetooth {
method public boolean isEncrypted();
method public boolean removeBond();
method public boolean setPhonebookAccessPermission(int);
+ field public static final int ACCESS_ALLOWED = 1; // 0x1
+ field public static final int ACCESS_REJECTED = 2; // 0x2
+ field public static final int ACCESS_UNKNOWN = 0; // 0x0
}
public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile {
@@ -636,6 +639,11 @@ package android.bluetooth {
method public boolean setPriority(android.bluetooth.BluetoothDevice, int);
}
+ public abstract interface BluetoothProfile {
+ field public static final int PRIORITY_OFF = 0; // 0x0
+ field public static final int PRIORITY_ON = 100; // 0x64
+ }
+
}
package android.bluetooth.le {
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index ad7a93cd6bbd..9b736b7e5f9e 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -618,6 +618,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
+ @SystemApi
public static final int ACCESS_UNKNOWN = 0;
/**
@@ -626,6 +627,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
+ @SystemApi
public static final int ACCESS_ALLOWED = 1;
/**
@@ -634,6 +636,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
+ @SystemApi
public static final int ACCESS_REJECTED = 2;
/**
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index c94540a48ec1..a68f485f4374 100644
--- a/core/java/android/bluetooth/BluetoothHeadset.java
+++ b/core/java/android/bluetooth/BluetoothHeadset.java
@@ -556,8 +556,8 @@ public final class BluetoothHeadset implements BluetoothProfile {
* Set priority of the profile
*
* <p> The device should already be paired.
- * Priority can be one of {@link #PRIORITY_ON} or
- * {@link #PRIORITY_OFF},
+ * Priority can be one of {@link BluetoothProfile#PRIORITY_ON} or
+ * {@link BluetoothProfile#PRIORITY_OFF},
*
* <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}
* permission.
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index 41cf809afd7f..0e2263f773b8 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -19,6 +19,7 @@ package android.bluetooth;
import android.Manifest;
import android.annotation.RequiresPermission;
+import android.annotation.SystemApi;
import java.util.List;
@@ -185,6 +186,7 @@ public interface BluetoothProfile {
*
* @hide
**/
+ @SystemApi
public static final int PRIORITY_ON = 100;
/**
@@ -193,6 +195,7 @@ public interface BluetoothProfile {
*
* @hide
**/
+ @SystemApi
public static final int PRIORITY_OFF = 0;
/**