Skip to content

Commit ee0835b

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
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)
2 parents 20e93c0 + 3144a6c commit ee0835b

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,26 @@ public void setLowProfile(final boolean lightsOut, final boolean animate, final
143143
final View navButtons = mCurrentView.findViewById(R.id.nav_buttons);
144144
final View lowLights = mCurrentView.findViewById(R.id.lights_out);
145145

146+
// ok, everyone, stop it right there
147+
navButtons.animate().cancel();
148+
lowLights.animate().cancel();
149+
146150
if (!animate) {
147-
lowLights.setVisibility(View.GONE);
148-
navButtons.setAlpha(1f);
151+
navButtons.setAlpha(lightsOut ? 0f : 1f);
152+
153+
lowLights.setAlpha(lightsOut ? 1f : 0f);
154+
lowLights.setVisibility(lightsOut ? View.VISIBLE : View.GONE);
149155
} else {
150156
navButtons.animate()
151157
.alpha(lightsOut ? 0f : 1f)
152158
.setDuration(lightsOut ? 600 : 200)
153159
.start();
154160

155161
lowLights.setOnTouchListener(mLightsOutListener);
156-
lowLights.setAlpha(0f);
157-
lowLights.setVisibility(View.VISIBLE);
162+
if (lowLights.getVisibility() == View.GONE) {
163+
lowLights.setAlpha(0f);
164+
lowLights.setVisibility(View.VISIBLE);
165+
}
158166
lowLights.animate()
159167
.alpha(lightsOut ? 1f : 0f)
160168
.setStartDelay(lightsOut ? 500 : 0)
@@ -236,15 +244,6 @@ public void onFinishInflate() {
236244
mCurrentView = mRotatedViews[Surface.ROTATION_0];
237245
}
238246

239-
@Override
240-
public boolean onTouchEvent(MotionEvent ev) {
241-
try {
242-
mBarService.setSystemUiVisibility(0);
243-
} catch (android.os.RemoteException ex) {
244-
}
245-
return false; // pass it on
246-
}
247-
248247
public void reorient() {
249248
final int rot = mDisplay.getRotation();
250249
for (int i=0; i<4; i++) {

0 commit comments

Comments
 (0)