[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] cleanup



commit f117dac336f0d6943a5fb87bd55c4113942938c6
Author: lexi <bird.s.lex@xxxxxxxxx>
Date:   Wed Mar 28 15:21:18 2018 -0400

    cleanup
---
 .../android/settings/SettingsPreferences.java      | 24 ++++++----------------
 app/src/main/res/xml/preferences.xml               |  1 -
 2 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java b/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java
index d79055b4..fb01cde1 100644
--- a/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java
+++ b/app/src/main/java/org/torproject/android/settings/SettingsPreferences.java
@@ -5,34 +5,26 @@ package org.torproject.android.settings;
 
 import android.content.Context;
 import android.content.Intent;
-import android.content.SharedPreferences;
 import android.os.Bundle;
 import android.preference.ListPreference;
 import android.preference.Preference;
 import android.preference.Preference.OnPreferenceChangeListener;
-import android.preference.Preference.OnPreferenceClickListener;
 import android.preference.PreferenceActivity;
 
-import org.torproject.android.OrbotApp;
 import org.torproject.android.R;
 import org.torproject.android.service.util.Prefs;
-import org.torproject.android.service.util.TorServiceUtils;
 
-import java.util.Locale;
-
-
-public class SettingsPreferences 
-		extends PreferenceActivity  {
+public class SettingsPreferences
+        extends PreferenceActivity {
     private static final String TAG = "SettingsPreferences";
 
-	private ListPreference prefLocale = null;
-	
+    private ListPreference prefLocale = null;
+
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
         addPreferencesFromResource(R.xml.preferences);
         getPreferenceManager().setSharedPreferencesMode(Context.MODE_MULTI_PROCESS);
-        SharedPreferences prefs = TorServiceUtils.getSharedPrefs(getApplicationContext());
 
         prefLocale = (ListPreference) findPreference("pref_default_locale");
         Languages languages = Languages.get(this);
@@ -46,21 +38,17 @@ public class SettingsPreferences
                 Prefs.setDefaultLocale(language);
                 LocaleHelper.setLocale(getApplicationContext(), language);
                 Intent intentResult = new Intent();
-                intentResult.putExtra("locale",language);
-                setResult(RESULT_OK,intentResult);
+                intentResult.putExtra("locale", language);
+                setResult(RESULT_OK, intentResult);
                 finish();
                 return false;
             }
         });
-
     }
 
-
     @Override
     protected void attachBaseContext(Context base) {
         super.attachBaseContext(LocaleHelper.onAttach(base));
     }
 
-
-
 }
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index 3fd74394..322db8f3 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -118,7 +118,6 @@
             android:title="@string/use_bridges" />
 
         <EditTextPreference
-            android:defaultValue=""
             android:dialogTitle="@string/enter_bridge_addresses"
             android:inputType="textMultiLine|textNoSuggestions"
             android:key="pref_bridges_list"



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits