summaryrefslogtreecommitdiffstats
path: root/services/jni
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2010-10-13 23:34:21 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-10-13 23:34:21 -0700
commiteb86aaaab34687a77454fa130b08788db1317d74 (patch)
tree6a0b8bd8dc7d3bb45511902d5d6fba012a3c8b43 /services/jni
parent4afdf666fdb034834c48445570ed9d6f4133fc71 (diff)
parent9a12a3c8d4bb20042cf69e07d268e3a04ac71f96 (diff)
downloadframeworks_base-eb86aaaab34687a77454fa130b08788db1317d74.zip
frameworks_base-eb86aaaab34687a77454fa130b08788db1317d74.tar.gz
frameworks_base-eb86aaaab34687a77454fa130b08788db1317d74.tar.bz2
am 9a12a3c8: am ba799098: Merge changes I76513387,I335fb671 into gingerbread
Merge commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96' * commit '9a12a3c8d4bb20042cf69e07d268e3a04ac71f96': Remove dead code, and make the animation a setting. turn off the electron beam
Diffstat (limited to 'services/jni')
-rw-r--r--services/jni/Android.mk3
-rw-r--r--services/jni/com_android_server_PowerManagerService.cpp13
2 files changed, 15 insertions, 1 deletions
diff --git a/services/jni/Android.mk b/services/jni/Android.mk
index 459551d..d10f54f 100644
--- a/services/jni/Android.mk
+++ b/services/jni/Android.mk
@@ -24,7 +24,8 @@ LOCAL_SHARED_LIBRARIES := \
libnativehelper \
libsystem_server \
libutils \
- libui
+ libui \
+ libsurfaceflinger_client
LOCAL_STATIC_LIBRARIES := libusbhost
diff --git a/services/jni/com_android_server_PowerManagerService.cpp b/services/jni/com_android_server_PowerManagerService.cpp
index 146c177..2ec20bd 100644
--- a/services/jni/com_android_server_PowerManagerService.cpp
+++ b/services/jni/com_android_server_PowerManagerService.cpp
@@ -20,9 +20,14 @@
#include "JNIHelp.h"
#include "jni.h"
+
#include <limits.h>
+
#include <android_runtime/AndroidRuntime.h>
#include <utils/Timers.h>
+#include <surfaceflinger/ISurfaceComposer.h>
+#include <surfaceflinger/SurfaceComposerClient.h>
+
#include "com_android_server_PowerManagerService.h"
namespace android {
@@ -119,6 +124,12 @@ static void android_server_PowerManagerService_nativeSetPowerState(JNIEnv* env,
gScreenBright = screenBright;
}
+static void android_server_PowerManagerService_nativeStartSurfaceFlingerAnimation(JNIEnv* env,
+ jobject obj) {
+ sp<ISurfaceComposer> s(ComposerService::getComposerService());
+ s->turnElectronBeamOff(0);
+}
+
// ----------------------------------------------------------------------------
static JNINativeMethod gPowerManagerServiceMethods[] = {
@@ -127,6 +138,8 @@ static JNINativeMethod gPowerManagerServiceMethods[] = {
(void*) android_server_PowerManagerService_nativeInit },
{ "nativeSetPowerState", "(ZZ)V",
(void*) android_server_PowerManagerService_nativeSetPowerState },
+ { "nativeStartSurfaceFlingerAnimation", "()V",
+ (void*) android_server_PowerManagerService_nativeStartSurfaceFlingerAnimation },
};
#define FIND_CLASS(var, className) \