Remove freezeDisplay(), which is no-op.
Change-Id: I981ee49e6e2d41a09feaee4b384392e83f7faf3d
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java
index a968768..ec5157a 100644
--- a/core/java/android/view/Surface.java
+++ b/core/java/android/view/Surface.java
@@ -413,22 +413,6 @@
/*
* set display parameters & screenshots
*/
-
- /**
- * Freezes the specified display, No updating of the screen will occur
- * until unfreezeDisplay() is called. Everything else works as usual though,
- * in particular transactions.
- * @param display
- * @hide
- */
- public static native void freezeDisplay(int display);
-
- /**
- * resume updating the specified display.
- * @param display
- * @hide
- */
- public static native void unfreezeDisplay(int display);
/**
* set the orientation of the given display.
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 5739cbe..0ec560e 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -481,24 +481,6 @@
}
}
-static void Surface_freezeDisplay(
- JNIEnv* env, jobject clazz, jint display)
-{
- int err = SurfaceComposerClient::freezeDisplay(display, 0);
- if (err < 0) {
- doThrowIAE(env);
- }
-}
-
-static void Surface_unfreezeDisplay(
- JNIEnv* env, jobject clazz, jint display)
-{
- int err = SurfaceComposerClient::unfreezeDisplay(display, 0);
- if (err < 0) {
- doThrowIAE(env);
- }
-}
-
class ScreenshotPixelRef : public SkPixelRef {
public:
ScreenshotPixelRef(SkColorTable* ctable) {
@@ -892,8 +874,6 @@
{"openTransaction", "()V", (void*)Surface_openTransaction },
{"closeTransaction", "()V", (void*)Surface_closeTransaction },
{"setOrientation", "(III)V", (void*)Surface_setOrientation },
- {"freezeDisplay", "(I)V", (void*)Surface_freezeDisplay },
- {"unfreezeDisplay", "(I)V", (void*)Surface_unfreezeDisplay },
{"screenshot", "(II)Landroid/graphics/Bitmap;", (void*)Surface_screenshotAll },
{"screenshot", "(IIII)Landroid/graphics/Bitmap;", (void*)Surface_screenshot },
{"setLayer", "(I)V", (void*)Surface_setLayer },
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 4cffb32..719cbe3 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -9415,12 +9415,6 @@
mAnimator.mScreenRotationAnimation = new ScreenRotationAnimation(mContext,
mFxSession, inTransaction, mCurDisplayWidth, mCurDisplayHeight,
mDisplay.getRotation());
-
- if (!mAnimator.mScreenRotationAnimation.hasScreenshot()) {
- Surface.freezeDisplay(0);
- }
- } else {
- Surface.freezeDisplay(0);
}
}
@@ -9463,7 +9457,6 @@
}
updateRotation = true;
}
- Surface.unfreezeDisplay(0);
mInputMonitor.thawInputDispatchingLw();