setListAdapter(new GesturesSettingsAdapter(mAdapter));
getListView().setOnItemClickListener(this);
- mStore = Launcher.getGestureLibrary();
+ mStore = Launcher.getGestureLibrary(this);
mTask = (GesturesLoadTask) new GesturesLoadTask().execute();
registerForContextMenu(getListView());
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);
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;
}