From 4671f59c67db5576ea340a2f586642b3243c85a4 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 2 Jun 2018 13:38:36 +0530 Subject: android: Cleanup classes - Use final modifer wherever possible - Use try-with-resources for input/output streams Signed-off-by: Harsh Shandilya --- .../main/java/com/wireguard/android/activity/SettingsActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/main/java/com/wireguard/android/activity/SettingsActivity.java') diff --git a/app/src/main/java/com/wireguard/android/activity/SettingsActivity.java b/app/src/main/java/com/wireguard/android/activity/SettingsActivity.java index d358c532..ed7c5457 100644 --- a/app/src/main/java/com/wireguard/android/activity/SettingsActivity.java +++ b/app/src/main/java/com/wireguard/android/activity/SettingsActivity.java @@ -100,7 +100,7 @@ public class SettingsActivity extends AppCompatActivity implements Topic.Subscri } @Override - public void onTopicPublished(Topic topic) { + public void onTopicPublished(final Topic topic) { recreate(); } @@ -134,7 +134,7 @@ public class SettingsActivity extends AppCompatActivity implements Topic.Subscri } @Override - public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { + public void onSharedPreferenceChanged(final SharedPreferences sharedPreferences, final String key) { if ("dark_theme".equals(key)) { AppCompatDelegate.setDefaultNightMode( sharedPreferences.getBoolean(key, false) ? AppCompatDelegate.MODE_NIGHT_YES : AppCompatDelegate.MODE_NIGHT_NO); -- cgit v1.2.3