android: Cleanup classes
- Use final modifer wherever possible - Use try-with-resources for input/output streams Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
committed by
Jason A. Donenfeld
parent
4986d92f3d
commit
4671f59c67
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user