Move isolatable bluetooth code to SettingsLib
Move the non-ui bluetooth control/tracking code to SettingsLib so that it can be shared with others. Mostly just move classes to frameworks/base/packages/SettingsLib, however a few things had to move around. - Dock handling had to move back to code still in settings - Local preference related code had to be moved back to settings - Added an error flow from SettingsLib to Settings Depends on I69fd888362c6dbb325f6113b32c4b15cc6a23a41 Bug: 19180466 Change-Id: Ie57fe26a27bbb0adc2ef69e042a05c7290c6a52a
This commit is contained in:
@@ -22,6 +22,9 @@ import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
|
||||
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
||||
|
||||
/**
|
||||
* LocalBluetoothPreferences provides an interface to the preferences
|
||||
* related to Bluetooth.
|
||||
@@ -60,7 +63,7 @@ final class LocalBluetoothPreferences {
|
||||
|
||||
static boolean shouldShowDialogInForeground(Context context,
|
||||
String deviceAddress) {
|
||||
LocalBluetoothManager manager = LocalBluetoothManager.getInstance(context);
|
||||
LocalBluetoothManager manager = Utils.getLocalBtManager(context);
|
||||
if (manager == null) {
|
||||
if(DEBUG) Log.v(TAG, "manager == null - do not show dialog.");
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user