Skip to content

Commit 4d12ec4

Browse files
committed
remove obsolete notificaiton pane visibility code.
Bug: 6647263 Change-Id: I634f17c608effe215b9ec4241355fd7cc8860d8e
1 parent 7d2e896 commit 4d12ec4

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ public void onFinishInflate() {
104104
mClearButton.setOnClickListener(mClearButtonListener);
105105

106106
mShowing = false;
107-
108-
setContentFrameVisible(mNotificationCount > 0, false);
109107
}
110108

111109
@Override
@@ -129,10 +127,6 @@ public View getClearButton() {
129127
}
130128

131129
public void show(boolean show, boolean animate) {
132-
if (show && !mShowing) {
133-
setContentFrameVisible(mSettingsView != null || mNotificationCount > 0, false);
134-
}
135-
136130
if (animate) {
137131
if (mShowing != show) {
138132
mShowing = show;
@@ -226,53 +220,10 @@ public void onClick(View v) {
226220
}
227221

228222
public void setNotificationCount(int n) {
229-
// Slog.d(TAG, "notificationCount=" + n);
230-
if (!mShowing) {
231-
// just do it, already
232-
setContentFrameVisible(n > 0, false);
233-
} else if (mSettingsView == null) {
234-
// we're looking at the notifications; time to maybe make some changes
235-
if ((mNotificationCount > 0) != (n > 0)) {
236-
setContentFrameVisible(n > 0, true);
237-
}
238-
}
239223
mNotificationCount = n;
240224
}
241225

242226
public void setContentFrameVisible(final boolean showing, boolean animate) {
243-
if (!animate) {
244-
mContentFrame.setVisibility(showing ? View.VISIBLE : View.GONE);
245-
mContentFrame.setAlpha(1f);
246-
// the translation will be patched up when the window is slid into place
247-
return;
248-
}
249-
250-
if (showing) {
251-
mContentFrame.setVisibility(View.VISIBLE);
252-
}
253-
AnimatorSet set = new AnimatorSet();
254-
set.play(ObjectAnimator.ofFloat(
255-
mContentFrame, "alpha",
256-
showing ? 0f : 1f,
257-
showing ? 1f : 0f))
258-
.with(ObjectAnimator.ofFloat(
259-
mContentParent, "translationY",
260-
showing ? mContentFrameMissingTranslation : 0f,
261-
showing ? 0f : mContentFrameMissingTranslation))
262-
;
263-
264-
set.setDuration(200);
265-
set.addListener(new AnimatorListenerAdapter() {
266-
@Override
267-
public void onAnimationEnd(Animator _a) {
268-
if (!showing) {
269-
mContentFrame.setVisibility(View.GONE);
270-
mContentFrame.setAlpha(1f);
271-
}
272-
updateClearButton();
273-
}
274-
});
275-
set.start();
276227
}
277228

278229
public void swapPanels() {
@@ -292,11 +243,6 @@ public void swapPanels() {
292243
public void onAnimationEnd(Animator _a) {
293244
toHide.setVisibility(View.GONE);
294245
if (toShow != null) {
295-
if (mNotificationCount == 0) {
296-
// show the frame for settings, hide for notifications
297-
setContentFrameVisible(toShow == mSettingsView, true);
298-
}
299-
300246
toShow.setVisibility(View.VISIBLE);
301247
if (toShow == mSettingsView || mNotificationCount > 0) {
302248
ObjectAnimator.ofFloat(toShow, "alpha", 0f, 1f)

0 commit comments

Comments
 (0)