Bug 1297127 - add ActivityStream.isHomePanel() fake-pref for switching from HomeScreen to HomePanel r?sebastian draft
authorAndrzej Hunt <ahunt@mozilla.com>
Mon, 29 Aug 2016 15:15:18 -0700
changeset 406908 41e5922460ccb2ded3d4e00975eb45f15c1ac4a0
parent 406907 155d6001460854ebff20bd1287fcb11c055cea66
child 406909 e2d2895a0e678b58336f66fdae01efcd6264954e
push id27871
push userahunt@mozilla.com
push dateMon, 29 Aug 2016 22:40:02 +0000
reviewerssebastian
bugs1297127
milestone51.0a1
Bug 1297127 - add ActivityStream.isHomePanel() fake-pref for switching from HomeScreen to HomePanel r?sebastian This will allow us to more easily switch ActivityStream from being a HomePanel to being a complete HomePager replacement - this could potentially be extended to read from a preference, but hardcoding is probably sufficient for now. MozReview-Commit-ID: HxQg5bOTmdh
mobile/android/base/java/org/mozilla/gecko/activitystream/ActivityStream.java
--- a/mobile/android/base/java/org/mozilla/gecko/activitystream/ActivityStream.java
+++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/ActivityStream.java
@@ -15,9 +15,17 @@ public class ActivityStream {
     public static boolean isEnabled(Context context) {
         if (!AppConstants.MOZ_ANDROID_ACTIVITY_STREAM) {
             return false;
         }
 
         return GeckoSharedPrefs.forApp(context)
                 .getBoolean(GeckoPreferences.PREFS_ACTIVITY_STREAM, false);
     }
+
+    /**
+     * Query whether we want to display Activity Stream as a Home Panel (within the Home Panel),
+     * or as a HomePager replacement.
+     */
+    public static boolean isHomePanel() {
+        return false;
+    }
 }