summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2013-04-15 23:22:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-15 23:22:48 +0000
commita59a19abb8f284beb478ff2492493251b91a2847 (patch)
tree0cd05edd1ae24bf55e9356d02926b76a2480767c
parentbffe377bca3cb8240bfc614c12fd1091ae3f69b9 (diff)
parent1c5383ce0b4e162ebc9ac7e29c8c39377724d45b (diff)
downloadframeworks_base-a59a19abb8f284beb478ff2492493251b91a2847.zip
frameworks_base-a59a19abb8f284beb478ff2492493251b91a2847.tar.gz
frameworks_base-a59a19abb8f284beb478ff2492493251b91a2847.tar.bz2
Merge "Fix issue #8512015: VideoView's window animates when its position changes" into jb-mr2-dev
-rw-r--r--core/java/android/view/SurfaceView.java1
-rw-r--r--core/java/android/view/WindowManager.java6
-rw-r--r--services/java/com/android/server/wm/WindowState.java2
3 files changed, 9 insertions, 0 deletions
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 5d0f523..14fa9cb 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -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();
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index 96ef0b4..48630a4 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -1012,6 +1012,12 @@ public interface WindowManager extends ViewManager {
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
*/
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index ca060f4..788d514 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -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());
}