mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 12:35:33 -04:00
universal7885: parts: Follow Android 12 style
* Use more Settingslib classes and resource layouts Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
723dfbec38
commit
419f6646a3
14 changed files with 89 additions and 459 deletions
|
|
@ -13,10 +13,18 @@ using vendor::eureka::hardware::parts::V1_0::Value;
|
|||
|
||||
static android::sp<IFlashBrightness> service = IFlashBrightness::getService();
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_eurekateam_samsungextras_interfaces_Flashlight_setFlash(JNIEnv *env, __unused jobject obj, jboolean enabled) {
|
||||
if (enabled) {
|
||||
service->setFlashlightEnable(Number::ENABLE);
|
||||
} else {
|
||||
service->setFlashlightEnable(Number::DISABLE);
|
||||
}
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_eurekateam_samsungextras_interfaces_Flashlight_setFlash(
|
||||
JNIEnv *env, __unused jobject obj, jint value) {
|
||||
service->setFlashlightEnable(Number::ENABLE);
|
||||
service->setFlashlightWritable(static_cast<Value>(value));
|
||||
}
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
|
|
|
|||
Loading…
Reference in a new issue