diff options
author | Mike Lockwood <lockwood@android.com> | 2009-11-24 00:30:52 -0500 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-11-25 12:54:58 -0500 |
commit | 3a32213c4029a03fe39486f3d6ebd0ea18928ee1 (patch) | |
tree | 261ab976911438a818b190771e49cd649d72de2f /core/jni | |
parent | f90b1261a53bc0bfc772337551eb4c540022cd22 (diff) | |
download | frameworks_base-3a32213c4029a03fe39486f3d6ebd0ea18928ee1.zip frameworks_base-3a32213c4029a03fe39486f3d6ebd0ea18928ee1.tar.gz frameworks_base-3a32213c4029a03fe39486f3d6ebd0ea18928ee1.tar.bz2 |
Remove HardwareService and move vibrator support to VibratorService.
The lights support is only needed by PowerManagerService and NotificationManagerService, so we do not need a Binder API for it.
Move backlight and notification light support to new LightsService class.
The camera flash is now handled directly by the camera HAL, so the flash Hardware service flash support is obsolete.
Change-Id: I086d681f54668e7f7de3e8b90df3de19d59833c5
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/Android.mk | 1 | ||||
-rw-r--r-- | core/jni/AndroidRuntime.cpp | 2 | ||||
-rw-r--r-- | core/jni/android_os_Hardware.cpp | 62 |
3 files changed, 0 insertions, 65 deletions
diff --git a/core/jni/Android.mk b/core/jni/Android.mk index b9042f9..edb0b78 100644 --- a/core/jni/Android.mk +++ b/core/jni/Android.mk @@ -54,7 +54,6 @@ LOCAL_SRC_FILES:= \ android_os_SystemClock.cpp \ android_os_SystemProperties.cpp \ android_os_UEventObserver.cpp \ - android_os_Hardware.cpp \ android_net_LocalSocketImpl.cpp \ android_net_NetUtils.cpp \ android_net_wifi_Wifi.cpp \ diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index d069d7d..9f617fb 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -130,7 +130,6 @@ extern int register_android_os_ParcelFileDescriptor(JNIEnv *env); extern int register_android_os_Power(JNIEnv *env); extern int register_android_os_StatFs(JNIEnv *env); extern int register_android_os_SystemProperties(JNIEnv *env); -extern int register_android_os_Hardware(JNIEnv* env); extern int register_android_os_SystemClock(JNIEnv* env); extern int register_android_os_FileObserver(JNIEnv *env); extern int register_android_os_FileUtils(JNIEnv *env); @@ -1166,7 +1165,6 @@ static const RegJNIRec gRegJNI[] = { REG_JNI(register_android_text_KeyCharacterMap), REG_JNI(register_android_os_Process), REG_JNI(register_android_os_Binder), - REG_JNI(register_android_os_Hardware), REG_JNI(register_android_view_Display), REG_JNI(register_android_nio_utils), REG_JNI(register_android_graphics_PixelFormat), diff --git a/core/jni/android_os_Hardware.cpp b/core/jni/android_os_Hardware.cpp deleted file mode 100644 index 8007662..0000000 --- a/core/jni/android_os_Hardware.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2006, The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -*/ - -#include <hardware_legacy/flashlight.h> -#include <hardware_legacy/power.h> - -#include <nativehelper/jni.h> -#include <android_runtime/AndroidRuntime.h> -#include <nativehelper/JNIHelp.h> - -namespace android { - -static jint -getFlashlightEnabled(JNIEnv *env, jobject clazz) -{ - return get_flashlight_enabled(); -} - -static void -setFlashlightEnabled(JNIEnv *env, jobject clazz, jboolean on) -{ - set_flashlight_enabled(on); -} - -static void -enableCameraFlash(JNIEnv *env, jobject clazz, jint milliseconds) -{ - enable_camera_flash(milliseconds); -} - -// ============================================================================ -/* - * JNI registration. - */ - -static JNINativeMethod g_methods[] = { - /* name, signature, funcPtr */ - { "getFlashlightEnabled", "()Z", (void*)getFlashlightEnabled }, - { "setFlashlightEnabled", "(Z)V", (void*)setFlashlightEnabled }, - { "enableCameraFlash", "(I)V", (void*)enableCameraFlash }, -}; - -int register_android_os_Hardware(JNIEnv* env) -{ - return AndroidRuntime::registerNativeMethods(env, - "android/os/Hardware", g_methods, NELEM(g_methods)); -} - -}; // namespace android |