Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e08bd641 authored by Dan Albert's avatar Dan Albert
Browse files

Allow AOSP to boot.

HAVE_OOM_ADJ is really __linux__, and this code should never be run on
another platform.

Bug: 17641445
Change-Id: Ib8174106b6d03c9c2429794a4f582c09cb308646
parent 6f954cf2
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -348,7 +348,6 @@ jint android_os_Process_getThreadPriority(JNIEnv* env, jobject clazz,
jboolean android_os_Process_setOomAdj(JNIEnv* env, jobject clazz,
                                      jint pid, jint adj)
{
#ifdef HAVE_OOM_ADJ
    char text[64];
    sprintf(text, "/proc/%d/oom_adj", pid);
    int fd = open(text, O_WRONLY);
@@ -358,8 +357,6 @@ jboolean android_os_Process_setOomAdj(JNIEnv* env, jobject clazz,
        close(fd);
    }
    return true;
#endif
    return false;
}

jboolean android_os_Process_setSwappiness(JNIEnv *env, jobject clazz,