Add a new NFC developer setting option for NFCSNOOP

Add a new developer setting option to enable full NFCSNOOP log.

Bug: 204397062
Test: manual
Merged-In: I3fd34500e5e7093c9d77ff737987a35f6866814e
Change-Id: I3fd34500e5e7093c9d77ff737987a35f6866814e
(cherry picked from commit b71de640b5)
This commit is contained in:
Jack Yu
2022-08-02 13:04:24 +00:00
committed by Henri Chataing
parent dcb1dbc7f5
commit a2f8944942
5 changed files with 262 additions and 1 deletions

View File

@@ -81,7 +81,9 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
implements OnMainSwitchChangeListener, OemUnlockDialogHost, AdbDialogHost,
AdbClearKeysDialogHost, LogPersistDialogHost,
BluetoothRebootDialog.OnRebootDialogListener,
AbstractBluetoothPreferenceController.Callback, BluetoothSnoopLogHost {
AbstractBluetoothPreferenceController.Callback,
BluetoothSnoopLogHost,
NfcRebootDialog.OnNfcRebootDialogConfirmedListener {
private static final String TAG = "DevSettingsDashboard";
@@ -407,6 +409,20 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
controllerPbap.onSettingChanged();
}
@Override
public void onNfcRebootDialogConfirmed() {
final NfcSnoopLogPreferenceController controller =
getDevelopmentOptionsController(NfcSnoopLogPreferenceController.class);
controller.onNfcRebootDialogConfirmed();
}
@Override
public void onNfcRebootDialogCanceled() {
final NfcSnoopLogPreferenceController controller =
getDevelopmentOptionsController(NfcSnoopLogPreferenceController.class);
controller.onNfcRebootDialogCanceled();
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
boolean handledResult = false;
@@ -571,6 +587,7 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
controllers.add(new BluetoothLeAudioHwOffloadPreferenceController(context, fragment));
controllers.add(new BluetoothMaxConnectedAudioDevicesPreferenceController(context));
controllers.add(new NfcStackDebugLogPreferenceController(context));
controllers.add(new NfcSnoopLogPreferenceController(context, fragment));
controllers.add(new ShowTapsPreferenceController(context));
controllers.add(new PointerLocationPreferenceController(context));
controllers.add(new ShowSurfaceUpdatesPreferenceController(context));