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

Commit 9767ccd9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[le audio] Fix leaudio test app register receiver crash" am: 9785755e...

Merge "[le audio] Fix leaudio test app register receiver crash" am: 9785755e am: 7cafcfad am: 99d955e5

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2485964



Change-Id: Idba0c12b3a60a649a129d9312c94d8055f8b3d06
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 66edb5d6 99d955e5
Loading
Loading
Loading
Loading
+10 −5
Original line number Original line Diff line number Diff line
@@ -511,11 +511,13 @@ public class BluetoothProxy {


        adapterIntentFilter = new IntentFilter();
        adapterIntentFilter = new IntentFilter();
        adapterIntentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
        adapterIntentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
        application.registerReceiver(adapterIntentReceiver, adapterIntentFilter);
        application.registerReceiver(adapterIntentReceiver, adapterIntentFilter,
                Context.RECEIVER_EXPORTED);


        bassIntentFilter = new IntentFilter();
        bassIntentFilter = new IntentFilter();
        bassIntentFilter.addAction(BluetoothLeBroadcastAssistant.ACTION_CONNECTION_STATE_CHANGED);
        bassIntentFilter.addAction(BluetoothLeBroadcastAssistant.ACTION_CONNECTION_STATE_CHANGED);
        application.registerReceiver(bassIntentReceiver, bassIntentFilter);
        application.registerReceiver(bassIntentReceiver, bassIntentFilter,
                Context.RECEIVER_EXPORTED);
    }
    }


    // Lazy constructing Singleton acquire method
    // Lazy constructing Singleton acquire method
@@ -742,7 +744,8 @@ public class BluetoothProxy {


        intentFilter = new IntentFilter();
        intentFilter = new IntentFilter();
        intentFilter.addAction(BluetoothLeAudio.ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED);
        intentFilter.addAction(BluetoothLeAudio.ACTION_LE_AUDIO_CONNECTION_STATE_CHANGED);
        application.registerReceiver(leAudioIntentReceiver, intentFilter);
        application.registerReceiver(leAudioIntentReceiver, intentFilter,
                Context.RECEIVER_EXPORTED);
    }
    }


    private void cleanupLeAudioProxy() {
    private void cleanupLeAudioProxy() {
@@ -760,7 +763,8 @@ public class BluetoothProxy {


        intentFilter = new IntentFilter();
        intentFilter = new IntentFilter();
        intentFilter.addAction(BluetoothVolumeControl.ACTION_CONNECTION_STATE_CHANGED);
        intentFilter.addAction(BluetoothVolumeControl.ACTION_CONNECTION_STATE_CHANGED);
        application.registerReceiver(volumeControlIntentReceiver, intentFilter);
        application.registerReceiver(volumeControlIntentReceiver, intentFilter,
                Context.RECEIVER_EXPORTED);
    }
    }


    private void cleanupVolumeControlProxy() {
    private void cleanupVolumeControlProxy() {
@@ -780,7 +784,8 @@ public class BluetoothProxy {
        intentFilter = new IntentFilter();
        intentFilter = new IntentFilter();
        intentFilter.addAction(BluetoothHapClient.ACTION_HAP_CONNECTION_STATE_CHANGED);
        intentFilter.addAction(BluetoothHapClient.ACTION_HAP_CONNECTION_STATE_CHANGED);
        intentFilter.addAction("android.bluetooth.action.HAP_DEVICE_AVAILABLE");
        intentFilter.addAction("android.bluetooth.action.HAP_DEVICE_AVAILABLE");
        application.registerReceiver(hapClientIntentReceiver, intentFilter);
        application.registerReceiver(hapClientIntentReceiver, intentFilter,
                Context.RECEIVER_EXPORTED);
    }
    }


    private void cleanupHapProxy() {
    private void cleanupHapProxy() {