summaryrefslogtreecommitdiffstats
path: root/core/jni/android_view_Surface.cpp
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2012-10-19 18:29:29 -0700
committerJamie Gennis <jgennis@google.com>2012-10-19 18:34:35 -0700
commit7bbf8163fb83afc54b353a8def52bfb87ecce047 (patch)
tree9080f41d0ea7a72ad49ca79441858091b693ed45 /core/jni/android_view_Surface.cpp
parent398a6713c355cf59af071e944268aec7c0096b5a (diff)
downloadframeworks_base-7bbf8163fb83afc54b353a8def52bfb87ecce047.zip
frameworks_base-7bbf8163fb83afc54b353a8def52bfb87ecce047.tar.gz
frameworks_base-7bbf8163fb83afc54b353a8def52bfb87ecce047.tar.bz2
Set the secureness when creating displays
This change makes use of the new 'secure' argument to the ISurfaceComposer::createDisplay method. In this change both the overlay and wifi displays are hard-coded to be non-secure displays. Bug: 7368436 Change-Id: Ib65312f2adab5104d8deefbfc32af9dc106a9129
Diffstat (limited to 'core/jni/android_view_Surface.cpp')
-rw-r--r--core/jni/android_view_Surface.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/jni/android_view_Surface.cpp b/core/jni/android_view_Surface.cpp
index 531445f..8a2c88c 100644
--- a/core/jni/android_view_Surface.cpp
+++ b/core/jni/android_view_Surface.cpp
@@ -653,9 +653,11 @@ static jobject nativeGetBuiltInDisplay(JNIEnv* env, jclass clazz, jint id) {
return javaObjectForIBinder(env, token);
}
-static jobject nativeCreateDisplay(JNIEnv* env, jclass clazz, jstring nameObj) {
+static jobject nativeCreateDisplay(JNIEnv* env, jclass clazz, jstring nameObj,
+ jboolean secure) {
ScopedUtfChars name(env, nameObj);
- sp<IBinder> token(SurfaceComposerClient::createDisplay(String8(name.c_str())));
+ sp<IBinder> token(SurfaceComposerClient::createDisplay(
+ String8(name.c_str()), bool(secure)));
return javaObjectForIBinder(env, token);
}
@@ -845,7 +847,7 @@ static JNINativeMethod gSurfaceMethods[] = {
(void*)nativeSetLayerStack },
{"nativeGetBuiltInDisplay", "(I)Landroid/os/IBinder;",
(void*)nativeGetBuiltInDisplay },
- {"nativeCreateDisplay", "(Ljava/lang/String;)Landroid/os/IBinder;",
+ {"nativeCreateDisplay", "(Ljava/lang/String;Z)Landroid/os/IBinder;",
(void*)nativeCreateDisplay },
{"nativeSetDisplaySurface", "(Landroid/os/IBinder;Landroid/view/Surface;)V",
(void*)nativeSetDisplaySurface },