added null check in doInBackground and if null, properly intializes

variables.

Bug:29234237
Change-Id: I1d65b1a232c71efdd11a917769aec5044867a085
(cherry picked from commit 0f0f5414f4)
This commit is contained in:
Richard Ho
2016-06-13 16:54:04 -07:00
parent 189ef624d1
commit 8c4e4b0865

View File

@@ -307,6 +307,13 @@ public class SettingsDrawerActivity extends Activity {
return TileUtils.getCategories(SettingsDrawerActivity.this, sTileCache);
}
@Override
protected void onPreExecute() {
if (sConfigTracker == null || sTileCache == null) {
getDashboardCategories();
}
}
@Override
protected void onPostExecute(List<DashboardCategory> dashboardCategories) {
for (int i = 0; i < dashboardCategories.size(); i++) {