Skip to content

Commit 4cea3b4

Browse files
committed
Fix disappearing nav icons. (DO NOT MERGE)
Bug: 5328284 Change-Id: Iaa20454cff9f5a340da7b0c71190796445e8a205
1 parent 88b18eb commit 4cea3b4

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

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

Lines changed: 12 additions & 4 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)

0 commit comments

Comments
 (0)