diff options
author | Joe Onorato <joeo@android.com> | 2010-10-11 19:28:58 -0700 |
---|---|---|
committer | Joe Onorato <joeo@android.com> | 2010-10-12 14:16:11 -0700 |
commit | b08a1af667b16cb1faaea2aec1cf2a0e4659cb3f (patch) | |
tree | 5d9491ee082cdb6f6fb61a22c97c961ee5ae5721 /services/jni | |
parent | aab758e87991d1460ca94d4a5f22c0ef34641e2d (diff) | |
download | frameworks_base-b08a1af667b16cb1faaea2aec1cf2a0e4659cb3f.zip frameworks_base-b08a1af667b16cb1faaea2aec1cf2a0e4659cb3f.tar.gz frameworks_base-b08a1af667b16cb1faaea2aec1cf2a0e4659cb3f.tar.bz2 |
Remove dead code, and make the animation a setting.
When we don't do the brightness fade, turn off the electron beam instead.
Change-Id: I76513387c4fb420a67e59e005f6e8c3bc72f7f08
Diffstat (limited to 'services/jni')
-rw-r--r-- | services/jni/Android.mk | 3 | ||||
-rw-r--r-- | services/jni/com_android_server_PowerManagerService.cpp | 13 |
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) \ |