|
36 | 36 | import android.app.ActivityOptions; |
37 | 37 | import android.app.KeyguardManager; |
38 | 38 | import android.app.PendingIntent; |
39 | | -import android.app.Service; |
40 | 39 | import android.app.TaskStackBuilder; |
41 | 40 | import android.content.ActivityNotFoundException; |
42 | 41 | import android.content.BroadcastReceiver; |
|
81 | 80 | import android.widget.TextView; |
82 | 81 |
|
83 | 82 | import java.util.ArrayList; |
84 | | -import java.util.List; |
85 | 83 |
|
86 | 84 | public abstract class BaseStatusBar extends SystemUI implements |
87 | 85 | CommandQueue.Callbacks { |
@@ -481,9 +479,18 @@ protected void toggleRecentsActivity() { |
481 | 479 | | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); |
482 | 480 |
|
483 | 481 | if (firstTask == null) { |
484 | | - // The correct window animation will be applied via the activity's style |
485 | | - mContext.startActivityAsUser(intent, new UserHandle( |
486 | | - UserHandle.USER_CURRENT)); |
| 482 | + if (RecentsActivity.forceOpaqueBackground(mContext)) { |
| 483 | + ActivityOptions opts = ActivityOptions.makeCustomAnimation(mContext, |
| 484 | + R.anim.recents_launch_from_launcher_enter, |
| 485 | + R.anim.recents_launch_from_launcher_exit); |
| 486 | + mContext.startActivityAsUser(intent, opts.toBundle(), new UserHandle( |
| 487 | + UserHandle.USER_CURRENT)); |
| 488 | + } else { |
| 489 | + // The correct window animation will be applied via the activity's style |
| 490 | + mContext.startActivityAsUser(intent, new UserHandle( |
| 491 | + UserHandle.USER_CURRENT)); |
| 492 | + } |
| 493 | + |
487 | 494 | } else { |
488 | 495 | Bitmap first = firstTask.getThumbnail(); |
489 | 496 | final Resources res = mContext.getResources(); |
|
0 commit comments