Revert "BLE peripheral mode (4/4): Settings change for advertising preference."
This reverts commit eb56b9ccb8
.
Conflicts:
src/com/android/settings/bluetooth/BluetoothDiscoverableEnabler.java
src/com/android/settings/bluetooth/BluetoothSettings.java
src/com/android/settings/bluetooth/LocalDeviceProfilesSettings.java
Change-Id: I2ce6b9eb0e335ba1b9aa4e1cb61a041f00d9aa87
This commit is contained in:
@@ -17,10 +17,8 @@
|
||||
package com.android.settings.bluetooth;
|
||||
|
||||
import android.app.QueuedWork;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.Editor;
|
||||
import android.content.res.Configuration;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -48,10 +46,6 @@ final class LocalBluetoothPreferences {
|
||||
|
||||
private static final String KEY_DISCOVERABLE_END_TIMESTAMP = "discoverable_end_timestamp";
|
||||
|
||||
private static final String KEY_ADVERTISEMENT_PREFERENCE = "bt_advertisement_perference";
|
||||
|
||||
private static final boolean DEFAULT_ADVERTISING_ENABLED = false;
|
||||
|
||||
private LocalBluetoothPreferences() {
|
||||
}
|
||||
|
||||
@@ -64,17 +58,6 @@ final class LocalBluetoothPreferences {
|
||||
KEY_DISCOVERABLE_END_TIMESTAMP, 0);
|
||||
}
|
||||
|
||||
static boolean isAdvertisingEnabled(Context context) {
|
||||
return getSharedPreferences(context).getBoolean(
|
||||
KEY_ADVERTISEMENT_PREFERENCE, DEFAULT_ADVERTISING_ENABLED);
|
||||
}
|
||||
|
||||
static void setAdvertisingEnabled(Context context, boolean advertisingEnabled) {
|
||||
Editor preferenceEditor = getSharedPreferences(context).edit();
|
||||
preferenceEditor.putBoolean(KEY_ADVERTISEMENT_PREFERENCE, advertisingEnabled);
|
||||
preferenceEditor.apply();
|
||||
}
|
||||
|
||||
static boolean shouldShowDialogInForeground(Context context,
|
||||
String deviceAddress) {
|
||||
LocalBluetoothManager manager = LocalBluetoothManager.getInstance(context);
|
||||
|
Reference in New Issue
Block a user