mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-22 12:05:32 -04:00
universal7885: SamsungParts: add gpu, selinux and update related sepolicy
This commit is contained in:
parent
1bcf57f719
commit
c1a9d9f071
36 changed files with 632 additions and 170 deletions
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
package vendor.eureka.hardware.flashlight@1.0;
|
||||
|
||||
interface IFlashLight {
|
||||
interface IFlashlight {
|
||||
setFlashlightWritable(Number value) generates (int32_t result);
|
||||
setFlashlightEnable(Enable enable) generates (int32_t result);
|
||||
readFlashlightstats(Device device) generates (int32_t value);
|
||||
|
|
|
|||
|
|
@ -19,18 +19,18 @@
|
|||
namespace vendor::eureka::hardware::flashlight::V1_0 {
|
||||
|
||||
// Methods from ::android::hardware::flashlight::V1_0::IFlashlight follow.
|
||||
Return<int32_t> Flashlight::getFlashlightStats(flashlight::V1_0::Enable enable) {
|
||||
Return<int32_t> Flashlight::setFlashlightEnable(flashlight::V1_0::Enable enable) {
|
||||
std::ofstream file;
|
||||
std::string writevalue;
|
||||
switch (enable){
|
||||
case Number::ENABLE:
|
||||
case Enable::ENABLE:
|
||||
writevalue = "1";
|
||||
break;
|
||||
case Number::DISABLE:
|
||||
case Enable::DISABLE:
|
||||
writevalue = "0";
|
||||
break;
|
||||
default:
|
||||
filename = "";
|
||||
writevalue = "";
|
||||
break;
|
||||
}
|
||||
file.open("/sys/class/camera/flash/torch_brightness_lvl_enable");
|
||||
|
|
@ -74,7 +74,7 @@ Return<int32_t> Flashlight::setFlashlightWritable(flashlight::V1_0::Number value
|
|||
writevalue = "10";
|
||||
break;
|
||||
default:
|
||||
filename = "";
|
||||
writevalue = "";
|
||||
break;
|
||||
}
|
||||
file.open("/sys/class/camera/flash/torch_brightness_lvl");
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ using ::android::sp;
|
|||
|
||||
struct Flashlight : public IFlashlight {
|
||||
// Methods from ::vendor::eureka::hardware::flashlight::V1_0::IFlashlight follow.
|
||||
Return<int32_t> Flashlight::getFlashlightStats(flashlight::V1_0::Enable enable);
|
||||
Return<int32_t> Flashlight::setFlashlightWritable(flashlight::V1_0::Number value);
|
||||
Return<int32_t> Flashlight::readFlashlightstats(flashlight::V1_0::Device device);
|
||||
Return<int32_t> setFlashlightEnable(Enable enable);
|
||||
Return<int32_t> setFlashlightWritable(Number value);
|
||||
Return<int32_t> readFlashlightstats(Device device);
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
static IFlashlight* getInstance(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -35,4 +35,4 @@ enum Number : int32_t {
|
|||
enum Enable : int32_t {
|
||||
ENABLE,
|
||||
DISABLE,
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue