Fix crash when started via Instrumentation.

Change-Id: Iffe2c76e93e67d56a239228fd2d9e6928ab9f65e
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 3a9b2c1..47fa66b 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -348,6 +348,9 @@
         }
 
         super.onCreate(savedInstanceState);
+
+        // the LauncherApplication should call this, but in case of Instrumentation it might not be present yet
+        LauncherAppState.setApplicationContext(getApplicationContext());
         LauncherAppState app = LauncherAppState.getInstance();
         mSharedPrefs = getSharedPreferences(LauncherAppState.getSharedPreferencesKey(),
                 Context.MODE_PRIVATE);