Bug 1368147 - Pre: remove unused code r=sebastian
authorGrigory Kruglov <gkruglov@mozilla.com>
Wed, 30 Aug 2017 20:38:01 -0400
changeset 429956 487a253f5548d646d6ce3edbcbcdb636329fa837
parent 429955 f05ca536673199af9256016b6f7ed34296f2c897
child 429957 0ca257bd9dcb3fe1343e523104bd18333bef9776
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1368147
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1368147 - Pre: remove unused code r=sebastian MozReview-Commit-ID: IeEHvmObCvE
mobile/android/services/src/main/java/org/mozilla/gecko/fxa/authenticator/AndroidFxAccount.java
mobile/android/services/src/main/java/org/mozilla/gecko/sync/Utils.java
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/authenticator/AndroidFxAccount.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/authenticator/AndroidFxAccount.java
@@ -239,36 +239,16 @@ public class AndroidFxAccount {
   private String getBundleData(String key) {
     ExtendedJSONObject o = unbundle();
     if (o == null) {
       return null;
     }
     return o.getString(key);
   }
 
-  protected boolean getBundleDataBoolean(String key, boolean def) {
-    ExtendedJSONObject o = unbundle();
-    if (o == null) {
-      return def;
-    }
-    Boolean b = o.getBoolean(key);
-    if (b == null) {
-      return def;
-    }
-    return b;
-  }
-
-  protected byte[] getBundleDataBytes(String key) {
-    ExtendedJSONObject o = unbundle();
-    if (o == null) {
-      return null;
-    }
-    return o.getByteArrayHex(key);
-  }
-
   private void updateBundleValues(String key, String value, String... more) {
     if (more.length % 2 != 0) {
       throw new IllegalArgumentException("more must be a list of key, value pairs");
     }
     ExtendedJSONObject descriptor = unbundle();
     if (descriptor == null) {
       return;
     }
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/sync/Utils.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/sync/Utils.java
@@ -239,22 +239,16 @@ public class Utils {
       throw new IllegalArgumentException("No account name provided.");
     }
     if (account.matches("^[A-Za-z0-9._-]+$")) {
       return account.toLowerCase(Locale.US);
     }
     return sha1Base32(account.toLowerCase(Locale.US));
   }
 
-  public static SharedPreferences getSharedPreferences(final Context context, final String product, final String username, final String serverURL, final String profile, final long version)
-      throws NoSuchAlgorithmException, UnsupportedEncodingException {
-    String prefsPath = getPrefsPath(product, username, serverURL, profile, version);
-    return context.getSharedPreferences(prefsPath, SHARED_PREFERENCES_MODE);
-  }
-
   /**
    * Get shared preferences path for a Sync account.
    *
    * @param product the Firefox Sync product package name (like "org.mozilla.firefox").
    * @param username the Sync account name, optionally encoded with <code>Utils.usernameFromAccount</code>.
    * @param serverURL the Sync account server URL.
    * @param profile the Firefox profile name.
    * @param version the version of preferences to reference.