Replaced use of Bluetooth resource by SystemApi

Bluetooth resources are moved to the Bluetooth module,
we need to clear all existing usages of these resources.
Updated existing tests.

Tag: #feature
Test: make RunSettingsRoboTests
Bug: 211570675
Change-Id: I0f76df5043e69ed33cca40af3c32ac5b922b79ef
This commit is contained in:
Etienne Ruffieux
2022-01-06 17:24:09 +00:00
parent a4f936408c
commit 70c9f89e6f
2 changed files with 14 additions and 7 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.development;
import android.bluetooth.BluetoothManager;
import android.content.Context;
import android.os.SystemProperties;
@@ -42,8 +43,9 @@ public class BluetoothMaxConnectedAudioDevicesPreferenceController extends
public BluetoothMaxConnectedAudioDevicesPreferenceController(Context context) {
super(context);
mDefaultMaxConnectedAudioDevices = mContext.getResources().getInteger(
com.android.internal.R.integer.config_bluetooth_max_connected_audio_devices);
BluetoothManager mBluetoothManager = context.getSystemService(BluetoothManager.class);
mDefaultMaxConnectedAudioDevices = mBluetoothManager.getAdapter()
.getMaxConnectedAudioDevices();
}
@Override