Revert "Pass in active device to all BluetoothA2dp APIs in packa..."

Revert submission 10253996-bt-a2dp-no-null

Reason for revert: b/149361880
Reverted Changes:
If43934374: Pass in active device to all BluetoothA2dp APIs in...
I22dd1ca36: Make sure calls to BluetoothA2dp APIs pass non-nul...
If6475af6f: Require user pass in a non-null BluetoothDevice to...
I9d0e2c89c: Pass in active device to all BluetoothA2dp APIs in...
I1faa6174d: Need to now pass in active device instead of null ...
I69a941a7e: Pass in active device to all BluetoothA2dp APIs in...

Change-Id: I1d8660b11c917cf657e61478d58794182e17ec1a
This commit is contained in:
Daniel Chapin
2020-02-12 17:16:10 +00:00
parent dcedd7d6f5
commit 2be6fc2afe
11 changed files with 36 additions and 58 deletions

View File

@@ -80,7 +80,7 @@ public abstract class AbstractBluetoothDialogPreferenceController extends
}
writeConfigurationValues(index);
final BluetoothCodecConfig codecConfig = mBluetoothA2dpConfigStore.createCodecConfig();
bluetoothA2dp.setCodecConfigPreference(bluetoothA2dp.getActiveDevice(), codecConfig);
bluetoothA2dp.setCodecConfigPreference(null, codecConfig);
mPreference.setSummary(((BaseBluetoothDialogPreference) mPreference).generateSummary(
index));
}
@@ -146,8 +146,7 @@ public abstract class AbstractBluetoothDialogPreferenceController extends
if (bluetoothA2dp == null) {
return null;
}
final BluetoothCodecStatus codecStatus =
bluetoothA2dp.getCodecStatus(bluetoothA2dp.getActiveDevice());
final BluetoothCodecStatus codecStatus = bluetoothA2dp.getCodecStatus(null);
if (codecStatus == null) {
Log.d(TAG, "Unable to get current codec config. Codec status is null");
return null;
@@ -178,8 +177,7 @@ public abstract class AbstractBluetoothDialogPreferenceController extends
* @return {@link BluetoothCodecConfig}.
*/
protected BluetoothCodecConfig getSelectableByCodecType(int codecTypeValue) {
final BluetoothCodecConfig[] configs = getSelectableConfigs(
mBluetoothA2dp.getActiveDevice());
final BluetoothCodecConfig[] configs = getSelectableConfigs(null);
if (configs == null) {
Log.d(TAG, "Unable to get selectable config. Selectable configs is empty.");
return null;