Fixes #1930069. Prevents NPE in GesturesActivity. Ensures the store is always != null.
diff --git a/src/com/android/launcher/Launcher.java b/src/com/android/launcher/Launcher.java
index 8ac47d0..bf2be91 100644
--- a/src/com/android/launcher/Launcher.java
+++ b/src/com/android/launcher/Launcher.java
@@ -246,11 +246,7 @@
         super.onCreate(savedInstanceState);
         mInflater = getLayoutInflater();
 
-        if (sLibrary == null) {
-            // The context is not kept by the library so it's safe to do this
-            sLibrary = GestureLibraries.fromPrivateFile(Launcher.this,
-                    GesturesConstants.STORE_NAME);
-        }
+        getGestureLibrary(this);
 
         mAppWidgetManager = AppWidgetManager.getInstance(this);
 
@@ -1983,7 +1979,11 @@
         return sModel;
     }
 
-    static GestureLibrary getGestureLibrary() {
+    static GestureLibrary getGestureLibrary(Context context) {
+        if (sLibrary == null) {
+            // The context is not kept by the library so it's safe to do this
+            sLibrary = GestureLibraries.fromPrivateFile(context, GesturesConstants.STORE_NAME);
+        }
         return sLibrary;
     }