summaryrefslogtreecommitdiffstats
path: root/services/jni
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2010-10-12 14:46:23 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-10-12 14:46:23 -0700
commit9a12a3c8d4bb20042cf69e07d268e3a04ac71f96 (patch)
tree8077adbd81854c5b5571b57a5f9d20f28d92ca75 /services/jni
parent090ac9f7dd883aa75c899745182471d409a2b762 (diff)
parentba799098608c7be8ff1e18adfa7dc1f452205a7e (diff)
downloadframeworks_base-9a12a3c8d4bb20042cf69e07d268e3a04ac71f96.zip
frameworks_base-9a12a3c8d4bb20042cf69e07d268e3a04ac71f96.tar.gz
frameworks_base-9a12a3c8d4bb20042cf69e07d268e3a04ac71f96.tar.bz2
am ba799098: Merge changes I76513387,I335fb671 into gingerbread
Merge commit 'ba799098608c7be8ff1e18adfa7dc1f452205a7e' into gingerbread-plus-aosp * commit 'ba799098608c7be8ff1e18adfa7dc1f452205a7e': 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 cdc0a6f..c90879d 100644
--- a/services/jni/Android.mk
+++ b/services/jni/Android.mk
@@ -23,7 +23,8 @@ LOCAL_SHARED_LIBRARIES := \
libnativehelper \
libsystem_server \
libutils \
- libui
+ libui \
+ libsurfaceflinger_client
ifeq ($(TARGET_SIMULATOR),true)
ifeq ($(TARGET_OS),linux)
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) \