diff options
| author | 2012-10-19 19:12:29 +0200 | |
|---|---|---|
| committer | 2012-10-19 19:12:29 +0200 | |
| commit | 833808d0c69be8533759afdaa8ca4c004835f6a0 (patch) | |
| tree | e7443fd7158db388d0a244760f7ff278df9d509e | |
| parent | e9687ba8bdccc27f98fe1dcdc48faac0c0de4c18 (diff) | |
Fix transition into Recents with live wallpaper
Fixes regression introduced by:
738cfc91053fc888397ec2d139e0798f8c95b3ca
(Fixing wallpaper flash when going in/out of Recents)
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java | 6 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java | 17 |
2 files changed, 17 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java index c7f5ee845754..676326a4f307 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java @@ -113,10 +113,14 @@ public class RecentsActivity extends Activity { } } + public static boolean forceOpaqueBackground(Context context) { + return WallpaperManager.getInstance(context).getWallpaperInfo() != null; + } + @Override public void onStart() { // Hide wallpaper if it's not a static image - if (WallpaperManager.getInstance(this).getWallpaperInfo() != null) { + if (forceOpaqueBackground(this)) { updateWallpaperVisibility(false); } else { updateWallpaperVisibility(true); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index f38af5cf4878..fe33b02fbbea 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -36,7 +36,6 @@ import android.app.ActivityManagerNative; import android.app.ActivityOptions; import android.app.KeyguardManager; import android.app.PendingIntent; -import android.app.Service; import android.app.TaskStackBuilder; import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; @@ -81,7 +80,6 @@ import android.widget.RemoteViews; import android.widget.TextView; import java.util.ArrayList; -import java.util.List; public abstract class BaseStatusBar extends SystemUI implements CommandQueue.Callbacks { @@ -481,9 +479,18 @@ public abstract class BaseStatusBar extends SystemUI implements | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); if (firstTask == null) { - // The correct window animation will be applied via the activity's style - mContext.startActivityAsUser(intent, new UserHandle( - UserHandle.USER_CURRENT)); + if (RecentsActivity.forceOpaqueBackground(mContext)) { + ActivityOptions opts = ActivityOptions.makeCustomAnimation(mContext, + R.anim.recents_launch_from_launcher_enter, + R.anim.recents_launch_from_launcher_exit); + mContext.startActivityAsUser(intent, opts.toBundle(), new UserHandle( + UserHandle.USER_CURRENT)); + } else { + // The correct window animation will be applied via the activity's style + mContext.startActivityAsUser(intent, new UserHandle( + UserHandle.USER_CURRENT)); + } + } else { Bitmap first = firstTask.getThumbnail(); final Resources res = mContext.getResources(); |