Make FetchCategoriesTask static
am: 0a6e384c15
Change-Id: I0384674ccb79aafef297b2522e49167177c3ec65
diff --git a/src/com/android/wallpaper/module/DefaultCategoryProvider.java b/src/com/android/wallpaper/module/DefaultCategoryProvider.java
index 4223ce4..721ccf1 100755
--- a/src/com/android/wallpaper/module/DefaultCategoryProvider.java
+++ b/src/com/android/wallpaper/module/DefaultCategoryProvider.java
@@ -118,18 +118,20 @@
}
};
- new FetchCategoriesTask(delegatingReceiver).execute();
+ new FetchCategoriesTask(delegatingReceiver, mAppContext).execute();
}
/**
* AsyncTask subclass used for fetching all the categories and pushing them one at a time to
* the receiver.
*/
- protected class FetchCategoriesTask extends AsyncTask<Void, Category, Void> {
+ protected static class FetchCategoriesTask extends AsyncTask<Void, Category, Void> {
private CategoryReceiver mReceiver;
+ protected final Context mAppContext;
- public FetchCategoriesTask(CategoryReceiver receiver) {
+ public FetchCategoriesTask(CategoryReceiver receiver, Context context) {
mReceiver = receiver;
+ mAppContext = context.getApplicationContext();
}
@Override