Skip to content

Commit 4ce82df

Browse files
mikejurkaAndroid (Google) Code Review
authored andcommitted
Merge "Solve issue where labels in Recents were blank" into jb-mr1-dev
2 parents e03c024 + fe09ad8 commit 4ce82df

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import android.animation.Animator;
2020
import android.animation.LayoutTransition;
2121
import android.animation.TimeInterpolator;
22-
import android.app.Activity;
2322
import android.app.ActivityManager;
2423
import android.app.ActivityManagerNative;
2524
import android.app.ActivityOptions;
@@ -178,30 +177,31 @@ public View getView(int position, View convertView, ViewGroup parent) {
178177
mNumItemsWaitingForThumbnailsAndIcons--;
179178
}
180179
if (index == 0) {
181-
final Activity activity = (Activity) RecentsPanelView.this.getContext();
182180
if (mWaitingForWindowAnimation) {
183181
if (mItemToAnimateInWhenWindowAnimationIsFinished != null) {
184-
for (View v :
185-
new View[] { holder.iconView, holder.labelView, holder.calloutLine }) {
186-
if (v != null) {
187-
v.setAlpha(1f);
188-
v.setTranslationX(0f);
189-
v.setTranslationY(0f);
190-
}
182+
holder.iconView.setAlpha(1f);
183+
holder.iconView.setTranslationX(0f);
184+
holder.iconView.setTranslationY(0f);
185+
holder.labelView.setAlpha(1f);
186+
holder.labelView.setTranslationX(0f);
187+
holder.labelView.setTranslationY(0f);
188+
if (holder.calloutLine != null) {
189+
holder.calloutLine.setAlpha(1f);
190+
holder.calloutLine.setTranslationX(0f);
191+
holder.calloutLine.setTranslationY(0f);
191192
}
192193
}
193194
mItemToAnimateInWhenWindowAnimationIsFinished = holder;
194195
final int translation = -getResources().getDimensionPixelSize(
195196
R.dimen.status_bar_recents_app_icon_translate_distance);
196197
final Configuration config = getResources().getConfiguration();
197198
if (config.orientation == Configuration.ORIENTATION_PORTRAIT) {
198-
for (View v :
199-
new View[] { holder.iconView, holder.labelView, holder.calloutLine }) {
200-
if (v != null) {
201-
v.setAlpha(0f);
202-
v.setTranslationX(translation);
203-
}
204-
}
199+
holder.iconView.setAlpha(0f);
200+
holder.iconView.setTranslationX(translation);
201+
holder.labelView.setAlpha(0f);
202+
holder.labelView.setTranslationX(translation);
203+
holder.calloutLine.setAlpha(0f);
204+
holder.calloutLine.setTranslationX(translation);
205205
} else {
206206
holder.iconView.setAlpha(0f);
207207
holder.iconView.setTranslationY(translation);
@@ -225,6 +225,17 @@ public void recycleView(View v) {
225225
holder.thumbnailView.setTag(null);
226226
holder.thumbnailView.setOnLongClickListener(null);
227227
holder.thumbnailView.setVisibility(INVISIBLE);
228+
holder.iconView.setAlpha(1f);
229+
holder.iconView.setTranslationX(0f);
230+
holder.iconView.setTranslationY(0f);
231+
holder.labelView.setAlpha(1f);
232+
holder.labelView.setTranslationX(0f);
233+
holder.labelView.setTranslationY(0f);
234+
if (holder.calloutLine != null) {
235+
holder.calloutLine.setAlpha(1f);
236+
holder.calloutLine.setTranslationX(0f);
237+
holder.calloutLine.setTranslationY(0f);
238+
}
228239
holder.taskDescription = null;
229240
holder.loadedThumbnailAndIcon = false;
230241
}

0 commit comments

Comments
 (0)