[tbb-commits] [tor-browser/tor-browser-60.7.0esr-9.0-1] Revert "Bug 28507: Parse a set of strings in Android Set Preferences"
gk at torproject.org
gk at torproject.org
Tue Jun 4 07:39:51 UTC 2019
commit 1666b0186346ab2769614d3b19bc2058fd6f13f0
Author: Matthew Finkel <Matthew.Finkel at gmail.com>
Date: Tue May 28 01:58:14 2019 +0000
Revert "Bug 28507: Parse a set of strings in Android Set Preferences"
This reverts commit 894c64799812159b17ee90ca39427d12999a670d.
---
.../gecko/preferences/DistroSharedPrefsImport.java | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/mobile/android/base/java/org/mozilla/gecko/preferences/DistroSharedPrefsImport.java b/mobile/android/base/java/org/mozilla/gecko/preferences/DistroSharedPrefsImport.java
index 7969aca3d2ac..13047c6f2ff4 100644
--- a/mobile/android/base/java/org/mozilla/gecko/preferences/DistroSharedPrefsImport.java
+++ b/mobile/android/base/java/org/mozilla/gecko/preferences/DistroSharedPrefsImport.java
@@ -11,13 +11,10 @@ import org.mozilla.gecko.distribution.Distribution;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
-import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
-import java.util.HashSet;
import java.util.Iterator;
-import java.util.Set;
public class DistroSharedPrefsImport {
@@ -61,21 +58,7 @@ public class DistroSharedPrefsImport {
} else if (value instanceof Long) {
sharedPreferences.putLong(GeckoPreferences.NON_PREF_PREFIX + key, (long) value);
} else {
- JSONArray jsonArray = preferences.optJSONArray(key);
- if (jsonArray != null) {
- Set<String> prefValues = new HashSet<String>();
- for (int i = 0; i < jsonArray.length(); i++) {
- try {
- prefValues.add(jsonArray.getString(i));
- } catch (JSONException e) {
- Log.e(LOGTAG, "Unable to parse Android Preferences.", e);
- continue;
- }
- }
- sharedPreferences.putStringSet(GeckoPreferences.NON_PREF_PREFIX + key, prefValues);
- } else {
- Log.d(LOGTAG, "Unknown preference value type whilst importing android preferences from distro file.");
- }
+ Log.d(LOGTAG, "Unknown preference value type whilst importing android preferences from distro file.");
}
}
sharedPreferences.apply();
More information about the tbb-commits
mailing list