diff options
author | Rahul Sabnis <rahulsabnis@google.com> | 2019-11-27 18:09:33 -0800 |
---|---|---|
committer | Rahul Sabnis <rahulsabnis@google.com> | 2019-12-02 14:44:54 -0800 |
commit | e8bac9b871a87aa38e99956c380069c3c377eb79 (patch) | |
tree | 65c758b3036ff1c411aa39a1625c91911a53799c /framework/java/android/bluetooth/BluetoothProfile.java | |
parent | 3106c751721e765670484d49f559abc61d92fd1a (diff) |
Rename priority to connection policy in bluetooth apis
Bug: 145005327
Test: Manual
Change-Id: I43ad57feb7dd70f39005ad7a01bc7dac6fb7b639
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothProfile.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothProfile.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothProfile.java b/framework/java/android/bluetooth/BluetoothProfile.java index f1ac765274..097a3677ac 100644 --- a/framework/java/android/bluetooth/BluetoothProfile.java +++ b/framework/java/android/bluetooth/BluetoothProfile.java @@ -225,7 +225,9 @@ public interface BluetoothProfile { * and outgoing connections for the profile * * @hide + * @deprecated Replaced with {@link #CONNECTION_POLICY_ALLOWED} **/ + @Deprecated @SystemApi int PRIORITY_ON = 100; @@ -234,7 +236,9 @@ public interface BluetoothProfile { * connections and outgoing connections for the profile. * * @hide + * @deprecated Replaced with {@link #CONNECTION_POLICY_FORBIDDEN} **/ + @Deprecated @SystemApi int PRIORITY_OFF = 0; @@ -246,6 +250,38 @@ public interface BluetoothProfile { @UnsupportedAppUsage int PRIORITY_UNDEFINED = -1; + /** @hide */ + @IntDef(prefix = "CONNECTION_POLICY_", value = {CONNECTION_POLICY_ALLOWED, + CONNECTION_POLICY_FORBIDDEN, CONNECTION_POLICY_UNKNOWN}) + @Retention(RetentionPolicy.SOURCE) + public @interface ConnectionPolicy{} + + /** + * Default connection policy for devices that allow incoming and outgoing connections + * for the profile + * + * @hide + **/ + @SystemApi + int CONNECTION_POLICY_ALLOWED = 100; + + /** + * Default connection policy for devices that do not allow incoming or outgoing connections + * for the profile. + * + * @hide + **/ + @SystemApi + int CONNECTION_POLICY_FORBIDDEN = 0; + + /** + * Default connection policy when not set or when the device is unpaired + * + * @hide + */ + @SystemApi + int CONNECTION_POLICY_UNKNOWN = -1; + /** * Get connected devices for this specific profile. * |