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

Commit 1583a64b authored by Sal Savage's avatar Sal Savage
Browse files

The BluetoothHeadsetClient connection action no longer matches manifest

This change changes the name back to what it should have been and allows
the existing manifest content making the broadcast a protected broadcast
still work as is.

Tag: #refactor
Bug: 161145287
Test: atest BluetoothInstrumentationTests
Change-Id: Ieffe7da80d3ebab36af7a8e71e7453f3a3e8c4a1
parent 22c1d198
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ package android.bluetooth {
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice);
    method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.BluetoothDevice> getDevicesMatchingConnectionStates(@NonNull int[]);
    method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int);
    field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.headsetprofile.action.CONNECTION_STATE_CHANGED";
    field @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.headsetclient.profile.action.CONNECTION_STATE_CHANGED";
  }

  public final class BluetoothHearingAid implements android.bluetooth.BluetoothProfile {
+5 −1
Original line number Diff line number Diff line
@@ -14,7 +14,9 @@
 * limitations under the License.
 */
package android.bluetooth;

import static android.bluetooth.BluetoothUtils.getSyncTimeout;

import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
@@ -32,7 +34,9 @@ import android.os.IBinder;
import android.os.RemoteException;
import android.util.CloseGuard;
import android.util.Log;

import com.android.modules.utils.SynchronousResultReceiver;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeoutException;
@@ -76,7 +80,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
    })
    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
    public static final String ACTION_CONNECTION_STATE_CHANGED =
            "android.bluetooth.headsetprofile.action.CONNECTION_STATE_CHANGED";
            "android.bluetooth.headsetclient.profile.action.CONNECTION_STATE_CHANGED";
    /**
     * Intent sent whenever audio state changes.
     *