diff options
Diffstat (limited to 'core/java/android/view/SurfaceControl.java')
-rw-r--r-- | core/java/android/view/SurfaceControl.java | 13 |
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 |