Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d67c2a27 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6847951 from 19507c59510d2f4b1032c4a10bdae02a08df0c12 to sc-release

Change-Id: Ibb9e2b7041a9080630b07170771df850c99220f8
parents e242594e 2ca53fe6
Loading
Loading
Loading
Loading
+35 −0
Original line number Original line Diff line number Diff line
@@ -89,6 +89,33 @@ public final class BluetoothPan implements BluetoothProfile {
    @SuppressLint("ActionValue")
    @SuppressLint("ActionValue")
    public static final String EXTRA_LOCAL_ROLE = "android.bluetooth.pan.extra.LOCAL_ROLE";
    public static final String EXTRA_LOCAL_ROLE = "android.bluetooth.pan.extra.LOCAL_ROLE";


    /**
     * Intent used to broadcast the change in tethering state of the Pan
     * Profile
     *
     * <p>This intent will have 1 extra:
     * <ul>
     * <li> {@link #EXTRA_TETHERING_STATE} - The current state of Bluetooth
     * tethering. </li>
     * </ul>
     *
     * <p> {@link #EXTRA_TETHERING_STATE} can be any of {@link #TETHERING_STATE_OFF} or
     * {@link #TETHERING_STATE_ON}
     * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to
     * receive.
     */
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_TETHERING_STATE_CHANGED =
            "android.bluetooth.action.TETHERING_STATE_CHANGED";

    /**
     * Extra for {@link #ACTION_TETHERING_STATE_CHANGED} intent
     * The tethering state of the PAN profile.
     * It can be one of {@link #TETHERING_STATE_OFF} or {@link #TETHERING_STATE_ON}.
     */
    public static final String EXTRA_TETHERING_STATE =
            "android.bluetooth.extra.TETHERING_STATE";

    /** @hide */
    /** @hide */
    @IntDef({PAN_ROLE_NONE, LOCAL_NAP_ROLE, LOCAL_PANU_ROLE})
    @IntDef({PAN_ROLE_NONE, LOCAL_NAP_ROLE, LOCAL_PANU_ROLE})
    @Retention(RetentionPolicy.SOURCE)
    @Retention(RetentionPolicy.SOURCE)
@@ -114,6 +141,14 @@ public final class BluetoothPan implements BluetoothProfile {


    public static final int REMOTE_PANU_ROLE = 2;
    public static final int REMOTE_PANU_ROLE = 2;


    /** @hide **/
    @IntDef({TETHERING_STATE_OFF, TETHERING_STATE_ON})
    @Retention(RetentionPolicy.SOURCE)
    public @interface TetheringState{}

    public static final int TETHERING_STATE_OFF = 1;

    public static final int TETHERING_STATE_ON = 2;
    /**
    /**
     * Return codes for the connect and disconnect Bluez / Dbus calls.
     * Return codes for the connect and disconnect Bluez / Dbus calls.
     *
     *
+2 −1
Original line number Original line Diff line number Diff line
@@ -418,7 +418,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
            if (BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED.equals(action)) {
            if (BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED.equals(action)) {
                String newName = intent.getStringExtra(BluetoothAdapter.EXTRA_LOCAL_NAME);
                String newName = intent.getStringExtra(BluetoothAdapter.EXTRA_LOCAL_NAME);
                if (DBG) {
                if (DBG) {
                    Slog.d(TAG, "Bluetooth Adapter name changed to " + newName);
                    Slog.d(TAG, "Bluetooth Adapter name changed to " + newName + " by "
                            + mContext.getPackageName());
                }
                }
                if (newName != null) {
                if (newName != null) {
                    storeNameAndAddress(newName, null);
                    storeNameAndAddress(newName, null);