diff options
author | Petar Kukolj <petarkukolj3@yahoo.com> | 2018-11-22 17:05:04 +0100 |
---|---|---|
committer | Petar Kukolj <petarkukolj3@yahoo.com> | 2018-11-22 17:05:04 +0100 |
commit | 2393d4512c25cdd9095a3546c2bc9aa139bca798 (patch) | |
tree | 05a2b6b9b01426eb3561d793fd6875bd1e2139a9 /app/src/main | |
parent | 98e75fc313df0a6d1fc79485f6d58bfbf2c9bc96 (diff) | |
download | AntennaPod-2393d4512c25cdd9095a3546c2bc9aa139bca798.zip |
Fix coding style problems
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java | 8 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index 122b6040e..5595aeac4 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -646,9 +646,9 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi @Override public void onBackPressed() { - if(isDrawerOpen()) { + if (isDrawerOpen()) { drawerLayout.closeDrawer(navDrawer); - } else if(getSupportFragmentManager().getBackStackEntryCount() != 0) { + } else if (getSupportFragmentManager().getBackStackEntryCount() != 0) { super.onBackPressed(); } else { switch (UserPreferences.getBackButtonBehavior()) { @@ -664,7 +664,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi .show(); break; case DOUBLE_TAP: - if(lastBackButtonPressTime < System.currentTimeMillis() - 2000) { + if (lastBackButtonPressTime < System.currentTimeMillis() - 2000) { Toast.makeText(this, R.string.double_tap_toast, Toast.LENGTH_SHORT).show(); lastBackButtonPressTime = System.currentTimeMillis(); } else { @@ -672,7 +672,7 @@ public class MainActivity extends CastEnabledActivity implements NavDrawerActivi } break; case GO_TO_PAGE: - if(getLastNavFragment().equals(UserPreferences.getBackButtonGoToPage())) { + if (getLastNavFragment().equals(UserPreferences.getBackButtonGoToPage())) { super.onBackPressed(); } else { loadFragment(UserPreferences.getBackButtonGoToPage(), null); diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java index ec1767062..587b533a2 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java @@ -229,7 +229,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc ui.findPreference(UserPreferences.PREF_BACK_BUTTON_BEHAVIOR) .setOnPreferenceChangeListener((preference, newValue) -> { - if(newValue.equals("page")) { + if (newValue.equals("page")) { final Context context = ui.getActivity(); final String[] navTitles = context.getResources().getStringArray(R.array.back_button_go_to_pages); final String[] navTags = new String[3]; @@ -239,7 +239,7 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(R.string.back_button_go_to_page_title); builder.setSingleChoiceItems(navTitles, ArrayUtils.indexOf(navTags, UserPreferences.getBackButtonGoToPage()), (dialogInterface, i) -> { - if(i >= 0) { + if (i >= 0) { choice[0] = navTags[i]; } }); |