mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-23 12:35: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/HidlSupport.h>
|
||||||
#include <hidl/LegacySupport.h>
|
#include <hidl/LegacySupport.h>
|
||||||
#include <hidl/Status.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"
|
#include "jni.h"
|
||||||
|
|
||||||
using android::sp;
|
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(
|
extern "C" JNIEXPORT void JNICALL Java_com_eurekateam_samsungextras_interfaces_Flashlight_setFlash(
|
||||||
JNIEnv* env, __unused jobject obj, jint value) {
|
JNIEnv* env, __unused jobject obj, jint value) {
|
||||||
android::sp<IFlashlight> service = IFlashLight::getService();
|
android::sp<IFlashLight> service = IFlashLight::getService();
|
||||||
service->setFlashlightEnable(Number::ENABLE);
|
service->setFlashlightEnable(Number::ENABLE);
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 1:
|
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(
|
extern "C" JNIEXPORT jint JNICALL Java_com_eurekateam_samsungextras_interfaces_Flashlight_getFlash(
|
||||||
JNIEnv* env, jobject clazz, jint isA10) {
|
JNIEnv* env, jobject clazz, jint isA10) {
|
||||||
android::sp<IFlashlight> service = IFlashLight::getService();
|
android::sp<IFlashLight> service = IFlashLight::getService();
|
||||||
int ret;
|
int ret;
|
||||||
if (isA10 == 1) {
|
if (isA10 == 1) {
|
||||||
ret = service->readFlashlightstats(Device::A10);
|
ret = service->readFlashlightstats(Device::A10);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include "jni.h"
|
#include "jni.h"
|
||||||
|
|
||||||
using android::sp;
|
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;
|
using vendor::eureka::hardware::parts::V1_0::IGpu;
|
||||||
|
|
||||||
extern "C" JNIEXPORT void JNICALL
|
extern "C" JNIEXPORT void JNICALL
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package vendor.eureka.hardware.battery@1.0;
|
package vendor.eureka.hardware.parts@1.0;
|
||||||
|
|
||||||
interface IBattery {
|
interface IBattery {
|
||||||
getBatteryStats(SysfsType stats) generates (int32_t result);
|
getBatteryStats(SysfsType stats) generates (int32_t result);
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
package vendor.eureka.hardware.parts@1.0;
|
package vendor.eureka.hardware.parts@1.0;
|
||||||
|
|
||||||
interface IFlashlight {
|
interface IFlashLight {
|
||||||
setFlashlightWritable(Value value) generates (int32_t result);
|
setFlashlightWritable(Value value) generates (int32_t result);
|
||||||
setFlashlightEnable(Number enable) generates (int32_t result);
|
setFlashlightEnable(Number enable) generates (int32_t result);
|
||||||
readFlashlightstats(Device device) generates (int32_t value);
|
readFlashlightstats(Device device) generates (int32_t value);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package vendor.eureka.hardware.gpu@1.0;
|
package vendor.eureka.hardware.parts@1.0;
|
||||||
|
|
||||||
interface IGpu {
|
interface IGpu {
|
||||||
setGpuWritable(Number enable) generates (int32_t result);
|
setGpuWritable(Number enable) generates (int32_t result);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package vendor.eureka.security.selinux@1.0;
|
package vendor.eureka.hardware.parts@1.0;
|
||||||
|
|
||||||
interface ISELinux {
|
interface ISELinux {
|
||||||
setSELinuxWritable(Number enable) generates (int32_t result);
|
setSELinuxWritable(Number enable) generates (int32_t result);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||||
|
|
||||||
// Methods from ::android::hardware::battery::V1_0::IBattery follow.
|
// 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::ifstream file;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
switch (stats) {
|
switch (stats) {
|
||||||
|
|
@ -60,7 +60,7 @@ Return<int32_t> Battery::getBatteryStats(parts::V1_0::SysfsType stats) {
|
||||||
return -1;
|
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) {
|
parts::V1_0::Number value) {
|
||||||
std::ofstream file;
|
std::ofstream file;
|
||||||
std::string filename;
|
std::string filename;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
namespace vendor::eureka::hardware::parts::V1_0 {
|
||||||
|
|
||||||
// Methods from ::android::hardware::parts::V1_0::IFlashLight follow.
|
// 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::ofstream file;
|
||||||
std::string writevalue;
|
std::string writevalue;
|
||||||
switch (enable) {
|
switch (enable) {
|
||||||
|
|
@ -39,7 +39,7 @@ Return<int32_t> FlashLight::setFlashlightEnable(parts::V1_0::Number enable) {
|
||||||
return 0;
|
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::ofstream file;
|
||||||
std::string writevalue;
|
std::string writevalue;
|
||||||
switch (value) {
|
switch (value) {
|
||||||
|
|
@ -83,7 +83,7 @@ Return<int32_t> FlashLight::setFlashlightWritable(parts::V1_0::Value value) {
|
||||||
return 0;
|
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::ifstream file;
|
||||||
std::string value;
|
std::string value;
|
||||||
int32_t intvalue;
|
int32_t intvalue;
|
||||||
|
|
@ -104,7 +104,7 @@ Return<int32_t> FlashLight::readFlashlightstats(parts::V1_0::Device device) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
IFlashlight* FlashLight::getInstance(void) {
|
IFlashLight* FlashLight::getInstance(void) {
|
||||||
return new FlashLight();
|
return new FlashLight();
|
||||||
}
|
}
|
||||||
} // namespace vendor::eureka::hardware::parts::V1_0
|
} // namespace vendor::eureka::hardware::parts::V1_0
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
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::ofstream file;
|
||||||
std::string writevalue;
|
std::string writevalue;
|
||||||
if (enable == Number::ENABLE) {
|
if (enable == Number::ENABLE) {
|
||||||
|
|
@ -32,7 +32,7 @@ Return<int32_t> Gpu::setGpuWritable(parts::V1_0::Number enable) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<int32_t> Gpu::readGpustats(void) {
|
Return<int32_t> IGpu::readGpustats(void) {
|
||||||
std::ifstream file;
|
std::ifstream file;
|
||||||
std::string value;
|
std::string value;
|
||||||
int32_t intvalue;
|
int32_t intvalue;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
namespace vendor::eureka::hardware::parts::V1_0 {
|
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::ofstream file;
|
||||||
std::string writevalue;
|
std::string writevalue;
|
||||||
if (enable == Number::ENABLE) {
|
if (enable == Number::ENABLE) {
|
||||||
|
|
@ -32,7 +32,7 @@ Return<int32_t> SELinux::setSELinuxWritable(parts::V1_0::Number enable) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Return<int32_t> SELinux::readSELinuxstats(void) {
|
Return<int32_t> ISELinux::readSELinuxstats(void) {
|
||||||
std::ifstream file;
|
std::ifstream file;
|
||||||
std::string value;
|
std::string value;
|
||||||
int32_t intvalue;
|
int32_t intvalue;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ using ::android::hardware::Void;
|
||||||
|
|
||||||
struct SELinux : public ISELinux {
|
struct SELinux : public ISELinux {
|
||||||
// Methods from ::vendor::eureka::hardware::parts::V1_0::ISELinux follow.
|
// 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);
|
Return<int32_t> readSELinuxstats(void);
|
||||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||||
static ISELinux* getInstance(void);
|
static ISELinux* getInstance(void);
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,9 @@
|
||||||
#include <hidl/LegacySupport.h>
|
#include <hidl/LegacySupport.h>
|
||||||
|
|
||||||
#include "Battery.h"
|
#include "Battery.h"
|
||||||
|
#include "FlashLight.h"
|
||||||
|
#include "Gpu.h"
|
||||||
|
#include "SELinux.h"
|
||||||
|
|
||||||
using android::sp;
|
using android::sp;
|
||||||
using android::hardware::configureRpcThreadpool;
|
using android::hardware::configureRpcThreadpool;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue