Updates for QS DND tile
- Make detail panels not close when turned off
- Add auto-rule state for DND tile
Test: manual
Change-Id: I533cf0a27c54e84cd74ede72dcf10e2e5f9a070f
Fixes: 34765805
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java
index 65238b1..efc0668 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSDetailItems.java
@@ -81,8 +81,8 @@
mItemList.setAdapter(mAdapter);
mEmpty = findViewById(android.R.id.empty);
mEmpty.setVisibility(GONE);
- mEmptyText = (TextView) mEmpty.findViewById(android.R.id.title);
- mEmptyIcon = (ImageView) mEmpty.findViewById(android.R.id.icon);
+ mEmptyText = mEmpty.findViewById(android.R.id.title);
+ mEmptyIcon = mEmpty.findViewById(android.R.id.icon);
}
@Override
@@ -104,8 +104,10 @@
}
public void setEmptyState(int icon, int text) {
- mEmptyIcon.setImageResource(icon);
- mEmptyText.setText(text);
+ mEmptyIcon.post(() -> {
+ mEmptyIcon.setImageResource(icon);
+ mEmptyText.setText(text);
+ });
}
@Override