summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/phone
diff options
context:
space:
mode:
authorJens Doll <jens.doll@gmail.com>2013-03-22 17:11:10 +0100
committerDvTonder <david.vantonder@gmail.com>2013-03-25 17:40:33 -0400
commitda062dc61ce6285caad889a0b7abe3232cc03790 (patch)
tree69fb7044335b6008bb846605f556c48b309103d4 /packages/SystemUI/src/com/android/systemui/statusbar/phone
parent9422b3f060892e55e509a11b3f35e8320f0ddc19 (diff)
downloadframeworks_base-da062dc61ce6285caad889a0b7abe3232cc03790.zip
frameworks_base-da062dc61ce6285caad889a0b7abe3232cc03790.tar.gz
frameworks_base-da062dc61ce6285caad889a0b7abe3232cc03790.tar.bz2
Add pie control optimizations for Phone UI.
This commit brings some pie control tweaks to the Phone UI. These tweaks make the pie controls react to several conditions that are are special to the Phone UI. That means that this piece of code is more deeply embedded within the SystemUI code. This mostly adds the foloowing behaviour, that is Phone UI dependent: * Disable BOTTOM trigger when notification area is expanded * Disable LEFT and RIGHT trigger when a keyguard is active * Enable search light feature Patch Set 3: * CyanogenMod Code Style. * setDisabledFlags now belongs to navigation bar callbacks Patch Set 5: * Removed duplicated .observe() Patch Set 10: * Fixed unintended trigger activation Patch Set 13: * Searchlight opens directly on the bottom (on the lock screen) Patch Set 15: * Fix conflict/rebase Change-Id: I551745b69791adca75190c54282be19d85db75a9
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/phone')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java16
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java15
2 files changed, 31 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 1756dba..3d26e99 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -106,6 +106,7 @@ import com.android.systemui.statusbar.policy.NetworkController;
import com.android.systemui.statusbar.policy.NotificationRowLayout;
import com.android.systemui.statusbar.policy.OnSizeChangedListener;
import com.android.systemui.statusbar.policy.Prefs;
+import com.android.systemui.statusbar.policy.PieController.Position;
import com.android.systemui.statusbar.powerwidget.PowerWidget;
public class PhoneStatusBar extends BaseStatusBar {
@@ -2220,6 +2221,21 @@ public class PhoneStatusBar extends BaseStatusBar {
}
propagateMenuVisibility(showMenu);
+ // hide pie triggers when keyguard is visible
+ try {
+ if (mWindowManagerService.isKeyguardLocked()) {
+ updatePieTriggerMask(Position.BOTTOM.FLAG
+ | Position.TOP.FLAG);
+ } else {
+ updatePieTriggerMask(Position.LEFT.FLAG
+ | Position.BOTTOM.FLAG
+ | Position.RIGHT.FLAG
+ | Position.TOP.FLAG);
+ }
+ } catch (RemoteException e) {
+ // nothing else to do ...
+ }
+
// See above re: lights-out policy for legacy apps.
if (showMenu) setLightsOn(true);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index a86a869..1e94e97 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -27,6 +27,7 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.accessibility.AccessibilityEvent;
import com.android.systemui.R;
+import com.android.systemui.statusbar.policy.PieController.Position;
public class PhoneStatusBarView extends PanelBar {
private static final String TAG = "PhoneStatusBarView";
@@ -164,6 +165,12 @@ public class PhoneStatusBarView extends PanelBar {
mBar.makeExpandedInvisibleSoon();
mFadingPanel = null;
mLastFullyOpenedPanel = null;
+
+ // show up you pie controls
+ mBar.updatePieTriggerMask(Position.LEFT.FLAG
+ | Position.TOP.FLAG
+ | Position.RIGHT.FLAG
+ | Position.TOP.FLAG);
}
@Override
@@ -172,6 +179,14 @@ public class PhoneStatusBarView extends PanelBar {
if (openPanel != mLastFullyOpenedPanel) {
openPanel.sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
}
+
+ // back off you pie controls!
+ if (mShouldFade) {
+ mBar.updatePieTriggerMask(Position.LEFT.FLAG
+ | Position.RIGHT.FLAG
+ | Position.TOP.FLAG);
+ }
+
mFadingPanel = openPanel;
mLastFullyOpenedPanel = openPanel;
mShouldFade = true; // now you own the fade, mister