diff options
author | AdrianDC <radian.dc@gmail.com> | 2015-11-29 10:47:48 +0100 |
---|---|---|
committer | Roman Birg <roman@cyngn.com> | 2015-11-30 09:17:33 -0800 |
commit | e4c0797ac0dc5ee3fe9abb34e5054390954061d0 (patch) | |
tree | d27ed1f135ae8e21362c1b33c20d2693940b6f80 /packages/SystemUI/src/com/android/systemui/qs/QSPanel.java | |
parent | a9cdd4ff38aed1fb1bac64caec97bfb0b72d0ce9 (diff) | |
download | frameworks_base-e4c0797ac0dc5ee3fe9abb34e5054390954061d0.zip frameworks_base-e4c0797ac0dc5ee3fe9abb34e5054390954061d0.tar.gz frameworks_base-e4c0797ac0dc5ee3fe9abb34e5054390954061d0.tar.bz2 |
QuickSettings: Improve draggable tiles management
* Hide the carret on dual tiles that don't have details
* Handle dual label clicks as primary for basic tiles
* Fix the ripples management to avoid missing effects
* Prevent a crash on wrong size array to add a tile
Change-Id: I01471ea6e279b3437961c30bcfa922e9e0872388
Signed-off-by: AdrianDC <radian.dc@gmail.com>
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/qs/QSPanel.java')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QSPanel.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java index 88bcbff..4d37553 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java @@ -483,15 +483,12 @@ public class QSPanel extends ViewGroup { int r = -1; int c = -1; int rows = 0; - boolean rowIsDual = false; for (TileRecord record : mRecords) { if (record.tileView.getVisibility() == GONE) continue; // wrap to next column if we've reached the max # of columns - // also don't allow dual + single tiles on the same row - if (r == -1 || c == (mColumns - 1) || rowIsDual != record.tile.supportsDualTargets()) { + if (r == -1 || c == (mColumns - 1)) { r++; c = 0; - rowIsDual = record.tile.supportsDualTargets(); } else { c++; } @@ -502,7 +499,8 @@ public class QSPanel extends ViewGroup { View previousView = mBrightnessView; for (TileRecord record : mRecords) { - if (record.tileView.setDual(record.tile.supportsDualTargets())) { + final boolean dualTarget = record.tile.hasDualTargetsDetails(); + if (record.tileView.setDual(dualTarget, dualTarget)) { record.tileView.handleStateChanged(record.tile.getState()); } if (record.tileView.getVisibility() == GONE) continue; |