summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/Surface.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/Surface.java')
-rw-r--r--core/java/android/view/Surface.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/view/Surface.java b/core/java/android/view/Surface.java
index 8f4626f..07bb8f9 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.