OSDN Git Service

Fix crash in add QS tiles
authorJason Monk <jmonk@google.com>
Mon, 1 Feb 2016 16:08:18 +0000 (11:08 -0500)
committerJason Monk <jmonk@google.com>
Mon, 1 Feb 2016 16:08:18 +0000 (11:08 -0500)
It seems one of the tiles has an empty icon... Fix the crash for
now, will deal with the tile later.

Bug: 26897121
Change-Id: I9abd073a891a5222711fe81ed05ade2a87d70121

packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java

index a4d7e93..414cdbd 100644 (file)
@@ -172,7 +172,7 @@ public class TileAdapter extends BaseAdapter {
         }
 
         private void addTile(String spec, Icon icon, CharSequence label, Context context) {
-            addTile(spec, icon.getDrawable(context), label);
+            addTile(spec, icon != null ? icon.getDrawable(context) : null, label);
         }
 
         private View getView(Context context, View convertView, ViewGroup parent,