Fixing wallpaper flash when going in/out of Recents
Bug: 7372516 Bug: 7216872 Change-Id: I2a2308a85caf9f2ad2d382c709e5f8867bd060be
This commit is contained in:
@@ -109,7 +109,7 @@
|
||||
|
||||
<activity android:name=".recent.RecentsActivity"
|
||||
android:label="@string/accessibility_desc_recent_apps"
|
||||
android:theme="@android:style/Theme.Holo.Wallpaper.NoTitleBar"
|
||||
android:theme="@style/RecentsStyle"
|
||||
android:excludeFromRecents="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:exported="true">
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:detachWallpaper="true"
|
||||
android:shareInterpolator="false"
|
||||
android:zAdjustment="normal">
|
||||
<!--scale android:fromXScale="2.0" android:toXScale="1.0"
|
||||
@@ -28,9 +27,4 @@
|
||||
android:fillBefore="true" android:fillAfter="true"
|
||||
android:pivotX="50%p" android:pivotY="50%p"
|
||||
android:duration="250" /-->
|
||||
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||
android:fillEnabled="true"
|
||||
android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic"
|
||||
android:duration="250"/>
|
||||
</set>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false"
|
||||
android:zAdjustment="normal">
|
||||
android:zAdjustment="top">
|
||||
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
|
||||
android:fillEnabled="true"
|
||||
android:fillBefore="true" android:fillAfter="true"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2012, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false"
|
||||
android:zAdjustment="normal">
|
||||
<!--scale android:fromXScale="2.0" android:toXScale="1.0"
|
||||
android:fromYScale="2.0" android:toYScale="1.0"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic"
|
||||
android:fillEnabled="true"
|
||||
android:fillBefore="true" android:fillAfter="true"
|
||||
android:pivotX="50%p" android:pivotY="50%p"
|
||||
android:duration="250" /-->
|
||||
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||
android:fillEnabled="true"
|
||||
android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic"
|
||||
android:duration="250"/>
|
||||
</set>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2012, The Android Open Source Project
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
-->
|
||||
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false"
|
||||
android:zAdjustment="top">
|
||||
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
|
||||
android:fillEnabled="true"
|
||||
android:fillBefore="true" android:fillAfter="true"
|
||||
android:interpolator="@android:interpolator/decelerate_cubic"
|
||||
android:duration="250"/>
|
||||
</set>
|
||||
@@ -16,6 +16,24 @@
|
||||
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="RecentsStyle" parent="@android:style/Theme.Holo.Wallpaper.NoTitleBar">
|
||||
<item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item>
|
||||
</style>
|
||||
|
||||
<!-- Animations for a non-full-screen window or activity. -->
|
||||
<style name="Animation.RecentsActivity" parent="@android:style/Animation.Activity">
|
||||
<item name="android:activityOpenEnterAnimation">@anim/recents_launch_from_launcher_enter</item>
|
||||
<item name="android:activityOpenExitAnimation">@anim/recents_launch_from_launcher_exit</item>
|
||||
<item name="android:taskOpenEnterAnimation">@anim/recents_launch_from_launcher_enter</item>
|
||||
<item name="android:taskOpenExitAnimation">@anim/recents_launch_from_launcher_exit</item>
|
||||
<item name="android:taskToFrontEnterAnimation">@anim/recents_launch_from_launcher_enter</item>
|
||||
<item name="android:taskToFrontExitAnimation">@anim/recents_launch_from_launcher_exit</item>
|
||||
<item name="android:wallpaperOpenEnterAnimation">@anim/recents_launch_from_launcher_enter</item>
|
||||
<item name="android:wallpaperOpenExitAnimation">@anim/recents_launch_from_launcher_exit</item>
|
||||
<item name="android:wallpaperIntraOpenEnterAnimation">@anim/wallpaper_recents_launch_from_launcher_enter</item>
|
||||
<item name="android:wallpaperIntraOpenExitAnimation">@anim/wallpaper_recents_launch_from_launcher_exit</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.StatusBar.IntruderAlert"
|
||||
parent="@*android:style/TextAppearance.StatusBar">
|
||||
</style>
|
||||
|
||||
@@ -485,10 +485,8 @@ public abstract class BaseStatusBar extends SystemUI implements
|
||||
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
||||
|
||||
if (firstTask == null) {
|
||||
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(
|
||||
// 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();
|
||||
|
||||
@@ -3385,8 +3385,15 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
} else {
|
||||
// Exiting app
|
||||
if (scaleUp) {
|
||||
// noop animation
|
||||
a = new AlphaAnimation(1, 0);
|
||||
if (transit == WindowManagerPolicy.TRANSIT_WALLPAPER_INTRA_OPEN) {
|
||||
// Fade out while bringing up selected activity. This keeps the
|
||||
// current activity from showing through a launching wallpaper
|
||||
// activity.
|
||||
a = new AlphaAnimation(1, 0);
|
||||
} else {
|
||||
// noop animation
|
||||
a = new AlphaAnimation(1, 1);
|
||||
}
|
||||
a.setDuration(duration);
|
||||
} else {
|
||||
float scaleW = thumbWidth / displayInfo.appWidth;
|
||||
|
||||
Reference in New Issue
Block a user