Use BluetoothAdapter instead of LocalBluetoothAdapter
LocalBluetoothAdapter only has a few APIs that is not supported by BluetoothAdapter, and lots of LocalBluetoothAdapter function pass parameter to BluetoothAdapter directly. Do the refactor in Settings, use BluetoothAdapter instead of LocalBluetoothAdapter. Bug: 111769754 Test: make -j42 RunSettingsRoboTests Change-Id: I88e5a8377b5d1106c7679e6a8c3fd1ca1a80ea6f
This commit is contained in:
@@ -16,13 +16,13 @@
|
||||
|
||||
package com.android.settings.bluetooth;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
|
||||
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
||||
|
||||
/**
|
||||
@@ -89,7 +89,7 @@ final class LocalBluetoothPreferences {
|
||||
}
|
||||
|
||||
// If the device was discoverING recently
|
||||
LocalBluetoothAdapter adapter = manager.getBluetoothAdapter();
|
||||
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
||||
if (adapter != null) {
|
||||
if (adapter.isDiscovering()) {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user