Update bluetooth preference to take user to new screen

This CL removes the toggle from the bluetooth preference and instead
takes users to a new dedicated screen for toggling bluetooth status.
On this screen we show a different summary text depending on whether
bluetooth and bluetooth scanning are on/off. Also, we were able to
delegate most of the UI/bluetooth handling to already existing
classes.

Test: robotests
Bug: 77543471
Change-Id: I036a3992bbd78896da8364b55ecc51afc4464b6e
This commit is contained in:
Salvador Martinez
2018-04-04 14:23:57 -07:00
parent 837f279db9
commit 21c5ed2894
12 changed files with 312 additions and 170 deletions

View File

@@ -22,7 +22,6 @@ import android.support.annotation.VisibleForTesting;
import com.android.internal.logging.nano.MetricsProto;
import com.android.settings.R;
import com.android.settings.bluetooth.BluetoothSwitchPreferenceController;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.dashboard.SummaryLoader;
import com.android.settings.nfc.NfcPreferenceController;
@@ -79,13 +78,8 @@ public class ConnectedDeviceDashboardFragment extends DashboardFragment {
new NfcPreferenceController(context);
controllers.add(nfcPreferenceController);
final BluetoothSwitchPreferenceController bluetoothPreferenceController =
new BluetoothSwitchPreferenceController(context);
controllers.add(bluetoothPreferenceController);
if (lifecycle != null) {
lifecycle.addObserver(nfcPreferenceController);
lifecycle.addObserver(bluetoothPreferenceController);
}
return controllers;