mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-22 12:05:32 -04:00
universal7885: parts: hidl: Make some changes
* Drop useless selinux and gpu * Instead put display configs (DT2W, Glove mode) Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
0164a22774
commit
7156ddca8f
20 changed files with 90 additions and 236 deletions
|
|
@ -3,11 +3,10 @@ hidl_interface {
|
|||
root: "vendor.eureka",
|
||||
srcs: [
|
||||
"types.hal",
|
||||
"IBattery.hal",
|
||||
"IFlashLight.hal",
|
||||
"IGpu.hal",
|
||||
"ISELinux.hal",
|
||||
"IBatteryStats.hal",
|
||||
"IFlashBrightness.hal",
|
||||
"IDisplayConfigs.hal",
|
||||
],
|
||||
interfaces: [ "android.hidl.base@1.0" ],
|
||||
gen_java: true,
|
||||
gen_java: false,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
package vendor.eureka.hardware.parts@1.0;
|
||||
|
||||
interface IBattery {
|
||||
interface IBatteryStats {
|
||||
getBatteryStats(SysfsType stats) generates (int32_t result);
|
||||
setBatteryWritable(SysfsType stats, Number value) generates (int32_t result);
|
||||
setBatteryWritable(SysfsType stats, Number value);
|
||||
};
|
||||
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
package vendor.eureka.hardware.parts@1.0;
|
||||
|
||||
interface IGpu {
|
||||
setGpuWritable(Number enable) generates (int32_t result);
|
||||
readGpustats() generates (int32_t value);
|
||||
interface IDisplayConfigs {
|
||||
writeDisplay(Number enable, Display type);
|
||||
};
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
package vendor.eureka.hardware.parts@1.0;
|
||||
|
||||
interface IFlashLight {
|
||||
setFlashlightWritable(Value value) generates (int32_t result);
|
||||
setFlashlightEnable(Number enable) generates (int32_t result);
|
||||
interface IFlashBrightness {
|
||||
setFlashlightWritable(Value value);
|
||||
setFlashlightEnable(Number enable);
|
||||
readFlashlightstats(Device device) generates (int32_t value);
|
||||
};
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
// Copyright (C) 2021 Eureka Team
|
||||
//
|
||||
// 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.
|
||||
|
||||
package vendor.eureka.hardware.parts@1.0;
|
||||
|
||||
interface ISELinux {
|
||||
setSELinuxWritable(Number enable) generates (int32_t result);
|
||||
readSELinuxstats() generates (int32_t value);
|
||||
};
|
||||
|
|
@ -7,8 +7,7 @@ cc_binary {
|
|||
srcs: [
|
||||
"Battery.cpp",
|
||||
"FlashLight.cpp",
|
||||
"Gpu.cpp",
|
||||
"SELinux.cpp",
|
||||
"Display.cpp",
|
||||
"service.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||
|
||||
// Methods from ::android::hardware::battery::V1_0::IBattery follow.
|
||||
Return<int32_t> Battery::getBatteryStats(parts::V1_0::SysfsType stats) {
|
||||
Return<int32_t> BatteryStats::getBatteryStats(parts::V1_0::SysfsType stats) {
|
||||
std::ifstream file;
|
||||
std::string filename;
|
||||
switch (stats) {
|
||||
|
|
@ -60,7 +60,7 @@ Return<int32_t> Battery::getBatteryStats(parts::V1_0::SysfsType stats) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
Return<int32_t> Battery::setBatteryWritable(parts::V1_0::SysfsType stats,
|
||||
Return<void> BatteryStats::setBatteryWritable(parts::V1_0::SysfsType stats,
|
||||
parts::V1_0::Number value) {
|
||||
std::ofstream file;
|
||||
std::string filename;
|
||||
|
|
@ -100,10 +100,10 @@ Return<int32_t> Battery::setBatteryWritable(parts::V1_0::SysfsType stats,
|
|||
file << write;
|
||||
file.close();
|
||||
if (FastCharge) seteuid(ANDROID_ROOT_UID);
|
||||
return 0;
|
||||
return Void();
|
||||
}
|
||||
|
||||
IBattery* Battery::getInstance(void) {
|
||||
return new Battery();
|
||||
IBatteryStats* BatteryStats::getInstance(void) {
|
||||
return new BatteryStats();
|
||||
}
|
||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IBattery.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IBatteryStats.h>
|
||||
|
||||
#define ANDROID_SYSTEM_UID 1000
|
||||
#define ANDROID_ROOT_UID 0
|
||||
|
|
@ -31,12 +31,12 @@ using ::android::hardware::hidl_vec;
|
|||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
|
||||
struct Battery : public IBattery {
|
||||
// Methods from ::vendor::eureka::hardware::parts::V1_0::IBattery follow.
|
||||
struct BatteryStats : public IBatteryStats {
|
||||
// Methods from ::vendor::eureka::hardware::parts::V1_0::IBatteryStats follow.
|
||||
Return<int32_t> getBatteryStats(SysfsType stats) override;
|
||||
Return<int32_t> setBatteryWritable(SysfsType stats, Number value) override;
|
||||
Return<void> setBatteryWritable(SysfsType stats, Number value) override;
|
||||
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
static IBattery* getInstance(void);
|
||||
static IBatteryStats* getInstance(void);
|
||||
};
|
||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||
|
|
|
|||
|
|
@ -12,42 +12,33 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "Gpu.h"
|
||||
#include "Display.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||
|
||||
Return<int32_t> Gpu::setGpuWritable(parts::V1_0::Number enable) {
|
||||
Return<void> DisplayConfigs::writeDisplay(parts::V1_0::Number enable, parts::V1_0::Display type) {
|
||||
std::ofstream file;
|
||||
std::string writevalue;
|
||||
if (enable == Number::ENABLE) {
|
||||
writevalue = "1";
|
||||
} else {
|
||||
writevalue = "0";
|
||||
if (type == Display::DOUBLE_TAP){
|
||||
writevalue = "aot_enable";
|
||||
} else if (type == Display::GLOVE_MODE){
|
||||
writevalue = "glove_mode";
|
||||
}
|
||||
file.open("/sys/devices/platform/11500000.mali/tmu");
|
||||
|
||||
if (enable == Number::ENABLE) {
|
||||
writevalue += ",1";
|
||||
} else {
|
||||
writevalue += ",0";
|
||||
}
|
||||
file.open("/sys/class/sec/tsp/cmd");
|
||||
file << writevalue;
|
||||
file.close();
|
||||
return 0;
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<int32_t> Gpu::readGpustats(void) {
|
||||
std::ifstream file;
|
||||
std::string value;
|
||||
int32_t intvalue;
|
||||
file.open("/sys/devices/platform/11500000.mali/tmu");
|
||||
if (file.is_open()) {
|
||||
getline(file, value);
|
||||
file.close();
|
||||
std::stringstream val(value);
|
||||
val >> intvalue;
|
||||
return intvalue;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
IGpu* Gpu::getInstance(void) {
|
||||
return new Gpu();
|
||||
IDisplayConfigs* DisplayConfigs::getInstance(void) {
|
||||
return new DisplayConfigs();
|
||||
}
|
||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/ISELinux.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IDisplayConfigs.h>
|
||||
|
||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||
|
||||
|
|
@ -28,11 +28,10 @@ using ::android::hardware::hidl_vec;
|
|||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
|
||||
struct SELinux : public ISELinux {
|
||||
// Methods from ::vendor::eureka::hardware::parts::V1_0::ISELinux follow.
|
||||
Return<int32_t> setSELinuxWritable(Number enable);
|
||||
Return<int32_t> readSELinuxstats(void);
|
||||
struct DisplayConfigs : public IDisplayConfigs {
|
||||
// Methods from ::vendor::eureka::hardware::parts::V1_0::IDisplayConfigs follow.
|
||||
Return<void> writeDisplay(Number enable, Display type);
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
static ISELinux* getInstance(void);
|
||||
static IDisplayConfigs* getInstance(void);
|
||||
};
|
||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||
|
||||
// Methods from ::android::hardware::parts::V1_0::IFlashLight follow.
|
||||
Return<int32_t> FlashLight::setFlashlightEnable(parts::V1_0::Number enable) {
|
||||
Return<void> FlashBrightness::setFlashlightEnable(parts::V1_0::Number enable) {
|
||||
std::ofstream file;
|
||||
std::string writevalue;
|
||||
switch (enable) {
|
||||
|
|
@ -36,10 +36,10 @@ Return<int32_t> FlashLight::setFlashlightEnable(parts::V1_0::Number enable) {
|
|||
file.open("/sys/class/camera/flash/torch_brightness_lvl_enable");
|
||||
file << writevalue;
|
||||
file.close();
|
||||
return 0;
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<int32_t> FlashLight::setFlashlightWritable(parts::V1_0::Value value) {
|
||||
Return<void> FlashBrightness::setFlashlightWritable(parts::V1_0::Value value) {
|
||||
std::ofstream file;
|
||||
std::string writevalue;
|
||||
switch (value) {
|
||||
|
|
@ -80,10 +80,10 @@ Return<int32_t> FlashLight::setFlashlightWritable(parts::V1_0::Value value) {
|
|||
file.open("/sys/class/camera/flash/torch_brightness_lvl");
|
||||
file << writevalue;
|
||||
file.close();
|
||||
return 0;
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<int32_t> FlashLight::readFlashlightstats(parts::V1_0::Device device) {
|
||||
Return<int32_t> FlashBrightness::readFlashlightstats(parts::V1_0::Device device) {
|
||||
std::ifstream file;
|
||||
std::string value;
|
||||
int32_t intvalue;
|
||||
|
|
@ -104,7 +104,7 @@ Return<int32_t> FlashLight::readFlashlightstats(parts::V1_0::Device device) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
IFlashLight* FlashLight::getInstance(void) {
|
||||
return new FlashLight();
|
||||
IFlashBrightness* FlashBrightness::getInstance(void) {
|
||||
return new FlashBrightness();
|
||||
}
|
||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IFlashLight.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IFlashBrightness.h>
|
||||
|
||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||
|
||||
|
|
@ -28,12 +28,12 @@ using ::android::hardware::hidl_vec;
|
|||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
|
||||
struct FlashLight : public IFlashLight {
|
||||
// Methods from ::vendor::eureka::hardware::flashlight::V1_0::IFlashLight follow.
|
||||
Return<int32_t> setFlashlightEnable(Number enable);
|
||||
Return<int32_t> setFlashlightWritable(Value value);
|
||||
struct FlashBrightness : public IFlashBrightness {
|
||||
// Methods from ::vendor::eureka::hardware::parts::V1_0::IFlashBrightness follow.
|
||||
Return<void> setFlashlightEnable(Number enable);
|
||||
Return<void> setFlashlightWritable(Value value);
|
||||
Return<int32_t> readFlashlightstats(Device device);
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
static IFlashLight* getInstance(void);
|
||||
static IFlashBrightness* getInstance(void);
|
||||
};
|
||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright (C) 2021 Eureka Team
|
||||
//
|
||||
// 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.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IGpu.h>
|
||||
|
||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||
|
||||
using ::android::sp;
|
||||
using ::android::hardware::hidl_array;
|
||||
using ::android::hardware::hidl_memory;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
|
||||
struct Gpu : public IGpu {
|
||||
// Methods from ::vendor::eureka::hardware::parts::V1_0::IGpu follow.
|
||||
Return<int32_t> setGpuWritable(Number enable);
|
||||
Return<int32_t> readGpustats(void);
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
static IGpu* getInstance(void);
|
||||
};
|
||||
} // namespace vendor::eureka::hardware::parss::V1_0
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
// Copyright (C) 2021 Eureka Team
|
||||
//
|
||||
// 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.
|
||||
|
||||
#include "SELinux.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||
|
||||
Return<int32_t> SELinux::setSELinuxWritable(parts::V1_0::Number enable) {
|
||||
std::ofstream file;
|
||||
std::string writevalue;
|
||||
if (enable == Number::ENABLE) {
|
||||
writevalue = "1";
|
||||
} else {
|
||||
writevalue = "0";
|
||||
}
|
||||
file.open("/sys/fs/selinux/enforce");
|
||||
file << writevalue;
|
||||
file.close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Return<int32_t> SELinux::readSELinuxstats(void) {
|
||||
std::ifstream file;
|
||||
std::string value;
|
||||
int32_t intvalue;
|
||||
file.open("/sys/fs/selinux/enforce");
|
||||
if (file.is_open()) {
|
||||
getline(file, value);
|
||||
file.close();
|
||||
std::stringstream val(value);
|
||||
val >> intvalue;
|
||||
return intvalue;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
ISELinux* SELinux::getInstance(void) {
|
||||
return new SELinux();
|
||||
}
|
||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||
|
|
@ -14,37 +14,31 @@
|
|||
|
||||
#define LOG_TAG "vendor.eureka.hardware.parts@1.0-service"
|
||||
|
||||
#include <vendor/eureka/hardware/parts/1.0/IBattery.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IFlashLight.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IGpu.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/ISELinux.h>
|
||||
|
||||
#include <vendor/eureka/hardware/parts/1.0/IBatteryStats.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IFlashBrightness.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IDisplayConfigs.h>
|
||||
#include <hidl/LegacySupport.h>
|
||||
|
||||
#include "Battery.h"
|
||||
#include "FlashLight.h"
|
||||
#include "Gpu.h"
|
||||
#include "SELinux.h"
|
||||
#include "Display.h"
|
||||
|
||||
using android::sp;
|
||||
using android::hardware::configureRpcThreadpool;
|
||||
using android::hardware::joinRpcThreadpool;
|
||||
using vendor::eureka::hardware::parts::V1_0::Battery;
|
||||
using vendor::eureka::hardware::parts::V1_0::IBattery;
|
||||
using vendor::eureka::hardware::parts::V1_0::FlashLight;
|
||||
using vendor::eureka::hardware::parts::V1_0::IFlashLight;
|
||||
using vendor::eureka::hardware::parts::V1_0::Gpu;
|
||||
using vendor::eureka::hardware::parts::V1_0::IGpu;
|
||||
using vendor::eureka::hardware::parts::V1_0::SELinux;
|
||||
using vendor::eureka::hardware::parts::V1_0::ISELinux;
|
||||
using vendor::eureka::hardware::parts::V1_0::BatteryStats;
|
||||
using vendor::eureka::hardware::parts::V1_0::IBatteryStats;
|
||||
using vendor::eureka::hardware::parts::V1_0::FlashBrightness;
|
||||
using vendor::eureka::hardware::parts::V1_0::IFlashBrightness;
|
||||
using vendor::eureka::hardware::parts::V1_0::DisplayConfigs;
|
||||
using vendor::eureka::hardware::parts::V1_0::IDisplayConfigs;
|
||||
|
||||
int main() {
|
||||
int ret;
|
||||
android::sp<IBattery> mBatteryService = Battery::getInstance();
|
||||
android::sp<IFlashLight> mFlashLightService = FlashLight::getInstance();
|
||||
android::sp<IGpu> mGPUService = Gpu::getInstance();
|
||||
android::sp<ISELinux> mSEService = SELinux::getInstance();
|
||||
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
||||
android::sp<IBatteryStats> mBatteryService = BatteryStats::getInstance();
|
||||
android::sp<IFlashBrightness> mFlashLightService = FlashBrightness::getInstance();
|
||||
android::sp<IDisplayConfigs> mDisplayService = DisplayConfigs::getInstance();
|
||||
configureRpcThreadpool(4, true /*callerWillJoin*/);
|
||||
|
||||
if (mBatteryService != nullptr) {
|
||||
ret = mBatteryService->registerAsService();
|
||||
|
|
@ -66,25 +60,15 @@ int main() {
|
|||
} else {
|
||||
ALOGE("Can't create instance of FlashLight HAL, nullptr");
|
||||
}
|
||||
if (mGPUService != nullptr) {
|
||||
ret = mGPUService->registerAsService();
|
||||
if (mDisplayService != nullptr) {
|
||||
ret = mDisplayService->registerAsService();
|
||||
if (ret != 0) {
|
||||
ALOGE("Can't register instance of GPU HAL, nullptr");
|
||||
ALOGE("Can't register instance of Display HAL, nullptr");
|
||||
} else {
|
||||
ALOGI("registered GPU HAL");
|
||||
ALOGI("registered Display HAL");
|
||||
}
|
||||
} else {
|
||||
ALOGE("Can't create instance of GPU HAL, nullptr");
|
||||
}
|
||||
if (mSEService != nullptr) {
|
||||
ret = mSEService->registerAsService();
|
||||
if (ret != 0) {
|
||||
ALOGE("Can't register instance of SELinux HAL, nullptr");
|
||||
} else {
|
||||
ALOGI("registered SELinux HAL");
|
||||
}
|
||||
} else {
|
||||
ALOGE("Can't create instance of SELinux HAL, nullptr");
|
||||
ALOGE("Can't create instance of Display HAL, nullptr");
|
||||
}
|
||||
joinRpcThreadpool();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
service vendor.parts-hal /vendor/bin/hw/vendor.eureka.hardware.parts@1.0-service
|
||||
interface vendor.eureka.hardware.parts@1.0::IBattery default
|
||||
interface vendor.eureka.hardware.parts@1.0::IGpu default
|
||||
interface vendor.eureka.hardware.parts@1.0::IFlashLight default
|
||||
interface vendor.eureka.hardware.parts@1.0::ISELinux default
|
||||
interface vendor.eureka.hardware.parts@1.0::IBatteryStats default
|
||||
interface vendor.eureka.hardware.parts@1.0::IDisplayConfigs default
|
||||
interface vendor.eureka.hardware.parts@1.0::IFlashBrightness default
|
||||
class hal
|
||||
user root
|
||||
group root
|
||||
|
|
|
|||
|
|
@ -4,19 +4,15 @@
|
|||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IBattery</name>
|
||||
<name>IBatteryStats</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IFlashLight</name>
|
||||
<name>IFlashBrightness</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IGpu</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>ISELinux</name>
|
||||
<name>IDisplayConfigs</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ enum SysfsType : int32_t {
|
|||
CHARGE,
|
||||
};
|
||||
|
||||
enum Display : int32_t {
|
||||
DOUBLE_TAP,
|
||||
GLOVE_MODE,
|
||||
};
|
||||
|
||||
enum Number : int32_t {
|
||||
ENABLE = 1,
|
||||
DISABLE = 0,
|
||||
|
|
|
|||
|
|
@ -21,11 +21,6 @@ allow hal_parts_default sysfs_flashlight:file { read open write getattr };
|
|||
allow hal_parts_default sysfs_flashlight:dir search;
|
||||
allow hal_parts_default sysfs_virtual:dir search;
|
||||
|
||||
# GPU
|
||||
allow hal_parts_default sysfs_gpu_tmu:file { read open write getattr };
|
||||
allow hal_parts_default sysfs_gpu_tmu:dir search;
|
||||
|
||||
# SELinux
|
||||
allow hal_parts_default selinuxfs:file rw_file_perms;
|
||||
allow hal_parts_default selinuxfs:dir search;
|
||||
|
||||
# Display
|
||||
allow hal_parts_default sysfs_sec_touchscreen:dir search;
|
||||
allow hal_parts_default sysfs_touchscreen_writable:file rw_file_perms;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,9 @@ vendor.samsung.hardware.radio.channel::ISehChannel u:object_r:rild_hwse
|
|||
vendor.lineage.power::ILineagePower u:object_r:hal_power_hwservice:s0
|
||||
|
||||
# SamsungParts
|
||||
vendor.eureka.hardware.parts::IBattery u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::IFlashLight u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::IGpu u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::ISELinux u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::IBatteryStats u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::IFlashBrightness u:object_r:hal_parts_hwservice:s0
|
||||
vendor.eureka.hardware.parts::IDisplayConfigs u:object_r:hal_parts_hwservice:s0
|
||||
|
||||
# FMRadio
|
||||
vendor.eureka.hardware.fmradio::IFMRadio u:object_r:hal_fmradio_hwservice:s0
|
||||
|
|
|
|||
Loading…
Reference in a new issue