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 Merged-In: I036a3992bbd78896da8364b55ecc51afc4464b6e Change-Id: I036a3992bbd78896da8364b55ecc51afc4464b6e
This commit is contained in:
@@ -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;
|
||||
@@ -77,13 +76,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;
|
||||
|
Reference in New Issue
Block a user