From bfe319e06aa56c081d0d94d64a8181291d7f7388 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 21 Sep 2009 00:34:05 -0700 Subject: [PATCH] Turn animations on by default. Add API to skip the animation for a particular start activity, so that a latter better one can be used. Fix Theme.NoDisplay to actually work. Fiddle with various animations: don't do a different animation for task switching, try a scale animation for switching in/out of the wallpaper. Adjust the animation duration so that at normal speed we have something more like the slower animation option (so slow is now the default). Change-Id: Ieba9f3db0bd9a762a19b327a3ecccbc7b547893d --- api/current.xml | 26 ++++++ core/java/android/app/Activity.java | 4 +- core/java/android/content/Intent.java | 12 +++ core/java/android/text/format/Formatter.java | 35 +++++-- .../android/view/WindowManagerPolicy.java | 4 +- core/res/res/anim/activity_close_enter.xml | 2 +- core/res/res/anim/activity_close_exit.xml | 2 +- core/res/res/anim/activity_open_enter.xml | 2 +- core/res/res/anim/activity_open_exit.xml | 2 +- core/res/res/anim/dialog_enter.xml | 3 +- core/res/res/anim/dialog_exit.xml | 4 +- core/res/res/anim/recent_enter.xml | 8 +- core/res/res/anim/recent_exit.xml | 13 ++- core/res/res/anim/task_open_exit.xml | 3 +- core/res/res/anim/translucent_enter.xml | 4 +- core/res/res/anim/translucent_exit.xml | 4 +- core/res/res/anim/wallpaper_close_enter.xml | 14 +++ core/res/res/anim/wallpaper_close_exit.xml | 17 ++++ core/res/res/anim/wallpaper_open_enter.xml | 17 ++++ core/res/res/anim/wallpaper_open_exit.xml | 14 +++ core/res/res/values/config.xml | 6 +- core/res/res/values/styles.xml | 14 +++ core/res/res/values/themes.xml | 2 +- .../SettingsProvider/res/values/defaults.xml | 2 +- .../providers/settings/DatabaseHelper.java | 23 ++++- .../android/server/WindowManagerService.java | 43 ++++----- .../server/am/ActivityManagerService.java | 93 ++++++++++++++----- 27 files changed, 291 insertions(+), 82 deletions(-) diff --git a/api/current.xml b/api/current.xml index 077b6ec5c372b..15bc2fa5d8608 100644 --- a/api/current.xml +++ b/api/current.xml @@ -36741,6 +36741,17 @@ visibility="public" > + + + + + + + + + android:duration="@android:integer/config_shortAnimTime"/> diff --git a/core/res/res/anim/activity_close_exit.xml b/core/res/res/anim/activity_close_exit.xml index 47cb6d69423b8..bf3d8cd34d317 100644 --- a/core/res/res/anim/activity_close_exit.xml +++ b/core/res/res/anim/activity_close_exit.xml @@ -20,5 +20,5 @@ + android:duration="@android:integer/config_shortAnimTime"/> diff --git a/core/res/res/anim/activity_open_enter.xml b/core/res/res/anim/activity_open_enter.xml index e4c7e9bcc9d5b..a9ea381d1fed4 100644 --- a/core/res/res/anim/activity_open_enter.xml +++ b/core/res/res/anim/activity_open_enter.xml @@ -20,5 +20,5 @@ + android:duration="@android:integer/config_shortAnimTime"/> diff --git a/core/res/res/anim/activity_open_exit.xml b/core/res/res/anim/activity_open_exit.xml index 9d47b7f59c332..b04b79eac09b1 100644 --- a/core/res/res/anim/activity_open_exit.xml +++ b/core/res/res/anim/activity_open_exit.xml @@ -21,5 +21,5 @@ android:interpolator="@anim/decelerate_interpolator" android:zAdjustment="top"> + android:duration="@android:integer/config_shortAnimTime"/> diff --git a/core/res/res/anim/dialog_enter.xml b/core/res/res/anim/dialog_enter.xml index cc409e8f5a05b..d4983c64152c8 100644 --- a/core/res/res/anim/dialog_enter.xml +++ b/core/res/res/anim/dialog_enter.xml @@ -1,7 +1,6 @@ + - + android:duration="@android:integer/config_shortAnimTime" /> + android:duration="@android:integer/config_shortAnimTime" /> diff --git a/core/res/res/anim/recent_exit.xml b/core/res/res/anim/recent_exit.xml index 32d64a4af2a42..9399329559319 100644 --- a/core/res/res/anim/recent_exit.xml +++ b/core/res/res/anim/recent_exit.xml @@ -18,12 +18,11 @@ --> - + - + android:duration="@android:integer/config_shortAnimTime" /> + diff --git a/core/res/res/anim/task_open_exit.xml b/core/res/res/anim/task_open_exit.xml index 98975fb92fcc6..db331b156c98b 100644 --- a/core/res/res/anim/task_open_exit.xml +++ b/core/res/res/anim/task_open_exit.xml @@ -18,8 +18,7 @@ --> + android:interpolator="@anim/decelerate_interpolator"> + android:duration="@android:integer/config_shortAnimTime"/> + android:duration="@android:integer/config_shortAnimTime"/> diff --git a/core/res/res/anim/translucent_exit.xml b/core/res/res/anim/translucent_exit.xml index 1d424e18d3be8..adaf3d1b12c3c 100644 --- a/core/res/res/anim/translucent_exit.xml +++ b/core/res/res/anim/translucent_exit.xml @@ -20,7 +20,7 @@ + android:duration="@android:integer/config_shortAnimTime"/> + android:duration="@android:integer/config_shortAnimTime"/> diff --git a/core/res/res/anim/wallpaper_close_enter.xml b/core/res/res/anim/wallpaper_close_enter.xml index e4c7e9bcc9d5b..0d130098eea2b 100644 --- a/core/res/res/anim/wallpaper_close_enter.xml +++ b/core/res/res/anim/wallpaper_close_enter.xml @@ -17,8 +17,22 @@ */ --> + + + + + + + diff --git a/core/res/res/anim/wallpaper_close_exit.xml b/core/res/res/anim/wallpaper_close_exit.xml index 16edec1d41418..5d91e308f09ab 100644 --- a/core/res/res/anim/wallpaper_close_exit.xml +++ b/core/res/res/anim/wallpaper_close_exit.xml @@ -17,6 +17,22 @@ */ --> + + + + + + + + diff --git a/core/res/res/anim/wallpaper_open_enter.xml b/core/res/res/anim/wallpaper_open_enter.xml index af22b47c3d2ce..cf27cf0458330 100644 --- a/core/res/res/anim/wallpaper_open_enter.xml +++ b/core/res/res/anim/wallpaper_open_enter.xml @@ -17,6 +17,22 @@ */ --> + + + + + + + + diff --git a/core/res/res/anim/wallpaper_open_exit.xml b/core/res/res/anim/wallpaper_open_exit.xml index 47cb6d69423b8..b7a539c1fc412 100644 --- a/core/res/res/anim/wallpaper_open_exit.xml +++ b/core/res/res/anim/wallpaper_open_exit.xml @@ -17,8 +17,22 @@ */ --> + + + + + + + diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 769550314f8ce..7aeaec4511c6f 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -27,13 +27,13 @@ false - 100 + 150 - 150 + 250 - 300 + 400 diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index 35db8eed78b7d..bc8ec457f531b 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -58,6 +58,19 @@ @anim/activity_open_exit @anim/activity_close_enter @anim/activity_close_exit + @anim/activity_open_enter + @anim/activity_open_exit + @anim/activity_close_enter + @anim/activity_close_exit + @anim/activity_open_enter + @anim/activity_open_exit + @anim/activity_close_enter + @anim/activity_close_exit + + + @anim/wallpaper_open_enter @anim/wallpaper_open_exit @anim/wallpaper_close_enter diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index b29e57179ea90..fbdd2479f75c8 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -354,7 +354,7 @@