am 6e4b7d66: Merge change 24020 into eclair
Merge commit '6e4b7d66998b9ec9255767f6070a2f94d83944a5' into eclair-plus-aosp * commit '6e4b7d66998b9ec9255767f6070a2f94d83944a5': Wallpapers: new transitions, hiding when not visible, other cleanup.
This commit is contained in:
@@ -4699,7 +4699,7 @@
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
value="16843416"
|
||||
value="16843420"
|
||||
static="true"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
@@ -6492,7 +6492,7 @@
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
value="16843417"
|
||||
value="16843421"
|
||||
static="true"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
@@ -7526,7 +7526,7 @@
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
value="16843415"
|
||||
value="16843419"
|
||||
static="true"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
@@ -8611,7 +8611,7 @@
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="wallpaperActivityCloseEnterAnimation"
|
||||
<field name="wallpaperCloseEnterAnimation"
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
@@ -8622,7 +8622,7 @@
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="wallpaperActivityCloseExitAnimation"
|
||||
<field name="wallpaperCloseExitAnimation"
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
@@ -8633,7 +8633,51 @@
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="wallpaperActivityOpenEnterAnimation"
|
||||
<field name="wallpaperIntraCloseEnterAnimation"
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
value="16843417"
|
||||
static="true"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="wallpaperIntraCloseExitAnimation"
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
value="16843418"
|
||||
static="true"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="wallpaperIntraOpenEnterAnimation"
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
value="16843415"
|
||||
static="true"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="wallpaperIntraOpenExitAnimation"
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
value="16843416"
|
||||
static="true"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="wallpaperOpenEnterAnimation"
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
@@ -8644,7 +8688,7 @@
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="wallpaperActivityOpenExitAnimation"
|
||||
<field name="wallpaperOpenExitAnimation"
|
||||
type="int"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
|
||||
@@ -344,12 +344,18 @@ public interface WindowManagerPolicy {
|
||||
public final int TRANSIT_TASK_TO_FRONT = 10;
|
||||
/** A window in an existing task is being put below all other tasks. */
|
||||
public final int TRANSIT_TASK_TO_BACK = 11;
|
||||
/** A window in a new activity that doesn't have a wallpaper is being
|
||||
* opened on top of one that does, effectively closing the wallpaper. */
|
||||
public final int TRANSIT_WALLPAPER_CLOSE = 12;
|
||||
/** A window in a new activity that does have a wallpaper is being
|
||||
* opened on one that didn't, effectively opening the wallpaper. */
|
||||
public final int TRANSIT_WALLPAPER_OPEN = 13;
|
||||
/** A window in a new activity is being opened on top of an existing one,
|
||||
* and both are on top of the wallpaper. */
|
||||
public final int TRANSIT_WALLPAPER_ACTIVITY_OPEN = 12;
|
||||
public final int TRANSIT_WALLPAPER_INTRA_OPEN = 14;
|
||||
/** The window in the top-most activity is being closed to reveal the
|
||||
* previous activity, and both are on top of he wallpaper. */
|
||||
public final int TRANSIT_WALLPAPER_ACTIVITY_CLOSE = 13;
|
||||
public final int TRANSIT_WALLPAPER_INTRA_CLOSE = 15;
|
||||
|
||||
/** Screen turned off because of power button */
|
||||
public final int OFF_BECAUSE_OF_USER = 1;
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<accelerateDecelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android"/>
|
||||
<accelerateDecelerateInterpolator />
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<accelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" factor="1" />
|
||||
<accelerateInterpolator />
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<anticipateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
<anticipateInterpolator />
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<anticipateOvershootInterpolator xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
<anticipateOvershootInterpolator />
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<bounceInterpolator xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
<bounceInterpolator />
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<decelerateInterpolator xmlns:android="http://schemas.android.com/apk/res/android" factor="1" />
|
||||
<decelerateInterpolator />
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<linearInterpolator xmlns:android="http://schemas.android.com/apk/res/android"/>
|
||||
<linearInterpolator />
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
*/
|
||||
-->
|
||||
|
||||
<overshootInterpolator xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
<overshootInterpolator />
|
||||
|
||||
25
core/res/res/anim/wallpaper_close_enter.xml
Normal file
25
core/res/res/anim/wallpaper_close_enter.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/* //device/apps/common/res/anim/options_panel_exit.xml
|
||||
**
|
||||
** Copyright 2007, 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:interpolator="@anim/decelerate_interpolator">
|
||||
<translate android:fromXDelta="33%" android:toXDelta="0"
|
||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||
</set>
|
||||
30
core/res/res/anim/wallpaper_close_exit.xml
Normal file
30
core/res/res/anim/wallpaper_close_exit.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/* //device/apps/common/res/anim/options_panel_exit.xml
|
||||
**
|
||||
** Copyright 2007, 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:interpolator="@anim/decelerate_interpolator"
|
||||
android:zAdjustment="top">
|
||||
<translate android:fromXDelta="0%" android:toXDelta="-100%"
|
||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||
<scale android:fromXScale="1.0" android:toXScale="2.0"
|
||||
android:fromYScale="1.0" android:toYScale="2.0"
|
||||
android:pivotX="0%" android:pivotY="50%"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
</set>
|
||||
@@ -23,7 +23,7 @@
|
||||
android:zAdjustment="top">
|
||||
<scale android:fromXScale="2.0" android:toXScale="1.0"
|
||||
android:fromYScale="2.0" android:toYScale="1.0"
|
||||
android:pivotX="50%" android:pivotY="50%"
|
||||
android:pivotX="100%" android:pivotY="50%"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
<translate android:fromXDelta="-150%" android:toXDelta="0"
|
||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
android:interpolator="@anim/accelerate_interpolator">
|
||||
<scale android:fromXScale="1.0" android:toXScale=".5"
|
||||
android:fromYScale="1.0" android:toYScale=".5"
|
||||
android:pivotX="50%" android:pivotY="50%"
|
||||
android:pivotX="0%" android:pivotY="50%"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
<translate android:fromXDelta="0%" android:toXDelta="100%"
|
||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
android:interpolator="@anim/decelerate_interpolator">
|
||||
<scale android:fromXScale=".5" android:toXScale="1.0"
|
||||
android:fromYScale=".5" android:toYScale="1.0"
|
||||
android:pivotX="50%" android:pivotY="50%"
|
||||
android:pivotX="0%" android:pivotY="50%"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
<translate android:fromXDelta="100%" android:toXDelta="0"
|
||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||
@@ -23,7 +23,7 @@
|
||||
android:zAdjustment="top">
|
||||
<scale android:fromXScale="1.0" android:toXScale="2.0"
|
||||
android:fromYScale="1.0" android:toYScale="2.0"
|
||||
android:pivotX="50%" android:pivotY="50%"
|
||||
android:pivotX="100%" android:pivotY="50%"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
<translate android:fromXDelta="0" android:toXDelta="-150%"
|
||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||
30
core/res/res/anim/wallpaper_open_enter.xml
Normal file
30
core/res/res/anim/wallpaper_open_enter.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/* //device/apps/common/res/anim/options_panel_exit.xml
|
||||
**
|
||||
** Copyright 2007, 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:interpolator="@anim/decelerate_interpolator"
|
||||
android:zAdjustment="top">
|
||||
<translate android:fromXDelta="-100%" android:toXDelta="0"
|
||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||
<scale android:fromXScale="2.0" android:toXScale="1.0"
|
||||
android:fromYScale="2.0" android:toYScale="1.0"
|
||||
android:pivotX="0%" android:pivotY="50%"
|
||||
android:duration="@android:integer/config_mediumAnimTime" />
|
||||
</set>
|
||||
25
core/res/res/anim/wallpaper_open_exit.xml
Normal file
25
core/res/res/anim/wallpaper_open_exit.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/* //device/apps/common/res/anim/options_panel_exit.xml
|
||||
**
|
||||
** Copyright 2007, 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:interpolator="@anim/decelerate_interpolator">
|
||||
<translate android:fromXDelta="0%" android:toXDelta="33%"
|
||||
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||
</set>
|
||||
@@ -979,26 +979,47 @@
|
||||
(which is exiting the screen). -->
|
||||
<attr name="taskToBackExitAnimation" format="reference" />
|
||||
|
||||
<!-- When opening a new activity that shows the wallpaper, while
|
||||
currently not showing the wallpaper, this is the animation that
|
||||
is run on the new wallpaper activity (which is entering the screen). -->
|
||||
<attr name="wallpaperOpenEnterAnimation" format="reference" />
|
||||
<!-- When opening a new activity that shows the wallpaper, while
|
||||
currently not showing the wallpaper, this is the animation that
|
||||
is run on the current activity (which is exiting the screen). -->
|
||||
<attr name="wallpaperOpenExitAnimation" format="reference" />
|
||||
<!-- When opening a new activity that hides the wallpaper, while
|
||||
currently showing the wallpaper, this is the animation that
|
||||
is run on the new activity (which is entering the screen). -->
|
||||
<attr name="wallpaperCloseEnterAnimation" format="reference" />
|
||||
<!-- When opening a new activity that hides the wallpaper, while
|
||||
currently showing the wallpaper, this is the animation that
|
||||
is run on the old wallpaper activity (which is exiting the screen). -->
|
||||
<attr name="wallpaperCloseExitAnimation" format="reference" />
|
||||
|
||||
<!-- When opening a new activity that is on top of the wallpaper
|
||||
when the current activity is also on top of the wallpaper,
|
||||
this is the animation that is run on the new activity
|
||||
(which is entering the screen). -->
|
||||
<attr name="wallpaperActivityOpenEnterAnimation" format="reference" />
|
||||
(which is entering the screen). The wallpaper remains
|
||||
static behind the animation. -->
|
||||
<attr name="wallpaperIntraOpenEnterAnimation" format="reference" />
|
||||
<!-- When opening a new activity that is on top of the wallpaper
|
||||
when the current activity is also on top of the wallpaper,
|
||||
this is the animation that is run on the current activity
|
||||
(which is exiting the screen). -->
|
||||
<attr name="wallpaperActivityOpenExitAnimation" format="reference" />
|
||||
(which is exiting the screen). The wallpaper remains
|
||||
static behind the animation. -->
|
||||
<attr name="wallpaperIntraOpenExitAnimation" format="reference" />
|
||||
<!-- When closing a foreround activity that is on top of the wallpaper
|
||||
when the previous activity is also on top of the wallpaper,
|
||||
this is the animation that is run on the previous activity
|
||||
(which is entering the screen). -->
|
||||
<attr name="wallpaperActivityCloseEnterAnimation" format="reference" />
|
||||
(which is entering the screen). The wallpaper remains
|
||||
static behind the animation. -->
|
||||
<attr name="wallpaperIntraCloseEnterAnimation" format="reference" />
|
||||
<!-- When closing a foreround activity that is on top of the wallpaper
|
||||
when the previous activity is also on top of the wallpaper,
|
||||
this is the animation that is run on the current activity
|
||||
(which is exiting the screen). -->
|
||||
<attr name="wallpaperActivityCloseExitAnimation" format="reference" />
|
||||
(which is exiting the screen). The wallpaper remains
|
||||
static behind the animation. -->
|
||||
<attr name="wallpaperIntraCloseExitAnimation" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- ============================= -->
|
||||
|
||||
@@ -1151,10 +1151,14 @@
|
||||
<public type="attr" name="contentAuthority" />
|
||||
<public type="attr" name="userVisible" />
|
||||
<public type="attr" name="windowShowWallpaper" />
|
||||
<public type="attr" name="wallpaperActivityOpenEnterAnimation" />
|
||||
<public type="attr" name="wallpaperActivityOpenExitAnimation" />
|
||||
<public type="attr" name="wallpaperActivityCloseEnterAnimation" />
|
||||
<public type="attr" name="wallpaperActivityCloseExitAnimation" />
|
||||
<public type="attr" name="wallpaperOpenEnterAnimation" />
|
||||
<public type="attr" name="wallpaperOpenExitAnimation" />
|
||||
<public type="attr" name="wallpaperCloseEnterAnimation" />
|
||||
<public type="attr" name="wallpaperCloseExitAnimation" />
|
||||
<public type="attr" name="wallpaperIntraOpenEnterAnimation" />
|
||||
<public type="attr" name="wallpaperIntraOpenExitAnimation" />
|
||||
<public type="attr" name="wallpaperIntraCloseEnterAnimation" />
|
||||
<public type="attr" name="wallpaperIntraCloseExitAnimation" />
|
||||
<public type="attr" name="supportsUploading" />
|
||||
<public type="attr" name="killAfterRestore" />
|
||||
<public type="attr" name="restoreNeedsApplication" />
|
||||
|
||||
@@ -66,10 +66,14 @@
|
||||
<item name="taskToFrontExitAnimation">@anim/task_open_exit</item>
|
||||
<item name="taskToBackEnterAnimation">@anim/task_close_enter</item>
|
||||
<item name="taskToBackExitAnimation">@anim/task_close_exit</item>
|
||||
<item name="wallpaperActivityOpenEnterAnimation">@anim/wallpaper_activity_open_enter</item>
|
||||
<item name="wallpaperActivityOpenExitAnimation">@anim/wallpaper_activity_open_exit</item>
|
||||
<item name="wallpaperActivityCloseEnterAnimation">@anim/wallpaper_activity_close_enter</item>
|
||||
<item name="wallpaperActivityCloseExitAnimation">@anim/wallpaper_activity_close_exit</item>
|
||||
<item name="wallpaperOpenEnterAnimation">@anim/wallpaper_open_enter</item>
|
||||
<item name="wallpaperOpenExitAnimation">@anim/wallpaper_open_exit</item>
|
||||
<item name="wallpaperCloseEnterAnimation">@anim/wallpaper_close_enter</item>
|
||||
<item name="wallpaperCloseExitAnimation">@anim/wallpaper_close_exit</item>
|
||||
<item name="wallpaperIntraOpenEnterAnimation">@anim/wallpaper_intra_open_enter</item>
|
||||
<item name="wallpaperIntraOpenExitAnimation">@anim/wallpaper_intra_open_exit</item>
|
||||
<item name="wallpaperIntraCloseEnterAnimation">@anim/wallpaper_intra_close_enter</item>
|
||||
<item name="wallpaperIntraCloseExitAnimation">@anim/wallpaper_intra_close_exit</item>
|
||||
</style>
|
||||
|
||||
<!-- Standard animations for a non-full-screen window or activity. -->
|
||||
|
||||
@@ -1193,6 +1193,20 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
moveInputMethodDialogsLocked(findDesiredInputMethodWindowIndexLocked(true));
|
||||
}
|
||||
|
||||
final boolean isWallpaperVisible(WindowState wallpaperTarget) {
|
||||
if (DEBUG_WALLPAPER) Log.v(TAG, "Wallpaper vis: target obscured="
|
||||
+ (wallpaperTarget != null ? Boolean.toString(wallpaperTarget.mObscured) : "??")
|
||||
+ " anim=" + ((wallpaperTarget != null && wallpaperTarget.mAppToken != null)
|
||||
? wallpaperTarget.mAppToken.animation : null)
|
||||
+ " upper=" + mUpperWallpaperTarget
|
||||
+ " lower=" + mLowerWallpaperTarget);
|
||||
return (wallpaperTarget != null
|
||||
&& (!wallpaperTarget.mObscured || (wallpaperTarget.mAppToken != null
|
||||
&& wallpaperTarget.mAppToken.animation != null)))
|
||||
|| mUpperWallpaperTarget != null
|
||||
|| mLowerWallpaperTarget != null;
|
||||
}
|
||||
|
||||
boolean adjustWallpaperWindowsLocked() {
|
||||
boolean changed = false;
|
||||
|
||||
@@ -1352,7 +1366,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
if (visible) {
|
||||
// The window is visible to the compositor... but is it visible
|
||||
// to the user? That is what the wallpaper cares about.
|
||||
visible = !foundW.mObscured;
|
||||
visible = isWallpaperVisible(foundW);
|
||||
if (DEBUG_WALLPAPER) Log.v(TAG, "Wallpaper visibility: " + visible);
|
||||
|
||||
// If the wallpaper target is animating, we may need to copy
|
||||
@@ -1377,6 +1391,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
foundW = wb;
|
||||
foundI--;
|
||||
}
|
||||
} else {
|
||||
if (DEBUG_WALLPAPER) Log.v(TAG, "Wallpaper not visible");
|
||||
}
|
||||
|
||||
// Okay i is the position immediately above the wallpaper. Look at
|
||||
@@ -1394,6 +1410,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
while (curTokenIndex > 0) {
|
||||
curTokenIndex--;
|
||||
WindowToken token = mWallpaperTokens.get(curTokenIndex);
|
||||
token.hidden = !visible;
|
||||
|
||||
int curWallpaperIndex = token.windows.size();
|
||||
while (curWallpaperIndex > 0) {
|
||||
curWallpaperIndex--;
|
||||
@@ -1548,8 +1566,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
|
||||
void updateWallpaperVisibilityLocked() {
|
||||
final boolean visible = mWallpaperTarget != null
|
||||
&& !mWallpaperTarget.mObscured;
|
||||
final boolean visible = isWallpaperVisible(mWallpaperTarget);
|
||||
final int dw = mDisplay.getWidth();
|
||||
final int dh = mDisplay.getHeight();
|
||||
|
||||
@@ -1557,6 +1574,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
while (curTokenIndex > 0) {
|
||||
curTokenIndex--;
|
||||
WindowToken token = mWallpaperTokens.get(curTokenIndex);
|
||||
token.hidden = !visible;
|
||||
|
||||
int curWallpaperIndex = token.windows.size();
|
||||
while (curWallpaperIndex > 0) {
|
||||
curWallpaperIndex--;
|
||||
@@ -1569,7 +1588,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
wallpaper.mWallpaperVisible = visible;
|
||||
try {
|
||||
if (DEBUG_VISIBILITY || DEBUG_WALLPAPER) Log.v(TAG,
|
||||
"Setting visibility of wallpaper " + wallpaper
|
||||
"Updating visibility of wallpaper " + wallpaper
|
||||
+ ": " + visible);
|
||||
wallpaper.mClient.dispatchAppVisibility(visible);
|
||||
} catch (RemoteException e) {
|
||||
@@ -2408,15 +2427,25 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
? com.android.internal.R.styleable.WindowAnimation_taskToBackEnterAnimation
|
||||
: com.android.internal.R.styleable.WindowAnimation_taskToBackExitAnimation;
|
||||
break;
|
||||
case WindowManagerPolicy.TRANSIT_WALLPAPER_ACTIVITY_OPEN:
|
||||
case WindowManagerPolicy.TRANSIT_WALLPAPER_OPEN:
|
||||
animAttr = enter
|
||||
? com.android.internal.R.styleable.WindowAnimation_wallpaperActivityOpenEnterAnimation
|
||||
: com.android.internal.R.styleable.WindowAnimation_wallpaperActivityOpenExitAnimation;
|
||||
? com.android.internal.R.styleable.WindowAnimation_wallpaperOpenEnterAnimation
|
||||
: com.android.internal.R.styleable.WindowAnimation_wallpaperOpenExitAnimation;
|
||||
break;
|
||||
case WindowManagerPolicy.TRANSIT_WALLPAPER_ACTIVITY_CLOSE:
|
||||
case WindowManagerPolicy.TRANSIT_WALLPAPER_CLOSE:
|
||||
animAttr = enter
|
||||
? com.android.internal.R.styleable.WindowAnimation_wallpaperActivityCloseEnterAnimation
|
||||
: com.android.internal.R.styleable.WindowAnimation_wallpaperActivityCloseExitAnimation;
|
||||
? com.android.internal.R.styleable.WindowAnimation_wallpaperCloseEnterAnimation
|
||||
: com.android.internal.R.styleable.WindowAnimation_wallpaperCloseExitAnimation;
|
||||
break;
|
||||
case WindowManagerPolicy.TRANSIT_WALLPAPER_INTRA_OPEN:
|
||||
animAttr = enter
|
||||
? com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenEnterAnimation
|
||||
: com.android.internal.R.styleable.WindowAnimation_wallpaperIntraOpenExitAnimation;
|
||||
break;
|
||||
case WindowManagerPolicy.TRANSIT_WALLPAPER_INTRA_CLOSE:
|
||||
animAttr = enter
|
||||
? com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseEnterAnimation
|
||||
: com.android.internal.R.styleable.WindowAnimation_wallpaperIntraCloseExitAnimation;
|
||||
break;
|
||||
}
|
||||
a = loadAnimation(lp, animAttr);
|
||||
@@ -7346,11 +7375,15 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the window is opaque and fully drawn.
|
||||
* Return true if the window is opaque and fully drawn. This indicates
|
||||
* it may obscure windows behind it.
|
||||
*/
|
||||
boolean isOpaqueDrawn() {
|
||||
return mAttrs.format == PixelFormat.OPAQUE && mSurface != null
|
||||
&& mAnimation == null && !mDrawPending && !mCommitDrawPending;
|
||||
return (mAttrs.format == PixelFormat.OPAQUE
|
||||
|| mAttrs.type == TYPE_WALLPAPER)
|
||||
&& mSurface != null && mAnimation == null
|
||||
&& (mAppToken == null || mAppToken.animation == null)
|
||||
&& !mDrawPending && !mCommitDrawPending;
|
||||
}
|
||||
|
||||
boolean needsBackgroundFiller(int screenWidth, int screenHeight) {
|
||||
@@ -8964,6 +8997,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
mToTopApps.clear();
|
||||
}
|
||||
|
||||
WindowState oldWallpaper = mWallpaperTarget;
|
||||
|
||||
adjustWallpaperWindowsLocked();
|
||||
wallpaperMayChange = false;
|
||||
|
||||
@@ -8971,54 +9006,66 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
"New wallpaper target=" + mWallpaperTarget
|
||||
+ ", lower target=" + mLowerWallpaperTarget
|
||||
+ ", upper target=" + mUpperWallpaperTarget);
|
||||
int foundWallpapers = 0;
|
||||
if (mLowerWallpaperTarget != null) {
|
||||
// Need to determine if both the closing and
|
||||
// opening app token sets are wallpaper targets,
|
||||
// in which case special animations are needed
|
||||
// (since the wallpaper needs to stay static
|
||||
// behind them).
|
||||
int found = 0;
|
||||
NN = mOpeningApps.size();
|
||||
for (i=0; i<NN; i++) {
|
||||
AppWindowToken wtoken = mOpeningApps.get(i);
|
||||
if (mLowerWallpaperTarget.mAppToken == wtoken) {
|
||||
found |= 1;
|
||||
}
|
||||
if (mUpperWallpaperTarget.mAppToken == wtoken) {
|
||||
found |= 1;
|
||||
}
|
||||
}
|
||||
NN = mClosingApps.size();
|
||||
for (i=0; i<NN; i++) {
|
||||
AppWindowToken wtoken = mClosingApps.get(i);
|
||||
if (mLowerWallpaperTarget.mAppToken == wtoken) {
|
||||
found |= 2;
|
||||
foundWallpapers |= 1;
|
||||
}
|
||||
if (mUpperWallpaperTarget.mAppToken == wtoken) {
|
||||
found |= 2;
|
||||
foundWallpapers |= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (found == 3) {
|
||||
if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
|
||||
"Wallpaper animation!");
|
||||
switch (transit) {
|
||||
case WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN:
|
||||
case WindowManagerPolicy.TRANSIT_TASK_OPEN:
|
||||
case WindowManagerPolicy.TRANSIT_TASK_TO_FRONT:
|
||||
transit = WindowManagerPolicy.TRANSIT_WALLPAPER_ACTIVITY_OPEN;
|
||||
break;
|
||||
case WindowManagerPolicy.TRANSIT_ACTIVITY_CLOSE:
|
||||
case WindowManagerPolicy.TRANSIT_TASK_CLOSE:
|
||||
case WindowManagerPolicy.TRANSIT_TASK_TO_BACK:
|
||||
transit = WindowManagerPolicy.TRANSIT_WALLPAPER_ACTIVITY_CLOSE;
|
||||
break;
|
||||
NN = mOpeningApps.size();
|
||||
for (i=0; i<NN; i++) {
|
||||
AppWindowToken wtoken = mOpeningApps.get(i);
|
||||
if (mLowerWallpaperTarget.mAppToken == wtoken) {
|
||||
foundWallpapers |= 2;
|
||||
}
|
||||
if (mUpperWallpaperTarget.mAppToken == wtoken) {
|
||||
foundWallpapers |= 2;
|
||||
}
|
||||
if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
|
||||
"New transit: " + transit);
|
||||
}
|
||||
}
|
||||
|
||||
if (foundWallpapers == 3) {
|
||||
if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
|
||||
"Wallpaper animation!");
|
||||
switch (transit) {
|
||||
case WindowManagerPolicy.TRANSIT_ACTIVITY_OPEN:
|
||||
case WindowManagerPolicy.TRANSIT_TASK_OPEN:
|
||||
case WindowManagerPolicy.TRANSIT_TASK_TO_FRONT:
|
||||
transit = WindowManagerPolicy.TRANSIT_WALLPAPER_INTRA_OPEN;
|
||||
break;
|
||||
case WindowManagerPolicy.TRANSIT_ACTIVITY_CLOSE:
|
||||
case WindowManagerPolicy.TRANSIT_TASK_CLOSE:
|
||||
case WindowManagerPolicy.TRANSIT_TASK_TO_BACK:
|
||||
transit = WindowManagerPolicy.TRANSIT_WALLPAPER_INTRA_CLOSE;
|
||||
break;
|
||||
}
|
||||
if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
|
||||
"New transit: " + transit);
|
||||
} else if (oldWallpaper != null) {
|
||||
// We are transitioning from an activity with
|
||||
// a wallpaper to one without.
|
||||
transit = WindowManagerPolicy.TRANSIT_WALLPAPER_CLOSE;
|
||||
if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
|
||||
"New transit away from wallpaper: " + transit);
|
||||
} else if (mWallpaperTarget != null) {
|
||||
// We are transitioning from an activity without
|
||||
// a wallpaper to now showing the wallpaper
|
||||
transit = WindowManagerPolicy.TRANSIT_WALLPAPER_OPEN;
|
||||
if (DEBUG_APP_TRANSITIONS) Log.v(TAG,
|
||||
"New transit into wallpaper: " + transit);
|
||||
}
|
||||
|
||||
// We need to figure out which animation to use...
|
||||
WindowManager.LayoutParams lp = findAnimations(mAppTokens,
|
||||
mOpeningApps, mClosingApps);
|
||||
@@ -9381,9 +9428,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
boolean opaqueDrawn = w.isOpaqueDrawn();
|
||||
if ((opaqueDrawn && w.isFullscreen(dw, dh))
|
||||
|| attrs.type == TYPE_WALLPAPER) {
|
||||
boolean opaqueDrawn = canBeSeen && w.isOpaqueDrawn();
|
||||
if (opaqueDrawn && w.isFullscreen(dw, dh)) {
|
||||
// This window completely covers everything behind it,
|
||||
// so we want to leave all of them as unblurred (for
|
||||
// performance reasons).
|
||||
|
||||
Reference in New Issue
Block a user