summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2013-03-29 12:30:15 +0100
committerDanny Baumann <dannybaumann@web.de>2013-03-30 12:49:51 +0100
commitf4a1118d1b5dc04ddfa1fc0f07de13b8c1143495 (patch)
tree6f3b206cee2273f57adcc949c453859394c37b80 /packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
parent7bc5b5f69b5cddb0b4d21ffe4bd3fb6702439e91 (diff)
downloadframeworks_base-f4a1118d1b5dc04ddfa1fc0f07de13b8c1143495.zip
frameworks_base-f4a1118d1b5dc04ddfa1fc0f07de13b8c1143495.tar.gz
frameworks_base-f4a1118d1b5dc04ddfa1fc0f07de13b8c1143495.tar.bz2
Fix pie controls being disabled by launcher gestures.
Some launchers have gestures for expanding/collapsing the status bar from swipe gestures which call the respective StatusBarService methods even if the status bar isn't visible due to expanded desktop. Because of that, the status bar code internally thinks the expansion is carried out (even if invisible), thus disabling the bottom pie controls in the process. Fix that by making PhoneStatusBar aware of it being hidden by expanded desktop and ignoring the expand call in that case. Change-Id: If386ca953517d9b5efcb6cb9054f5c5e6a9e0bc4
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java20
1 files changed, 16 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index df22056..8eef365 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -162,6 +162,7 @@ public abstract class BaseStatusBar extends SystemUI implements
new ArrayList<NavigationBarCallback>();
// Pie Control
+ protected int mExpandedDesktopState;
protected PieController mPieController;
protected PieLayout mPieContainer;
private int mPieTriggerSlots;
@@ -1356,24 +1357,35 @@ public abstract class BaseStatusBar extends SystemUI implements
Settings.System.PIE_GRAVITY), false, this);
resolver.registerContentObserver(Settings.System.getUriFor(
Settings.System.EXPANDED_DESKTOP_STATE), false, this);
+ resolver.registerContentObserver(Settings.System.getUriFor(
+ Settings.System.EXPANDED_DESKTOP_STYLE), false, this);
}
@Override
public void onChange(boolean selfChange) {
- mPieTriggerSlots = Settings.System.getInt(mContext.getContentResolver(),
+ ContentResolver resolver = mContext.getContentResolver();
+
+ mPieTriggerSlots = Settings.System.getInt(resolver,
Settings.System.PIE_GRAVITY, Position.BOTTOM.FLAG);
+ boolean expanded = Settings.System.getInt(resolver,
+ Settings.System.EXPANDED_DESKTOP_STATE, 0) == 1;
+ if (expanded) {
+ mExpandedDesktopState = Settings.System.getInt(resolver,
+ Settings.System.EXPANDED_DESKTOP_STYLE, 0);
+ } else {
+ mExpandedDesktopState = 0;
+ }
+
attachPie();
}
}
private boolean isPieEnabled() {
- boolean expanded = Settings.System.getInt(mContext.getContentResolver(),
- Settings.System.EXPANDED_DESKTOP_STATE, 0) == 1;
int pie = Settings.System.getInt(mContext.getContentResolver(),
Settings.System.PIE_CONTROLS, 0);
- return (pie == 1 && expanded) || pie == 2;
+ return (pie == 1 && mExpandedDesktopState != 0) || pie == 2;
}
private void attachPie() {