summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/qs
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2016-05-11 10:54:51 -0700
committerRoman Birg <roman@cyngn.com>2016-05-11 15:23:31 -0700
commit548a36f43dfdd03bb670bde431308b076e0e2241 (patch)
tree386a589cf7ebed6505aece6690fa559642f979e7 /packages/SystemUI/src/com/android/systemui/qs
parentb991d946994c97ee0c629a8c0cde4290e853bf11 (diff)
downloadframeworks_base-548a36f43dfdd03bb670bde431308b076e0e2241.zip
frameworks_base-548a36f43dfdd03bb670bde431308b076e0e2241.tar.gz
frameworks_base-548a36f43dfdd03bb670bde431308b076e0e2241.tar.bz2
SystemUI: fix blank qs tile issues
The blank tiles were an artifact of precaching custom tiles. We need to not show them or count them if they don't have an actual tile attached to them yet. Also, allow disabled tiles to be edited. Ticket: CYNGNOS-2530 Change-Id: Ie6e0e6e18435eb53e9b419a05d780bdd1ee808b7 Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs')
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java
index ce2d94c..5ecc2a6 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java
@@ -366,10 +366,13 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
protected void drawTile(TileRecord r, QSTile.State state) {
if (mEditing) {
- if ((r.tile instanceof CustomQSTile) && ((CustomQSTile) r.tile).isUserRemoved()) {
- // don't modify visibility state.
+ if ((r.tile instanceof CustomQSTile)
+ && (((CustomQSTile) r.tile).isUserRemoved()
+ || ((CustomQSTile) r.tile).getTile() == null)) {
+ // don't modify visibility state if removed, or not yet published
} else {
state.visible = true;
+ state.enabled = true;
}
}
final int visibility = state.visible ? VISIBLE : GONE;
@@ -617,6 +620,13 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
final Iterator<QSTile<?>> newTileIterator = tilesCollection.iterator();
while (newTileIterator.hasNext()) {
QSTile<?> tile = newTileIterator.next();
+ if (tile instanceof CustomQSTile) {
+ if (((CustomQSTile) tile).isUserRemoved()
+ || ((CustomQSTile) tile).getTile() == null) {
+ // tile not published yet
+ continue;
+ }
+ }
final int tileDestPage = getPagesForCount(runningCount + 1) - 1;
if (DEBUG_TILES) {