(OpenDingux) Don't build in code that we don't need for Dingux
This commit is contained in:
parent
83a5859b18
commit
fdfc4dda08
|
@ -668,8 +668,7 @@ static void frontend_android_shutdown(bool unused)
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#elif !defined(DINGUX)
|
||||||
|
|
||||||
static bool make_proc_acpi_key_val(char **_ptr, char **_key, char **_val)
|
static bool make_proc_acpi_key_val(char **_ptr, char **_key, char **_val)
|
||||||
{
|
{
|
||||||
char *ptr = *_ptr;
|
char *ptr = *_ptr;
|
||||||
|
@ -818,7 +817,6 @@ end:
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
buf_info = NULL;
|
buf_info = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_proc_acpi_sysfs_battery(const char *node,
|
static void check_proc_acpi_sysfs_battery(const char *node,
|
||||||
bool *have_battery, bool *charging,
|
bool *have_battery, bool *charging,
|
||||||
int *seconds, int *percent)
|
int *seconds, int *percent)
|
||||||
|
@ -1180,14 +1178,13 @@ static enum frontend_powerstate frontend_unix_get_powerstate(
|
||||||
int *seconds, int *percent)
|
int *seconds, int *percent)
|
||||||
{
|
{
|
||||||
enum frontend_powerstate ret = FRONTEND_POWERSTATE_NONE;
|
enum frontend_powerstate ret = FRONTEND_POWERSTATE_NONE;
|
||||||
|
|
||||||
#if defined(ANDROID)
|
#if defined(ANDROID)
|
||||||
jint powerstate = ret;
|
jint powerstate = FRONTEND_POWERSTATE_NONE;
|
||||||
jint battery_level = 0;
|
jint battery_level = 0;
|
||||||
JNIEnv *env = jni_thread_getenv();
|
JNIEnv *env = jni_thread_getenv();
|
||||||
|
|
||||||
if (!env || !g_android)
|
if (!env || !g_android)
|
||||||
return ret;
|
return FRONTEND_POWERSTATE_NONE;
|
||||||
|
|
||||||
if (g_android->getPowerstate)
|
if (g_android->getPowerstate)
|
||||||
CALL_INT_METHOD(env, powerstate,
|
CALL_INT_METHOD(env, powerstate,
|
||||||
|
|
Loading…
Reference in New Issue