Merge "Clean bluetooth code" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
19278b9477
@@ -203,7 +203,7 @@ public final class Utils {
|
|||||||
public static String findBluetoothPackageName(Context context)
|
public static String findBluetoothPackageName(Context context)
|
||||||
throws NameNotFoundException {
|
throws NameNotFoundException {
|
||||||
// this activity will always be in the package where the rest of Bluetooth lives
|
// this activity will always be in the package where the rest of Bluetooth lives
|
||||||
String sentinelActivity = "com.android.bluetooth.opp.BluetoothOppLauncherActivity";
|
final String sentinelActivity = "com.android.bluetooth.opp.BluetoothOppLauncherActivity";
|
||||||
PackageManager packageManager = context.createContextAsUser(UserHandle.SYSTEM, 0)
|
PackageManager packageManager = context.createContextAsUser(UserHandle.SYSTEM, 0)
|
||||||
.getPackageManager();
|
.getPackageManager();
|
||||||
String[] allPackages = packageManager.getPackagesForUid(BLUETOOTH_UID);
|
String[] allPackages = packageManager.getPackagesForUid(BLUETOOTH_UID);
|
||||||
|
@@ -41,15 +41,13 @@ public class BluetoothMaxConnectedAudioDevicesPreferenceController extends
|
|||||||
|
|
||||||
private int mDefaultMaxConnectedAudioDevices = 0;
|
private int mDefaultMaxConnectedAudioDevices = 0;
|
||||||
|
|
||||||
private final BluetoothManager mBluetoothManager;
|
|
||||||
|
|
||||||
public BluetoothMaxConnectedAudioDevicesPreferenceController(Context context) {
|
public BluetoothMaxConnectedAudioDevicesPreferenceController(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
|
||||||
mBluetoothManager = context.getSystemService(BluetoothManager.class);
|
final BluetoothManager bluetoothManager = context.getSystemService(BluetoothManager.class);
|
||||||
|
|
||||||
mDefaultMaxConnectedAudioDevices =
|
mDefaultMaxConnectedAudioDevices =
|
||||||
mBluetoothManager.getAdapter().getMaxConnectedAudioDevices();
|
bluetoothManager.getAdapter().getMaxConnectedAudioDevices();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user