Merge change 25734 into eclair
* changes: Show the live wallpaper on the lock screen.
This commit is contained in:
@@ -435,6 +435,12 @@ public interface WindowManagerPolicy {
|
|||||||
*/
|
*/
|
||||||
public int subWindowTypeToLayerLw(int type);
|
public int subWindowTypeToLayerLw(int type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the highest layer (actually one more than) that the wallpaper is
|
||||||
|
* allowed to be in.
|
||||||
|
*/
|
||||||
|
public int getMaxWallpaperLayer();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the system would like to show a UI to indicate that an
|
* Called when the system would like to show a UI to indicate that an
|
||||||
* application is starting. You can use this to add a
|
* application is starting. You can use this to add a
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
android:interpolator="@anim/decelerate_interpolator">
|
android:interpolator="@anim/decelerate_interpolator">
|
||||||
<scale android:fromXScale="0.9" android:toXScale="1.0"
|
<scale android:fromXScale="0.9" android:toXScale="1.0"
|
||||||
android:fromYScale="0.9" android:toYScale="1.0"
|
android:fromYScale="0.9" android:toYScale="1.0"
|
||||||
android:pivotX="50%" android:pivotY="50%"
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
android:duration="@android:integer/config_shortAnimTime" />
|
android:duration="@android:integer/config_shortAnimTime" />
|
||||||
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||||
android:duration="@android:integer/config_shortAnimTime" />
|
android:duration="@android:integer/config_shortAnimTime" />
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
android:interpolator="@anim/accelerate_interpolator">
|
android:interpolator="@anim/accelerate_interpolator">
|
||||||
<scale android:fromXScale="1.0" android:toXScale="0.9"
|
<scale android:fromXScale="1.0" android:toXScale="0.9"
|
||||||
android:fromYScale="1.0" android:toYScale="0.9"
|
android:fromYScale="1.0" android:toYScale="0.9"
|
||||||
android:pivotX="50%" android:pivotY="50%"
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
android:duration="@android:integer/config_shortAnimTime" />
|
android:duration="@android:integer/config_shortAnimTime" />
|
||||||
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
|
<alpha android:fromAlpha="1.0" android:toAlpha="0.0"
|
||||||
android:duration="@android:integer/config_shortAnimTime"/>
|
android:duration="@android:integer/config_shortAnimTime"/>
|
||||||
|
|||||||
28
core/res/res/anim/recent_enter.xml
Normal file
28
core/res/res/anim/recent_enter.xml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
** Copyright 2009, 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">
|
||||||
|
<scale android:fromXScale="2.0" android:toXScale="1.0"
|
||||||
|
android:fromYScale="2.0" android:toYScale="1.0"
|
||||||
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime" />
|
||||||
|
<alpha android:fromAlpha="0.0" android:toAlpha="1.0"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||||
|
</set>
|
||||||
29
core/res/res/anim/recent_exit.xml
Normal file
29
core/res/res/anim/recent_exit.xml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
/*
|
||||||
|
** Copyright 2009, 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">
|
||||||
|
<scale android:fromXScale="1.0" android:toXScale="2.0"
|
||||||
|
android:fromYScale="1.0" android:toYScale="2.0"
|
||||||
|
android:pivotX="50%p" android:pivotY="50%p"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime" />
|
||||||
|
<alpha android:fromAlpha="1.0" android:toAlpha="0"
|
||||||
|
android:duration="@android:integer/config_mediumAnimTime"/>
|
||||||
|
</set>
|
||||||
@@ -177,6 +177,13 @@
|
|||||||
<item name="windowExitAnimation">@anim/wallpaper_exit</item>
|
<item name="windowExitAnimation">@anim/wallpaper_exit</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- A special animation we can use for recent applications,
|
||||||
|
for devices that can support it (do alpha transformations). -->
|
||||||
|
<style name="Animation.RecentApplications">
|
||||||
|
<item name="windowEnterAnimation">@anim/recent_enter</item>
|
||||||
|
<item name="windowExitAnimation">@anim/recent_exit</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!-- Status Bar Styles -->
|
<!-- Status Bar Styles -->
|
||||||
|
|
||||||
<style name="TextAppearance.StatusBarTitle">
|
<style name="TextAppearance.StatusBarTitle">
|
||||||
|
|||||||
@@ -500,4 +500,10 @@
|
|||||||
<item name="windowContentOverlay">@null</item>
|
<item name="windowContentOverlay">@null</item>
|
||||||
<item name="textAppearance">@style/TextAppearance.Theme.Dialog.AppError</item>
|
<item name="textAppearance">@style/TextAppearance.Theme.Dialog.AppError</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<!-- Special theme for the recent apps dialog, to allow customization
|
||||||
|
with overlays. -->
|
||||||
|
<style name="Theme.Dialog.RecentApplications">
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1384,12 +1384,18 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
(mLowerWallpaperTarget == null && foundW.mAppToken != null)
|
(mLowerWallpaperTarget == null && foundW.mAppToken != null)
|
||||||
? foundW.mAppToken.animLayerAdjustment : 0;
|
? foundW.mAppToken.animLayerAdjustment : 0;
|
||||||
|
|
||||||
|
final int maxLayer = mPolicy.getMaxWallpaperLayer()
|
||||||
|
* TYPE_LAYER_MULTIPLIER
|
||||||
|
+ TYPE_LAYER_OFFSET;
|
||||||
|
|
||||||
// Now w is the window we are supposed to be behind... but we
|
// Now w is the window we are supposed to be behind... but we
|
||||||
// need to be sure to also be behind any of its attached windows,
|
// need to be sure to also be behind any of its attached windows,
|
||||||
// AND any starting window associated with it.
|
// AND any starting window associated with it, AND below the
|
||||||
|
// maximum layer the policy allows for wallpapers.
|
||||||
while (foundI > 0) {
|
while (foundI > 0) {
|
||||||
WindowState wb = (WindowState)localmWindows.get(foundI-1);
|
WindowState wb = (WindowState)localmWindows.get(foundI-1);
|
||||||
if (wb.mAttachedWindow != foundW &&
|
if (wb.mBaseLayer < maxLayer &&
|
||||||
|
wb.mAttachedWindow != foundW &&
|
||||||
(wb.mAttrs.type != TYPE_APPLICATION_STARTING ||
|
(wb.mAttrs.type != TYPE_APPLICATION_STARTING ||
|
||||||
wb.mToken != foundW.mToken)) {
|
wb.mToken != foundW.mToken)) {
|
||||||
// This window is not related to the previous one in any
|
// This window is not related to the previous one in any
|
||||||
@@ -2266,6 +2272,12 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// Currently in a hide animation... turn this into
|
// Currently in a hide animation... turn this into
|
||||||
// an exit.
|
// an exit.
|
||||||
win.mExiting = true;
|
win.mExiting = true;
|
||||||
|
} else if (win == mWallpaperTarget) {
|
||||||
|
// If the wallpaper is currently behind this
|
||||||
|
// window, we need to change both of them inside
|
||||||
|
// of a transaction to avoid artifacts.
|
||||||
|
win.mExiting = true;
|
||||||
|
win.mAnimating = true;
|
||||||
} else {
|
} else {
|
||||||
if (mInputMethodWindow == win) {
|
if (mInputMethodWindow == win) {
|
||||||
mInputMethodWindow = null;
|
mInputMethodWindow = null;
|
||||||
@@ -3157,6 +3169,10 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
com.android.internal.R.styleable.Window_windowIsTranslucent, false)) {
|
com.android.internal.R.styleable.Window_windowIsTranslucent, false)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (ent.array.getBoolean(
|
||||||
|
com.android.internal.R.styleable.Window_windowIsFloating, false)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (ent.array.getBoolean(
|
if (ent.array.getBoolean(
|
||||||
com.android.internal.R.styleable.Window_windowShowWallpaper, false)) {
|
com.android.internal.R.styleable.Window_windowShowWallpaper, false)) {
|
||||||
return;
|
return;
|
||||||
@@ -7087,8 +7103,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
mAppToken.firstWindowDrawn = true;
|
mAppToken.firstWindowDrawn = true;
|
||||||
|
|
||||||
if (mAppToken.startingData != null) {
|
if (mAppToken.startingData != null) {
|
||||||
if (DEBUG_STARTING_WINDOW) Log.v(TAG, "Finish starting "
|
if (DEBUG_STARTING_WINDOW || DEBUG_ANIM) Log.v(TAG,
|
||||||
+ mToken
|
"Finish starting " + mToken
|
||||||
+ ": first real window is shown, no animation");
|
+ ": first real window is shown, no animation");
|
||||||
// If this initial window is animating, stop it -- we
|
// If this initial window is animating, stop it -- we
|
||||||
// will do an animation to reveal it from behind the
|
// will do an animation to reveal it from behind the
|
||||||
@@ -7305,13 +7321,13 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// Compute the desired transformation.
|
// Compute the desired transformation.
|
||||||
tmpMatrix.setTranslate(frame.left, frame.top);
|
tmpMatrix.setTranslate(frame.left, frame.top);
|
||||||
if (selfTransformation) {
|
if (selfTransformation) {
|
||||||
tmpMatrix.preConcat(mTransformation.getMatrix());
|
tmpMatrix.postConcat(mTransformation.getMatrix());
|
||||||
}
|
}
|
||||||
if (attachedTransformation != null) {
|
if (attachedTransformation != null) {
|
||||||
tmpMatrix.preConcat(attachedTransformation.getMatrix());
|
tmpMatrix.postConcat(attachedTransformation.getMatrix());
|
||||||
}
|
}
|
||||||
if (appTransformation != null) {
|
if (appTransformation != null) {
|
||||||
tmpMatrix.preConcat(appTransformation.getMatrix());
|
tmpMatrix.postConcat(appTransformation.getMatrix());
|
||||||
}
|
}
|
||||||
|
|
||||||
// "convert" it into SurfaceFlinger's format
|
// "convert" it into SurfaceFlinger's format
|
||||||
@@ -8928,11 +8944,14 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
wallpaperMayChange = true;
|
wallpaperMayChange = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
boolean wasAnimating = w.mAnimating;
|
||||||
if (w.stepAnimationLocked(currentTime, dw, dh)) {
|
if (w.stepAnimationLocked(currentTime, dw, dh)) {
|
||||||
animating = true;
|
animating = true;
|
||||||
//w.dump(" ");
|
//w.dump(" ");
|
||||||
}
|
}
|
||||||
|
if (wasAnimating && !w.mAnimating && mWallpaperTarget == w) {
|
||||||
|
wallpaperMayChange = true;
|
||||||
|
}
|
||||||
mPolicy.animatingWindowLw(w, attrs);
|
mPolicy.animatingWindowLw(w, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9269,6 +9288,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
boolean covered = false;
|
boolean covered = false;
|
||||||
boolean syswin = false;
|
boolean syswin = false;
|
||||||
boolean backgroundFillerShown = false;
|
boolean backgroundFillerShown = false;
|
||||||
|
boolean forceHiding = false;
|
||||||
|
|
||||||
final int N = mWindows.size();
|
final int N = mWindows.size();
|
||||||
|
|
||||||
@@ -9401,7 +9421,10 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (w.mAttachedHidden) {
|
if ((forceHiding
|
||||||
|
&& attrs.type != WindowManager.LayoutParams.TYPE_STATUS_BAR
|
||||||
|
&& attrs.type != WindowManager.LayoutParams.TYPE_WALLPAPER)
|
||||||
|
|| w.mAttachedHidden) {
|
||||||
if (!w.mLastHidden) {
|
if (!w.mLastHidden) {
|
||||||
//dump();
|
//dump();
|
||||||
w.mLastHidden = true;
|
w.mLastHidden = true;
|
||||||
@@ -9515,6 +9538,9 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (displayed) {
|
if (displayed) {
|
||||||
|
if (attrs.type == WindowManager.LayoutParams.TYPE_KEYGUARD) {
|
||||||
|
forceHiding = true;
|
||||||
|
}
|
||||||
if (!covered) {
|
if (!covered) {
|
||||||
if (attrs.width == LayoutParams.FILL_PARENT
|
if (attrs.width == LayoutParams.FILL_PARENT
|
||||||
&& attrs.height == LayoutParams.FILL_PARENT) {
|
&& attrs.height == LayoutParams.FILL_PARENT) {
|
||||||
@@ -9597,7 +9623,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
backgroundFillerShown = true;
|
backgroundFillerShown = true;
|
||||||
mBackgroundFillerShown = true;
|
mBackgroundFillerShown = true;
|
||||||
} else if (canBeSeen && !obscured &&
|
} else if (canBeSeen && !obscured && !forceHiding &&
|
||||||
(attrFlags&FLAG_BLUR_BEHIND|FLAG_DIM_BEHIND) != 0) {
|
(attrFlags&FLAG_BLUR_BEHIND|FLAG_DIM_BEHIND) != 0) {
|
||||||
if (localLOGV) Log.v(TAG, "Win " + w
|
if (localLOGV) Log.v(TAG, "Win " + w
|
||||||
+ ": blurring=" + blurring
|
+ ": blurring=" + blurring
|
||||||
|
|||||||
Reference in New Issue
Block a user