summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Daniel Sandler <dsandler@android.com> 2011-09-20 10:25:11 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-09-20 10:25:11 -0700
commitee0835b95de225fdc34d45b777b4595d01727a40 (patch)
tree355385924a4eae019758df113acdb512b0806379
parent20e93c0507b66e697d23c58c138484d652a1b810 (diff)
parent3144a6ca159a1569cf5b35ce5df8d77dfd84b0e3 (diff)
Merge changes Ib49af35a,Iaa20454c into ics-factoryrom
* changes: Stop clobbering the systemUiVisibility on navbar touch. (DO NOT MERGE) Fix disappearing nav icons. (DO NOT MERGE)
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java25
1 files changed, 12 insertions, 13 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 610edfa4b21f..7adda001bfcb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -143,9 +143,15 @@ public class NavigationBarView extends LinearLayout {
final View navButtons = mCurrentView.findViewById(R.id.nav_buttons);
final View lowLights = mCurrentView.findViewById(R.id.lights_out);
+ // ok, everyone, stop it right there
+ navButtons.animate().cancel();
+ lowLights.animate().cancel();
+
if (!animate) {
- lowLights.setVisibility(View.GONE);
- navButtons.setAlpha(1f);
+ navButtons.setAlpha(lightsOut ? 0f : 1f);
+
+ lowLights.setAlpha(lightsOut ? 1f : 0f);
+ lowLights.setVisibility(lightsOut ? View.VISIBLE : View.GONE);
} else {
navButtons.animate()
.alpha(lightsOut ? 0f : 1f)
@@ -153,8 +159,10 @@ public class NavigationBarView extends LinearLayout {
.start();
lowLights.setOnTouchListener(mLightsOutListener);
- lowLights.setAlpha(0f);
- lowLights.setVisibility(View.VISIBLE);
+ if (lowLights.getVisibility() == View.GONE) {
+ lowLights.setAlpha(0f);
+ lowLights.setVisibility(View.VISIBLE);
+ }
lowLights.animate()
.alpha(lightsOut ? 1f : 0f)
.setStartDelay(lightsOut ? 500 : 0)
@@ -236,15 +244,6 @@ public class NavigationBarView extends LinearLayout {
mCurrentView = mRotatedViews[Surface.ROTATION_0];
}
- @Override
- public boolean onTouchEvent(MotionEvent ev) {
- try {
- mBarService.setSystemUiVisibility(0);
- } catch (android.os.RemoteException ex) {
- }
- return false; // pass it on
- }
-
public void reorient() {
final int rot = mDisplay.getRotation();
for (int i=0; i<4; i++) {