summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/Surface.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-10-09 00:02:46 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-09 00:02:46 -0700
commit8f4baad387d8ad63efbc05cfa8c4e4c472793deb (patch)
treec89bd3f628670255edb945b9f4074bc49b9d440c /core/java/android/view/Surface.java
parent434f8172332f0abf02499f33846c6042ed628b0c (diff)
parent9e316a1a2a8d734315bbd56a85308f9657a92913 (diff)
downloadframeworks_base-8f4baad387d8ad63efbc05cfa8c4e4c472793deb.zip
frameworks_base-8f4baad387d8ad63efbc05cfa8c4e4c472793deb.tar.gz
frameworks_base-8f4baad387d8ad63efbc05cfa8c4e4c472793deb.tar.bz2
Merge "Blank or unblank all displays as need." into jb-mr1-dev
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.