Bug 1306140 - Pre: make HomeConfig VERSION package-private to allow access for testing r?sebastian draft
authorAndrzej Hunt <ahunt@mozilla.com>
Fri, 30 Sep 2016 10:14:01 -0700
changeset 419605 50df585b35ec48401fec697a87cad2e456d9775b
parent 419142 eba831d12328df6af4560e14a6193eb4f550578b
child 419606 5bd9815d4ab89e4f42add6e2cdf71d3db6e7fd11
push id30970
push userahunt@mozilla.com
push dateFri, 30 Sep 2016 17:15:18 +0000
reviewerssebastian
bugs1306140
milestone52.0a1
Bug 1306140 - Pre: make HomeConfig VERSION package-private to allow access for testing r?sebastian MozReview-Commit-ID: LT5E22L009Y
mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java
--- a/mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/HomeConfigPrefsBackend.java
@@ -23,25 +23,27 @@ import org.mozilla.gecko.home.HomeConfig
 import org.mozilla.gecko.util.HardwareUtils;
 
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.SharedPreferences;
 import android.support.annotation.CheckResult;
+import android.support.annotation.VisibleForTesting;
 import android.support.v4.content.LocalBroadcastManager;
 import android.text.TextUtils;
 import android.util.Log;
 
 public class HomeConfigPrefsBackend implements HomeConfigBackend {
     private static final String LOGTAG = "GeckoHomeConfigBackend";
 
     // Increment this to trigger a migration.
-    private static final int VERSION = 8;
+    @VisibleForTesting
+    static final int VERSION = 8;
 
     // This key was originally used to store only an array of panel configs.
     public static final String PREFS_CONFIG_KEY_OLD = "home_panels";
 
     // This key is now used to store a version number with the array of panel configs.
     public static final String PREFS_CONFIG_KEY = "home_panels_with_version";
 
     // Keys used with JSON object stored in prefs.