OSDN Git Service

Avoid NPE until we understand better.
authorJeff Sharkey <jsharkey@android.com>
Fri, 18 May 2012 21:00:10 +0000 (14:00 -0700)
committerThe Android Automerger <android-build@android.com>
Fri, 18 May 2012 21:54:16 +0000 (14:54 -0700)
Bug: 6450986
Change-Id: I68af8fedc419cd3142ba2bb7530b77aca7718123

src/com/android/settings/DataUsageSummary.java

index 4882fbe..1bdc1d1 100644 (file)
@@ -1067,6 +1067,10 @@ public class DataUsageSummary extends Fragment {
         public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
             final Context context = view.getContext();
             final AppItem app = (AppItem) parent.getItemAtPosition(position);
+
+            // TODO: sigh, remove this hack once we understand 6450986
+            if (mUidDetailProvider == null || app == null) return;
+
             final UidDetail detail = mUidDetailProvider.getUidDetail(app.appId, true);
             AppDetailsFragment.show(DataUsageSummary.this, app, detail.label);
         }