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

Commit 3d10bd61 authored by Rohit Gupta's avatar Rohit Gupta Committed by Linux Build Service Account
Browse files

frameworks/base: update perflock path name in Activity Trigger

Update the perflock path name and add
backup path for backward compatibility

Change-Id: I3d2c6f6fe1b3c63ec02827d06d5af667266db8d5
(cherry picked from commit 4db57e5021c4091352f40f6e4399b0b929f63151)
(cherry picked from commit b9fc7b99697a1b2f891dc642ff27c8a4194ca79d)
(cherry picked from commit 5910b639f0dea078049e31718e00bede2eb2ec00)
parent a8c56204
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -39,7 +39,8 @@
#include <cutils/properties.h>
#include <utils/Log.h>

#define LIBRARY_PATH_PREFIX	"/system/lib/"
#define LIBRARY_PATH_PREFIX_OLD	"/system/lib/"
#define LIBRARY_PATH_PREFIX "/vendor/lib/"

namespace android
{
@@ -67,7 +68,9 @@ com_android_internal_app_ActivityTrigger_native_at_init()

    /* Sanity check - ensure */
    buf[PROPERTY_VALUE_MAX-1] = '\0';
    if ((strncmp(buf, LIBRARY_PATH_PREFIX, sizeof(LIBRARY_PATH_PREFIX) - 1) != 0)
    if (((strncmp(buf, LIBRARY_PATH_PREFIX, sizeof(LIBRARY_PATH_PREFIX) - 1) != 0)
	&&
	(strncmp(buf, LIBRARY_PATH_PREFIX_OLD, sizeof(LIBRARY_PATH_PREFIX_OLD) - 1) != 0))
        ||
        (strstr(buf, "..") != NULL)) {
        return;