Fix for When Hf is rejected the device should initiate A2dp if a2dp is enabled
Change-Id: I0716782a5308cc45297a30d0a7371286c75bfa52
This commit is contained in:
committed by
Matthew Xie
parent
802956ec9b
commit
b45e3c8fe9
11
src/com/android/settings/bluetooth/BluetoothEventManager.java
Normal file → Executable file
11
src/com/android/settings/bluetooth/BluetoothEventManager.java
Normal file → Executable file
@@ -21,6 +21,7 @@ import com.android.settings.R;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.bluetooth.BluetoothClass;
|
||||
import android.bluetooth.BluetoothDevice;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@@ -99,6 +100,10 @@ final class BluetoothEventManager {
|
||||
|
||||
// Dock event broadcasts
|
||||
addHandler(Intent.ACTION_DOCK_EVENT, new DockEventHandler());
|
||||
|
||||
// Connect other profiles broadcast
|
||||
addHandler(BluetoothProfile.ACTION_CONNECT_OTHER_PROFILES, new ConnectOtherProfilesHandler());
|
||||
|
||||
mContext.registerReceiver(mBroadcastReceiver, mAdapterIntentFilter);
|
||||
}
|
||||
|
||||
@@ -368,6 +373,12 @@ final class BluetoothEventManager {
|
||||
}
|
||||
}
|
||||
|
||||
private class ConnectOtherProfilesHandler implements Handler {
|
||||
public void onReceive(Context context, Intent intent, BluetoothDevice device) {
|
||||
mProfileManager.handleConnectOtherProfiles(device);
|
||||
}
|
||||
}
|
||||
|
||||
boolean readPairedDevices() {
|
||||
Set<BluetoothDevice> bondedDevices = mLocalAdapter.getBondedDevices();
|
||||
if (bondedDevices == null) {
|
||||
|
Reference in New Issue
Block a user