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:
Jason Monk
2015-02-04 10:24:29 -05:00
parent fc1b00cfe4
commit f2982a9ba1
70 changed files with 163 additions and 3882 deletions

View File

@@ -41,8 +41,9 @@ import android.util.Log;
import android.widget.RemoteViews;
import com.android.settings.R;
import com.android.settings.bluetooth.LocalBluetoothAdapter;
import com.android.settings.bluetooth.LocalBluetoothManager;
import com.android.settings.bluetooth.Utils;
import com.android.settingslib.bluetooth.LocalBluetoothAdapter;
import com.android.settingslib.bluetooth.LocalBluetoothManager;
/**
* Provides control of power-related settings from a widget.
@@ -448,7 +449,7 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
@Override
public int getActualState(Context context) {
if (sLocalBluetoothAdapter == null) {
LocalBluetoothManager manager = LocalBluetoothManager.getInstance(context);
LocalBluetoothManager manager = Utils.getLocalBtManager(context);
if (manager == null) {
return STATE_UNKNOWN; // On emulator?
}