mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 04:25:33 -04:00
universal7885: run clang-format based on system-clang-format
* On every *.cpp *.h files Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
6bc1c25485
commit
098179eabb
47 changed files with 1545 additions and 1709 deletions
|
|
@ -1,68 +1,63 @@
|
|||
#include <vendor/eureka/hardware/flashlight/1.0/IFlashlight.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <hidl/LegacySupport.h>
|
||||
#include <hardware/hardware.h>
|
||||
#include <hidl/HidlSupport.h>
|
||||
#include <hidl/LegacySupport.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/eureka/hardware/flashlight/1.0/IFlashlight.h>
|
||||
#include "jni.h"
|
||||
|
||||
using vendor::eureka::hardware::flashlight::V1_0::IFlashlight;
|
||||
using android::sp;
|
||||
using vendor::eureka::hardware::flashlight::V1_0::Device;
|
||||
using vendor::eureka::hardware::flashlight::V1_0::Enable;
|
||||
using vendor::eureka::hardware::flashlight::V1_0::IFlashlight;
|
||||
using vendor::eureka::hardware::flashlight::V1_0::Number;
|
||||
using android::sp;
|
||||
|
||||
extern "C"
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_eurekateam_samsungextras_interfaces_Flashlight_setFlash(JNIEnv *env, __unused jobject obj,
|
||||
jint value) {
|
||||
android::sp<IFlashlight> service = IFlashlight::getService();
|
||||
service->setFlashlightEnable(Enable::ENABLE);
|
||||
switch (value) {
|
||||
case 1:
|
||||
service->setFlashlightWritable(Number::ONEUI);
|
||||
break;
|
||||
case 2:
|
||||
service->setFlashlightWritable(Number::TWOUI);
|
||||
break;
|
||||
case 3:
|
||||
service->setFlashlightWritable(Number::THREEUI);
|
||||
break;
|
||||
case 4:
|
||||
service->setFlashlightWritable(Number::FOURUI);
|
||||
break;
|
||||
case 5:
|
||||
service->setFlashlightWritable(Number::FIVEUI);
|
||||
break;
|
||||
case 6:
|
||||
service->setFlashlightWritable(Number::SIXUI);
|
||||
break;
|
||||
case 7:
|
||||
service->setFlashlightWritable(Number::SEVENUI);
|
||||
break;
|
||||
case 8:
|
||||
service->setFlashlightWritable(Number::EIGHTUI);
|
||||
break;
|
||||
case 9:
|
||||
service->setFlashlightWritable(Number::NINEUI);
|
||||
break;
|
||||
case 10:
|
||||
service->setFlashlightWritable(Number::TENUI);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
extern "C" JNIEXPORT void JNICALL Java_com_eurekateam_samsungextras_interfaces_Flashlight_setFlash(
|
||||
JNIEnv* env, __unused jobject obj, jint value) {
|
||||
android::sp<IFlashlight> service = IFlashlight::getService();
|
||||
service->setFlashlightEnable(Enable::ENABLE);
|
||||
switch (value) {
|
||||
case 1:
|
||||
service->setFlashlightWritable(Number::ONEUI);
|
||||
break;
|
||||
case 2:
|
||||
service->setFlashlightWritable(Number::TWOUI);
|
||||
break;
|
||||
case 3:
|
||||
service->setFlashlightWritable(Number::THREEUI);
|
||||
break;
|
||||
case 4:
|
||||
service->setFlashlightWritable(Number::FOURUI);
|
||||
break;
|
||||
case 5:
|
||||
service->setFlashlightWritable(Number::FIVEUI);
|
||||
break;
|
||||
case 6:
|
||||
service->setFlashlightWritable(Number::SIXUI);
|
||||
break;
|
||||
case 7:
|
||||
service->setFlashlightWritable(Number::SEVENUI);
|
||||
break;
|
||||
case 8:
|
||||
service->setFlashlightWritable(Number::EIGHTUI);
|
||||
break;
|
||||
case 9:
|
||||
service->setFlashlightWritable(Number::NINEUI);
|
||||
break;
|
||||
case 10:
|
||||
service->setFlashlightWritable(Number::TENUI);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
extern "C"
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_com_eurekateam_samsungextras_interfaces_Flashlight_getFlash(JNIEnv *env, jobject clazz,
|
||||
jint isA10) {
|
||||
android::sp<IFlashlight> service = IFlashlight::getService();
|
||||
int ret;
|
||||
if (isA10 == 1){
|
||||
extern "C" JNIEXPORT jint JNICALL Java_com_eurekateam_samsungextras_interfaces_Flashlight_getFlash(
|
||||
JNIEnv* env, jobject clazz, jint isA10) {
|
||||
android::sp<IFlashlight> service = IFlashlight::getService();
|
||||
int ret;
|
||||
if (isA10 == 1) {
|
||||
ret = service->readFlashlightstats(Device::A10);
|
||||
}else{
|
||||
} else {
|
||||
ret = service->readFlashlightstats(Device::NOTA10);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue