|
33 | 33 | import android.graphics.drawable.BitmapDrawable; |
34 | 34 | import android.graphics.drawable.Drawable; |
35 | 35 | import android.net.Uri; |
| 36 | +import android.os.Bundle; |
36 | 37 | import android.os.RemoteException; |
37 | 38 | import android.os.UserHandle; |
38 | 39 | import android.provider.Settings; |
@@ -581,25 +582,23 @@ public void handleOnClick(View view) { |
581 | 582 | bm = holder.thumbnailViewImage.getDrawingCache(); |
582 | 583 | usingDrawingCache = true; |
583 | 584 | } |
584 | | - |
585 | | - if (bm == null) { |
586 | | - throw new RuntimeException("Recents thumbnail is null"); |
587 | | - } |
588 | | - ActivityOptions opts = ActivityOptions.makeThumbnailScaleUpAnimation( |
589 | | - holder.thumbnailViewImage, bm, 0, 0, null); |
| 585 | + Bundle opts = (bm == null) ? |
| 586 | + null : |
| 587 | + ActivityOptions.makeThumbnailScaleUpAnimation( |
| 588 | + holder.thumbnailViewImage, bm, 0, 0, null).toBundle(); |
590 | 589 |
|
591 | 590 | show(false); |
592 | 591 | if (ad.taskId >= 0) { |
593 | 592 | // This is an active task; it should just go to the foreground. |
594 | 593 | am.moveTaskToFront(ad.taskId, ActivityManager.MOVE_TASK_WITH_HOME, |
595 | | - opts.toBundle()); |
| 594 | + opts); |
596 | 595 | } else { |
597 | 596 | Intent intent = ad.intent; |
598 | 597 | intent.addFlags(Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY |
599 | 598 | | Intent.FLAG_ACTIVITY_TASK_ON_HOME |
600 | 599 | | Intent.FLAG_ACTIVITY_NEW_TASK); |
601 | 600 | if (DEBUG) Log.v(TAG, "Starting activity " + intent); |
602 | | - context.startActivityAsUser(intent, opts.toBundle(), |
| 601 | + context.startActivityAsUser(intent, opts, |
603 | 602 | new UserHandle(UserHandle.USER_CURRENT)); |
604 | 603 | } |
605 | 604 | if (usingDrawingCache) { |
|
0 commit comments