Loading framework/java/android/bluetooth/BluetoothA2dp.java +2 −2 Original line number Diff line number Diff line Loading @@ -434,7 +434,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * {@inheritDoc} */ @Override public int getConnectionState(BluetoothDevice device) { public @BtProfileState int getConnectionState(BluetoothDevice device) { if (VDBG) log("getState(" + device + ")"); try { mServiceLock.readLock().lock(); Loading Loading @@ -689,7 +689,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @hide */ @UnsupportedAppUsage public BluetoothCodecStatus getCodecStatus(BluetoothDevice device) { public @Nullable BluetoothCodecStatus getCodecStatus(BluetoothDevice device) { if (DBG) Log.d(TAG, "getCodecStatus(" + device + ")"); try { mServiceLock.readLock().lock(); Loading framework/java/android/bluetooth/BluetoothCodecStatus.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.bluetooth; import android.annotation.Nullable; import android.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; Loading @@ -42,7 +43,7 @@ public final class BluetoothCodecStatus implements Parcelable { public static final String EXTRA_CODEC_STATUS = "android.bluetooth.codec.extra.CODEC_STATUS"; private final BluetoothCodecConfig mCodecConfig; private final @Nullable BluetoothCodecConfig mCodecConfig; private final BluetoothCodecConfig[] mCodecsLocalCapabilities; private final BluetoothCodecConfig[] mCodecsSelectableCapabilities; Loading Loading @@ -140,7 +141,7 @@ public final class BluetoothCodecStatus implements Parcelable { * @return the current codec configuration */ @UnsupportedAppUsage public BluetoothCodecConfig getCodecConfig() { public @Nullable BluetoothCodecConfig getCodecConfig() { return mCodecConfig; } Loading framework/java/android/bluetooth/BluetoothProfile.java +13 −0 Original line number Diff line number Diff line Loading @@ -18,11 +18,14 @@ package android.bluetooth; import android.Manifest; import android.annotation.IntDef; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.annotation.UnsupportedAppUsage; import android.os.Build; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.List; /** Loading Loading @@ -60,6 +63,16 @@ public interface BluetoothProfile { /** The profile is in disconnecting state */ int STATE_DISCONNECTING = 3; /** @hide */ @IntDef({ STATE_DISCONNECTED, STATE_CONNECTING, STATE_CONNECTED, STATE_DISCONNECTING, }) @Retention(RetentionPolicy.SOURCE) public @interface BtProfileState {} /** * Headset and Handsfree profile */ Loading Loading
framework/java/android/bluetooth/BluetoothA2dp.java +2 −2 Original line number Diff line number Diff line Loading @@ -434,7 +434,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * {@inheritDoc} */ @Override public int getConnectionState(BluetoothDevice device) { public @BtProfileState int getConnectionState(BluetoothDevice device) { if (VDBG) log("getState(" + device + ")"); try { mServiceLock.readLock().lock(); Loading Loading @@ -689,7 +689,7 @@ public final class BluetoothA2dp implements BluetoothProfile { * @hide */ @UnsupportedAppUsage public BluetoothCodecStatus getCodecStatus(BluetoothDevice device) { public @Nullable BluetoothCodecStatus getCodecStatus(BluetoothDevice device) { if (DBG) Log.d(TAG, "getCodecStatus(" + device + ")"); try { mServiceLock.readLock().lock(); Loading
framework/java/android/bluetooth/BluetoothCodecStatus.java +3 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.bluetooth; import android.annotation.Nullable; import android.annotation.UnsupportedAppUsage; import android.os.Parcel; import android.os.Parcelable; Loading @@ -42,7 +43,7 @@ public final class BluetoothCodecStatus implements Parcelable { public static final String EXTRA_CODEC_STATUS = "android.bluetooth.codec.extra.CODEC_STATUS"; private final BluetoothCodecConfig mCodecConfig; private final @Nullable BluetoothCodecConfig mCodecConfig; private final BluetoothCodecConfig[] mCodecsLocalCapabilities; private final BluetoothCodecConfig[] mCodecsSelectableCapabilities; Loading Loading @@ -140,7 +141,7 @@ public final class BluetoothCodecStatus implements Parcelable { * @return the current codec configuration */ @UnsupportedAppUsage public BluetoothCodecConfig getCodecConfig() { public @Nullable BluetoothCodecConfig getCodecConfig() { return mCodecConfig; } Loading
framework/java/android/bluetooth/BluetoothProfile.java +13 −0 Original line number Diff line number Diff line Loading @@ -18,11 +18,14 @@ package android.bluetooth; import android.Manifest; import android.annotation.IntDef; import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.annotation.UnsupportedAppUsage; import android.os.Build; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.util.List; /** Loading Loading @@ -60,6 +63,16 @@ public interface BluetoothProfile { /** The profile is in disconnecting state */ int STATE_DISCONNECTING = 3; /** @hide */ @IntDef({ STATE_DISCONNECTED, STATE_CONNECTING, STATE_CONNECTED, STATE_DISCONNECTING, }) @Retention(RetentionPolicy.SOURCE) public @interface BtProfileState {} /** * Headset and Handsfree profile */ Loading