am a59a19ab: Merge "Fix issue #8512015: VideoView\'s window animates when its position changes" into jb-mr2-dev
* commit 'a59a19abb8f284beb478ff2492493251b91a2847': Fix issue #8512015: VideoView's window animates when its position changes
This commit is contained in:
@@ -480,6 +480,7 @@ public class SurfaceView extends View {
|
||||
if (!getContext().getResources().getCompatibilityInfo().supportsScreen()) {
|
||||
mLayout.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
|
||||
}
|
||||
mLayout.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION;
|
||||
|
||||
if (mWindow == null) {
|
||||
Display display = getDisplay();
|
||||
|
||||
@@ -1011,6 +1011,12 @@ public interface WindowManager extends ViewManager {
|
||||
* {@hide} */
|
||||
public static final int PRIVATE_FLAG_FORCE_SHOW_NAV_BAR = 0x00000020;
|
||||
|
||||
/**
|
||||
* Never animate position changes of the window.
|
||||
*
|
||||
* {@hide} */
|
||||
public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION = 0x00000040;
|
||||
|
||||
/**
|
||||
* Control flags that are private to the platform.
|
||||
* @hide
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.android.server.wm;
|
||||
import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW;
|
||||
import static android.view.WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
|
||||
import static android.view.WindowManager.LayoutParams.LAST_SUB_WINDOW;
|
||||
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD_DIALOG;
|
||||
import static android.view.WindowManager.LayoutParams.TYPE_KEYGUARD;
|
||||
@@ -923,6 +924,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
return mContentChanged && !mExiting && !mWinAnimator.mLastHidden && mService.okToDisplay()
|
||||
&& (mFrame.top != mLastFrame.top
|
||||
|| mFrame.left != mLastFrame.left)
|
||||
&& (mAttrs.privateFlags&PRIVATE_FLAG_NO_MOVE_ANIMATION) == 0
|
||||
&& (mAttachedWindow == null || !mAttachedWindow.shouldAnimateMove());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user