summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorWale Ogunwale <ogunwale@google.com>2015-06-12 13:59:03 -0700
committerWale Ogunwale <ogunwale@google.com>2015-06-23 09:08:29 -0700
commitf5ad42f4324bfb7aa28f0967e2fcc89f55d6e91f (patch)
treea58068f3c2d1b97ae143c930c12a002beea076ab /core/java
parentde1e281bbc062410a9079d2640b760271bde1043 (diff)
downloadframeworks_base-f5ad42f4324bfb7aa28f0967e2fcc89f55d6e91f.zip
frameworks_base-f5ad42f4324bfb7aa28f0967e2fcc89f55d6e91f.tar.gz
frameworks_base-f5ad42f4324bfb7aa28f0967e2fcc89f55d6e91f.tar.bz2
Update surfaces secure flag on screen capture setting change
Also, added 'wm screen-capture [userId] [true|false]' command. Bug: 20934462 Change-Id: I14711003d7691fc4495428c12c9ff3457cd3773c
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/view/SurfaceControl.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index 4074529..5970c3f 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -453,6 +453,19 @@ public class SurfaceControl {
}
}
+ /**
+ * Sets the security of the surface. Setting the flag is equivalent to creating the
+ * Surface with the {@link #SECURE} flag.
+ */
+ public void setSecure(boolean isSecure) {
+ checkNotReleased();
+ if (isSecure) {
+ nativeSetFlags(mNativeObject, SECURE, SECURE);
+ } else {
+ nativeSetFlags(mNativeObject, 0, SECURE);
+ }
+ }
+
/*
* set display parameters.
* needs to be inside open/closeTransaction block