diff options
8 files changed, 94 insertions, 14 deletions
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index e8641a5..cfe70dc 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -108,7 +108,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"> diff --git a/packages/SystemUI/res/anim/recents_launch_from_launcher_enter.xml b/packages/SystemUI/res/anim/recents_launch_from_launcher_enter.xml index 73ae9f2..1135bc0 100644 --- a/packages/SystemUI/res/anim/recents_launch_from_launcher_enter.xml +++ b/packages/SystemUI/res/anim/recents_launch_from_launcher_enter.xml @@ -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> diff --git a/packages/SystemUI/res/anim/recents_launch_from_launcher_exit.xml b/packages/SystemUI/res/anim/recents_launch_from_launcher_exit.xml index becc9d0..fa28cf4 100644 --- a/packages/SystemUI/res/anim/recents_launch_from_launcher_exit.xml +++ b/packages/SystemUI/res/anim/recents_launch_from_launcher_exit.xml @@ -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" diff --git a/packages/SystemUI/res/anim/wallpaper_recents_launch_from_launcher_enter.xml b/packages/SystemUI/res/anim/wallpaper_recents_launch_from_launcher_enter.xml new file mode 100644 index 0000000..121daae --- /dev/null +++ b/packages/SystemUI/res/anim/wallpaper_recents_launch_from_launcher_enter.xml @@ -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> diff --git a/packages/SystemUI/res/anim/wallpaper_recents_launch_from_launcher_exit.xml b/packages/SystemUI/res/anim/wallpaper_recents_launch_from_launcher_exit.xml new file mode 100644 index 0000000..fa28cf4 --- /dev/null +++ b/packages/SystemUI/res/anim/wallpaper_recents_launch_from_launcher_exit.xml @@ -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> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index 18c1c34..1a59d6c 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -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> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 7dbe44b..f38af5c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -481,10 +481,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(); diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index e74b6db..945d65c 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -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; |