Introduce ClearAdbKeysPreferenceController
- Create new ClearAdbKeysPreferenceController - Added ClearAdbKeysWarningDialog - Create controller inside the DashboardFragment - Port logic from DevelopmentSettings into the controller Bug: 34203528 Test: make RunSettingsRoboTests -j40 Change-Id: Ia12bfee753f2c9222e6d833b1fb7e099f3602fdf
This commit is contained in:
@@ -50,7 +50,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFragment
|
||||
implements SwitchBar.OnSwitchChangeListener, OemUnlockDialogHost, AdbDialogHost {
|
||||
implements SwitchBar.OnSwitchChangeListener, OemUnlockDialogHost, AdbDialogHost,
|
||||
AdbClearKeysDialogHost {
|
||||
|
||||
private static final String TAG = "DevSettingsDashboard";
|
||||
|
||||
@@ -170,6 +171,13 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
|
||||
controller.onAdbDialogDismissed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAdbClearKeysDialogConfirmed() {
|
||||
final ClearAdbKeysPreferenceController controller = getDevelopmentOptionsController(
|
||||
ClearAdbKeysPreferenceController.class);
|
||||
controller.onClearAdbKeysConfirmed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
boolean handledResult = false;
|
||||
@@ -252,7 +260,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
|
||||
// system ui demo mode
|
||||
// quick settings developer tiles
|
||||
controllers.add(new AdbPreferenceController(context, fragment));
|
||||
// revoke usb debugging authorizations
|
||||
controllers.add(new ClearAdbKeysPreferenceController(context, fragment));
|
||||
controllers.add(new LocalTerminalPreferenceController(context));
|
||||
// bug report shortcut
|
||||
// select mock location app
|
||||
|
||||
Reference in New Issue
Block a user