diff options
| author | Jeff Brown <jeffbrown@google.com> | 2012-10-08 19:17:06 -0700 |
|---|---|---|
| committer | Jeff Brown <jeffbrown@google.com> | 2012-10-08 19:23:15 -0700 |
| commit | 9e316a1a2a8d734315bbd56a85308f9657a92913 (patch) | |
| tree | ff72f3b90a0e585ef183ff4339a9450ebdd5b174 /core/java | |
| parent | 2aac1a0fe8fe5dea1185374ed914f95101de16ed (diff) | |
Blank or unblank all displays as need.
Ensures that both the internal display and HDMI are blanked
or unblanked in tandem.
Bug: 7309812
Change-Id: Ie8b96d393e8bb20d23c92f3320142d9f7cf42aff
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/Surface.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java index 8f4626fe4bbe..07bb8f93e85c 100644 --- a/core/java/android/view/Surface.java +++ b/core/java/android/view/Surface.java @@ -266,6 +266,8 @@ public class Surface implements Parcelable { IBinder displayToken, int orientation, Rect layerStackRect, Rect displayRect); private static native boolean nativeGetDisplayInfo( IBinder displayToken, PhysicalDisplayInfo outInfo); + private static native void nativeBlankDisplay(IBinder displayToken); + private static native void nativeUnblankDisplay(IBinder displayToken); private native void nativeCopyFrom(Surface other); private native void nativeTransferFrom(Surface other); @@ -638,6 +640,22 @@ public class Surface implements Parcelable { return nativeGetDisplayInfo(displayToken, outInfo); } + /** @hide */ + public static void blankDisplay(IBinder displayToken) { + if (displayToken == null) { + throw new IllegalArgumentException("displayToken must not be null"); + } + nativeBlankDisplay(displayToken); + } + + /** @hide */ + public static void unblankDisplay(IBinder displayToken) { + if (displayToken == null) { + throw new IllegalArgumentException("displayToken must not be null"); + } + nativeUnblankDisplay(displayToken); + } + /** * Copy another surface to this one. This surface now holds a reference * to the same data as the original surface, and is -not- the owner. |
