mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 12:35:33 -04:00
universal7885: parts: jni: Adapt for interface unify
* Also, Mark parts HAL is required for SamsungParts
This commit is contained in:
parent
4be8e028a2
commit
4b0238fe98
7 changed files with 33 additions and 40 deletions
|
|
@ -2,20 +2,20 @@
|
|||
#include <hidl/HidlSupport.h>
|
||||
#include <hidl/LegacySupport.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/eureka/hardware/gpu/1.0/IGpu.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IGpu.h>
|
||||
#include "jni.h"
|
||||
|
||||
using android::sp;
|
||||
using vendor::eureka::hardware::gpu::V1_0::Enable;
|
||||
using vendor::eureka::hardware::gpu::V1_0::IGpu;
|
||||
using vendor::eureka::hardware::parts::V1_0::Enable;
|
||||
using vendor::eureka::hardware::parts::V1_0::IGpu;
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_eurekateam_samsungextras_interfaces_GPU_setGPU(JNIEnv* env, jclass clazz, jint enable) {
|
||||
android::sp<IGpu> service = IGpu::getService();
|
||||
if (enable == 1) {
|
||||
service->setGpuWritable(Enable::ENABLE);
|
||||
service->setGpuWritable(Number::ENABLE);
|
||||
} else {
|
||||
service->setGpuWritable(Enable::DISABLE);
|
||||
service->setGpuWritable(Number::DISABLE);
|
||||
}
|
||||
}
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
|
|
|
|||
Loading…
Reference in a new issue