diff options
author | Jeff Brown <jeffbrown@google.com> | 2014-07-26 15:14:21 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2014-07-26 15:41:21 -0700 |
commit | 0f208eb707926f0afc1ce073be866bedd4955aa2 (patch) | |
tree | cb14defbd86887db0bfc4928c2a8ac19b4b57306 /services/core/jni | |
parent | 28c0b714ac7f6c98d63aab106447bfd1e727fae2 (diff) | |
download | frameworks_base-0f208eb707926f0afc1ce073be866bedd4955aa2.zip frameworks_base-0f208eb707926f0afc1ce073be866bedd4955aa2.tar.gz frameworks_base-0f208eb707926f0afc1ce073be866bedd4955aa2.tar.bz2 |
Remove DozeHardware since it will not be used.
Bug: 16516536
Change-Id: I14597d3c9470c94e3bc5b8cff500d2fe6b2fd977
Diffstat (limited to 'services/core/jni')
-rw-r--r-- | services/core/jni/Android.mk | 1 | ||||
-rw-r--r-- | services/core/jni/com_android_server_dreams_McuHal.cpp | 100 | ||||
-rw-r--r-- | services/core/jni/onload.cpp | 2 |
3 files changed, 0 insertions, 103 deletions
diff --git a/services/core/jni/Android.mk b/services/core/jni/Android.mk index 5599760..9a4d900 100644 --- a/services/core/jni/Android.mk +++ b/services/core/jni/Android.mk @@ -10,7 +10,6 @@ LOCAL_SRC_FILES += \ $(LOCAL_REL_DIR)/com_android_server_AssetAtlasService.cpp \ $(LOCAL_REL_DIR)/com_android_server_connectivity_Vpn.cpp \ $(LOCAL_REL_DIR)/com_android_server_ConsumerIrService.cpp \ - $(LOCAL_REL_DIR)/com_android_server_dreams_McuHal.cpp \ $(LOCAL_REL_DIR)/com_android_server_hdmi_HdmiCecController.cpp \ $(LOCAL_REL_DIR)/com_android_server_hdmi_HdmiMhlController.cpp \ $(LOCAL_REL_DIR)/com_android_server_input_InputApplicationHandle.cpp \ diff --git a/services/core/jni/com_android_server_dreams_McuHal.cpp b/services/core/jni/com_android_server_dreams_McuHal.cpp deleted file mode 100644 index a6d9297..0000000 --- a/services/core/jni/com_android_server_dreams_McuHal.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (C) 2014 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. - */ - -#define LOG_TAG "McuHal" - -//#define LOG_NDEBUG 0 - -#include "JNIHelp.h" -#include "jni.h" - -#include <ScopedUtfChars.h> -#include <ScopedPrimitiveArray.h> - -#include <utils/Errors.h> -#include <utils/Log.h> -#include <hardware/mcu.h> - -namespace android { - -static jlong nativeOpen(JNIEnv* env, jclass clazz) { - mcu_module_t* module = NULL; - status_t err = hw_get_module(MCU_HARDWARE_MODULE_ID, - (hw_module_t const**)&module); - if (err) { - ALOGE("Couldn't load %s module (%s)", MCU_HARDWARE_MODULE_ID, strerror(-err)); - return 0; - } - - err = module->init(module); - if (err) { - ALOGE("Couldn't initialize %s module (%s)", MCU_HARDWARE_MODULE_ID, strerror(-err)); - return 0; - } - - return reinterpret_cast<jlong>(module); -} - -static jbyteArray nativeSendMessage(JNIEnv* env, jclass clazz, - jlong ptr, jstring msgStr, jbyteArray argArray) { - mcu_module_t* module = reinterpret_cast<mcu_module_t*>(ptr); - - ScopedUtfChars msg(env, msgStr); - ALOGV("Sending message %s to MCU", msg.c_str()); - - void* result = NULL; - size_t resultSize = 0; - status_t err; - if (argArray) { - ScopedByteArrayRO arg(env, argArray); - err = module->sendMessage(module, msg.c_str(), arg.get(), arg.size(), - &result, &resultSize); - } else { - err = module->sendMessage(module, msg.c_str(), NULL, 0, &result, &resultSize); - } - if (err) { - ALOGE("Couldn't send message to MCU (%s)", strerror(-err)); - return NULL; - } - - if (!result) { - return NULL; - } - - jbyteArray resultArray = env->NewByteArray(resultSize); - if (resultArray) { - env->SetByteArrayRegion(resultArray, 0, resultSize, static_cast<jbyte*>(result)); - } - free(result); - return resultArray; -} - -static JNINativeMethod gMcuHalMethods[] = { - /* name, signature, funcPtr */ - { "nativeOpen", "()J", - (void*) nativeOpen }, - { "nativeSendMessage", "(JLjava/lang/String;[B)[B", - (void*) nativeSendMessage }, -}; - -int register_android_server_dreams_McuHal(JNIEnv* env) { - int res = jniRegisterNativeMethods(env, "com/android/server/dreams/McuHal", - gMcuHalMethods, NELEM(gMcuHalMethods)); - LOG_FATAL_IF(res < 0, "Unable to register native methods."); - return 0; -} - -} /* namespace android */ diff --git a/services/core/jni/onload.cpp b/services/core/jni/onload.cpp index bf7501e..ce2ca9b 100644 --- a/services/core/jni/onload.cpp +++ b/services/core/jni/onload.cpp @@ -37,7 +37,6 @@ int register_android_server_VibratorService(JNIEnv* env); int register_android_server_location_GpsLocationProvider(JNIEnv* env); int register_android_server_location_FlpHardwareProvider(JNIEnv* env); int register_android_server_connectivity_Vpn(JNIEnv* env); -int register_android_server_dreams_McuHal(JNIEnv* env); int register_android_server_hdmi_HdmiCecController(JNIEnv* env); int register_android_server_hdmi_HdmiMhlController(JNIEnv* env); int register_android_server_tv_TvInputHal(JNIEnv* env); @@ -73,7 +72,6 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void* reserved) register_android_server_connectivity_Vpn(env); register_android_server_AssetAtlasService(env); register_android_server_ConsumerIrService(env); - register_android_server_dreams_McuHal(env); register_android_server_BatteryStatsService(env); register_android_server_hdmi_HdmiCecController(env); register_android_server_hdmi_HdmiMhlController(env); |