From 81aacac5927c2e05c120ee06edb9e118c560f651 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Mon, 20 Feb 2017 08:47:59 +1100 Subject: [PATCH] Make 3rd party AppCompatListPreference adhere to our checkstyle rules. Added braces around one line if statements. --- .../geecko/QuickLyric/view/AppCompatListPreference.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/geecko/QuickLyric/view/AppCompatListPreference.java b/app/src/main/java/com/geecko/QuickLyric/view/AppCompatListPreference.java index 7e3b63a11..e8b3b08f7 100644 --- a/app/src/main/java/com/geecko/QuickLyric/view/AppCompatListPreference.java +++ b/app/src/main/java/com/geecko/QuickLyric/view/AppCompatListPreference.java @@ -63,8 +63,9 @@ public class AppCompatListPreference extends ListPreference { public void onClick(DialogInterface dialog, int which) { if (which >= 0 && getEntryValues() != null) { String value = getEntryValues()[which].toString(); - if (callChangeListener(value) && isPersistent()) + if (callChangeListener(value) && isPersistent()) { setValue(value); + } } dialog.dismiss(); } @@ -82,8 +83,9 @@ public class AppCompatListPreference extends ListPreference { } mDialog = builder.create(); - if (state != null) + if (state != null) { mDialog.onRestoreInstanceState(state); + } mDialog.show(); } @@ -91,7 +93,8 @@ public class AppCompatListPreference extends ListPreference { public void onActivityDestroy() { super.onActivityDestroy(); if (mDialog != null && mDialog.isShowing() && - mDialog.getWindow() != null && mDialog.getWindow().getWindowManager() != null) + mDialog.getWindow() != null && mDialog.getWindow().getWindowManager() != null) { mDialog.dismiss(); + } } } \ No newline at end of file