mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-21 19:55:33 -04:00
universal7885: interfaces: Forgot to rename package name
* Also, fix errors Change-Id: Iafa0a6f6c34c9b13aff464765ef00cffbc6330dd Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
45e292f408
commit
0885f01f81
12 changed files with 22 additions and 19 deletions
|
|
@ -2,7 +2,7 @@
|
|||
#include <hidl/HidlSupport.h>
|
||||
#include <hidl/LegacySupport.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IFlashlight.h>
|
||||
#include <vendor/eureka/hardware/parts/1.0/IFlashLight.h>
|
||||
#include "jni.h"
|
||||
|
||||
using android::sp;
|
||||
|
|
@ -13,7 +13,7 @@ using vendor::eureka::hardware::parts::V1_0::Number;
|
|||
|
||||
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();
|
||||
android::sp<IFlashLight> service = IFlashLight::getService();
|
||||
service->setFlashlightEnable(Number::ENABLE);
|
||||
switch (value) {
|
||||
case 1:
|
||||
|
|
@ -52,7 +52,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_eurekateam_samsungextras_interfaces_F
|
|||
}
|
||||
extern "C" JNIEXPORT jint JNICALL Java_com_eurekateam_samsungextras_interfaces_Flashlight_getFlash(
|
||||
JNIEnv* env, jobject clazz, jint isA10) {
|
||||
android::sp<IFlashlight> service = IFlashLight::getService();
|
||||
android::sp<IFlashLight> service = IFlashLight::getService();
|
||||
int ret;
|
||||
if (isA10 == 1) {
|
||||
ret = service->readFlashlightstats(Device::A10);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "jni.h"
|
||||
|
||||
using android::sp;
|
||||
using vendor::eureka::hardware::parts::V1_0::Enable;
|
||||
using vendor::eureka::hardware::parts::V1_0::Number;
|
||||
using vendor::eureka::hardware::parts::V1_0::IGpu;
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package vendor.eureka.hardware.battery@1.0;
|
||||
package vendor.eureka.hardware.parts@1.0;
|
||||
|
||||
interface IBattery {
|
||||
getBatteryStats(SysfsType stats) generates (int32_t result);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
package vendor.eureka.hardware.parts@1.0;
|
||||
|
||||
interface IFlashlight {
|
||||
interface IFlashLight {
|
||||
setFlashlightWritable(Value value) generates (int32_t result);
|
||||
setFlashlightEnable(Number enable) generates (int32_t result);
|
||||
readFlashlightstats(Device device) generates (int32_t value);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package vendor.eureka.hardware.gpu@1.0;
|
||||
package vendor.eureka.hardware.parts@1.0;
|
||||
|
||||
interface IGpu {
|
||||
setGpuWritable(Number enable) generates (int32_t result);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package vendor.eureka.security.selinux@1.0;
|
||||
package vendor.eureka.hardware.parts@1.0;
|
||||
|
||||
interface ISELinux {
|
||||
setSELinuxWritable(Number enable) generates (int32_t result);
|
||||
|
|
|
|||
|
|
@ -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> IBattery::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<int32_t> IBattery::setBatteryWritable(parts::V1_0::SysfsType stats,
|
||||
parts::V1_0::Number value) {
|
||||
std::ofstream file;
|
||||
std::string filename;
|
||||
|
|
|
|||
|
|
@ -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<int32_t> IFlashLight::setFlashlightEnable(parts::V1_0::Number enable) {
|
||||
std::ofstream file;
|
||||
std::string writevalue;
|
||||
switch (enable) {
|
||||
|
|
@ -39,7 +39,7 @@ Return<int32_t> FlashLight::setFlashlightEnable(parts::V1_0::Number enable) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
Return<int32_t> FlashLight::setFlashlightWritable(parts::V1_0::Value value) {
|
||||
Return<int32_t> IFlashLight::setFlashlightWritable(parts::V1_0::Value value) {
|
||||
std::ofstream file;
|
||||
std::string writevalue;
|
||||
switch (value) {
|
||||
|
|
@ -83,7 +83,7 @@ Return<int32_t> FlashLight::setFlashlightWritable(parts::V1_0::Value value) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
Return<int32_t> FlashLight::readFlashlightstats(parts::V1_0::Device device) {
|
||||
Return<int32_t> IFlashLight::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) {
|
||||
IFlashLight* FlashLight::getInstance(void) {
|
||||
return new FlashLight();
|
||||
}
|
||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <sstream>
|
||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||
|
||||
Return<int32_t> Gpu::setGpuWritable(parts::V1_0::Number enable) {
|
||||
Return<int32_t> IGpu::setGpuWritable(parts::V1_0::Number enable) {
|
||||
std::ofstream file;
|
||||
std::string writevalue;
|
||||
if (enable == Number::ENABLE) {
|
||||
|
|
@ -32,7 +32,7 @@ Return<int32_t> Gpu::setGpuWritable(parts::V1_0::Number enable) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
Return<int32_t> Gpu::readGpustats(void) {
|
||||
Return<int32_t> IGpu::readGpustats(void) {
|
||||
std::ifstream file;
|
||||
std::string value;
|
||||
int32_t intvalue;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
#include <sstream>
|
||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||
|
||||
Return<int32_t> SELinux::setSELinuxWritable(parts::V1_0::Number enable) {
|
||||
Return<int32_t> ISELinux::setSELinuxWritable(parts::V1_0::Number enable) {
|
||||
std::ofstream file;
|
||||
std::string writevalue;
|
||||
if (enable == Number::ENABLE) {
|
||||
|
|
@ -32,7 +32,7 @@ Return<int32_t> SELinux::setSELinuxWritable(parts::V1_0::Number enable) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
Return<int32_t> SELinux::readSELinuxstats(void) {
|
||||
Return<int32_t> ISELinux::readSELinuxstats(void) {
|
||||
std::ifstream file;
|
||||
std::string value;
|
||||
int32_t intvalue;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ using ::android::hardware::Void;
|
|||
|
||||
struct SELinux : public ISELinux {
|
||||
// Methods from ::vendor::eureka::hardware::parts::V1_0::ISELinux follow.
|
||||
Return<int32_t> setSELinuxWritable(Enable enable);
|
||||
Return<int32_t> setSELinuxWritable(Number enable);
|
||||
Return<int32_t> readSELinuxstats(void);
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
static ISELinux* getInstance(void);
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
#include <hidl/LegacySupport.h>
|
||||
|
||||
#include "Battery.h"
|
||||
#include "FlashLight.h"
|
||||
#include "Gpu.h"
|
||||
#include "SELinux.h"
|
||||
|
||||
using android::sp;
|
||||
using android::hardware::configureRpcThreadpool;
|
||||
|
|
|
|||
Loading…
Reference in a new issue