diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2018-06-02 13:38:36 +0530 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-02 19:14:56 +0200 |
commit | 4671f59c67db5576ea340a2f586642b3243c85a4 (patch) | |
tree | 87ff1560eed926402bc29b1617f6799c1fd60a03 /app/src/main/java/com/wireguard/android/activity/SettingsActivity.java | |
parent | 4986d92f3d5fb0d7bb4f15bf2b02f8b36ef23dff (diff) |
android: Cleanup classes
- Use final modifer wherever possible
- Use try-with-resources for input/output streams
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'app/src/main/java/com/wireguard/android/activity/SettingsActivity.java')
-rw-r--r-- | app/src/main/java/com/wireguard/android/activity/SettingsActivity.java | 4 |
1 files changed, 2 insertions, 2 deletions
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); |