Cleanup: static code analysis using AndroidStudio.

This commit is contained in:
Dennis Guse
2020-07-20 19:01:40 +02:00
parent 461f1c246b
commit b70c3be5af
42 changed files with 202 additions and 454 deletions
@@ -183,14 +183,11 @@ public abstract class BluetoothLeSensorPreference extends DialogPreference {
super.onPrepareDialogBuilder(builder);
builder.setSingleChoiceItems(listAdapter, selectedEntryIndex,
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
selectedEntryIndex = which;
(dialog, which) -> {
selectedEntryIndex = which;
BluetoothLeSensorPreferenceDialog.this.onClick(dialog, DialogInterface.BUTTON_POSITIVE);
dialog.dismiss();
}
BluetoothLeSensorPreferenceDialog.this.onClick(dialog, DialogInterface.BUTTON_POSITIVE);
dialog.dismiss();
});
builder.setIcon(android.R.drawable.stat_sys_data_bluetooth);
builder.setPositiveButton(null, null);