Skip to content

Commit 2da59ff

Browse files
Dianne HackbornAndroid (Google) Code Review
authored andcommitted
Merge "Fix issue #5192141: systemui asplodes after enough tapping on the windowlist button"
2 parents 192df69 + cfb9f2b commit 2da59ff

File tree

6 files changed

+18
-6
lines changed

6 files changed

+18
-6
lines changed

core/java/android/app/ActivityThread.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1943,7 +1943,6 @@ private void handleLaunchActivity(ActivityClientRecord r, Intent customIntent) {
19431943
// we are back active so skip it.
19441944
unscheduleGcIdler();
19451945

1946-
Slog.i(TAG, "Launch: profileFd=" + r.profileFile + " stop=" + r.autoStopProfiler);
19471946
if (r.profileFd != null) {
19481947
mBoundApplication.setProfiler(r.profileFile, r.profileFd);
19491948
mBoundApplication.startProfiling();

packages/SystemUI/res/anim/recent_appear.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616

1717
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
1818
android:fromAlpha="0.0" android:toAlpha="1.0"
19-
android:duration="@android:integer/config_shortAnimTime"
19+
android:duration="@android:integer/config_mediumAnimTime"
2020
/>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
// should group this into a multi-property animation
3030
private static final int OPEN_DURATION = 136;
3131
private static final int CLOSE_DURATION = 250;
32+
private static final int SCRIM_DURATION = 400;
3233
private static final String TAG = RecentsPanelView.TAG;
3334
private static final boolean DEBUG = RecentsPanelView.DEBUG;
3435

@@ -71,22 +72,24 @@ void createAnimation(boolean appearing) {
7172
posAnim.setInterpolator(appearing
7273
? new android.view.animation.DecelerateInterpolator(2.5f)
7374
: new android.view.animation.AccelerateInterpolator(2.5f));
75+
posAnim.setDuration(appearing ? OPEN_DURATION : CLOSE_DURATION);
7476

7577
Animator glowAnim = ObjectAnimator.ofFloat(mContentView, "alpha",
7678
mContentView.getAlpha(), appearing ? 1.0f : 0.0f);
7779
glowAnim.setInterpolator(appearing
7880
? new android.view.animation.AccelerateInterpolator(1.0f)
7981
: new android.view.animation.DecelerateInterpolator(1.0f));
82+
glowAnim.setDuration(appearing ? OPEN_DURATION : CLOSE_DURATION);
8083

8184
mContentAnim = new AnimatorSet();
8285
final Builder builder = mContentAnim.play(glowAnim).with(posAnim);
8386
Drawable background = mScrimView.getBackground();
8487
if (background != null) {
8588
Animator bgAnim = ObjectAnimator.ofInt(background,
8689
"alpha", appearing ? 0 : 255, appearing ? 255 : 0);
90+
bgAnim.setDuration(appearing ? SCRIM_DURATION : CLOSE_DURATION);
8791
builder.with(bgAnim);
8892
}
89-
mContentAnim.setDuration(appearing ? OPEN_DURATION : CLOSE_DURATION);
9093
mContentAnim.addListener(this);
9194
if (mListener != null) {
9295
mContentAnim.addListener(mListener);

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import android.graphics.Shader.TileMode;
4040
import android.graphics.drawable.BitmapDrawable;
4141
import android.graphics.drawable.Drawable;
42-
import android.graphics.drawable.LayerDrawable;
4342
import android.net.Uri;
4443
import android.os.AsyncTask;
4544
import android.os.Handler;
@@ -497,7 +496,7 @@ void loadActivityDescription(ActivityDescription ad, int index) {
497496
synchronized (ad) {
498497
ad.mLabel = label;
499498
ad.mIcon = icon;
500-
ad.setThumbnail(thumbs.mainThumbnail);
499+
ad.setThumbnail(thumbs != null ? thumbs.mainThumbnail : null);
501500
}
502501
}
503502

@@ -591,7 +590,7 @@ protected Void doInBackground(Void... params) {
591590
ActivityDescription ad = descriptions.get(i);
592591
loadActivityDescription(ad, i);
593592
long now = SystemClock.uptimeMillis();
594-
nextTime += 200;
593+
nextTime += 150;
595594
if (nextTime > now) {
596595
try {
597596
Thread.sleep(nextTime-now);

services/java/com/android/server/am/TaskRecord.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ void dump(PrintWriter pw, String prefix) {
116116
if (!askedCompatMode) {
117117
pw.print(prefix); pw.print("askedCompatMode="); pw.println(askedCompatMode);
118118
}
119+
pw.print(prefix); pw.print("lastThumbnail="); pw.print(lastThumbnail);
120+
pw.print(" lastDescription="); pw.println(lastDescription);
119121
pw.print(prefix); pw.print("lastActiveTime="); pw.print(lastActiveTime);
120122
pw.print(" (inactive for ");
121123
pw.print((getInactiveDuration()/1000)); pw.println("s)");

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ public class WindowManagerService extends IWindowManager.Stub
163163
static final boolean DEBUG_WALLPAPER = false;
164164
static final boolean DEBUG_DRAG = false;
165165
static final boolean DEBUG_SCREEN_ON = false;
166+
static final boolean DEBUG_SCREENSHOT = false;
166167
static final boolean SHOW_SURFACE_ALLOC = false;
167168
static final boolean SHOW_TRANSACTIONS = false;
168169
static final boolean HIDE_STACK_CRAWLS = true;
@@ -4996,6 +4997,14 @@ public Bitmap screenshotApplications(IBinder appToken, int width, int height) {
49964997
dh = tmp;
49974998
rot = (rot == Surface.ROTATION_90) ? Surface.ROTATION_270 : Surface.ROTATION_90;
49984999
}
5000+
if (DEBUG_SCREENSHOT) {
5001+
Slog.i(TAG, "Screenshot: " + dw + "x" + dh + " from 0 to " + maxLayer);
5002+
for (int i=0; i<mWindows.size(); i++) {
5003+
Slog.i(TAG, mWindows.get(i) + ": " + mWindows.get(i).mLayer
5004+
+ " animLayer=" + mWindows.get(i).mAnimLayer
5005+
+ " surfaceLayer=" + mWindows.get(i).mSurfaceLayer);
5006+
}
5007+
}
49995008
rawss = Surface.screenshot(dw, dh, 0, maxLayer);
50005009
}
50015010

0 commit comments

Comments
 (0)