Remove Bluetooth autoconnect on dock

Test: compiles
Change-Id: I31305c70269c685893132f14975c32a051280afc
Fix: 35219649
This commit is contained in:
Marie Janssen
2017-02-09 20:02:52 -08:00
parent ad62fd52c9
commit c2ab27e2f8
5 changed files with 0 additions and 1174 deletions

View File

@@ -44,8 +44,6 @@ final class LocalBluetoothPreferences {
private static final String KEY_LAST_SELECTED_DEVICE_TIME = "last_selected_device_time";
private static final String KEY_DOCK_AUTO_CONNECT = "auto_connect_to_dock";
private static final String KEY_DISCOVERABLE_END_TIMESTAMP = "discoverable_end_timestamp";
private LocalBluetoothPreferences() {
@@ -147,25 +145,4 @@ final class LocalBluetoothPreferences {
editor.putLong(KEY_DISCOVERABLE_END_TIMESTAMP, endTimestamp);
editor.apply();
}
static boolean hasDockAutoConnectSetting(Context context, String addr) {
return getSharedPreferences(context).contains(KEY_DOCK_AUTO_CONNECT + addr);
}
static boolean getDockAutoConnectSetting(Context context, String addr) {
return getSharedPreferences(context).getBoolean(KEY_DOCK_AUTO_CONNECT + addr,
false);
}
static void saveDockAutoConnectSetting(Context context, String addr, boolean autoConnect) {
SharedPreferences.Editor editor = getSharedPreferences(context).edit();
editor.putBoolean(KEY_DOCK_AUTO_CONNECT + addr, autoConnect);
editor.apply();
}
static void removeDockAutoConnectSetting(Context context, String addr) {
SharedPreferences.Editor editor = getSharedPreferences(context).edit();
editor.remove(KEY_DOCK_AUTO_CONNECT + addr);
editor.apply();
}
}