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

Commit 1cc13693 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4395235 from e37c6aab to pi-release

Change-Id: Iae692b75d2ce2ff487a96367845b7952f6bb5859
parents 9dfa5f52 e37c6aab
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -1365,7 +1365,8 @@ void update_out_oat_access_times(const char* apk_path, const char* out_oat_path)
// If this is for a profile guided compilation, profile_was_updated will tell whether or not
// the profile has changed.
static void exec_dexoptanalyzer(const std::string& dex_file, const std::string& instruction_set,
        const std::string& compiler_filter, bool profile_was_updated, bool downgrade) {
        const std::string& compiler_filter, bool profile_was_updated, bool downgrade,
        const char* class_loader_context) {
    const char* dexoptanalyzer_bin =
            is_debug_runtime()
                    ? "/system/bin/dexoptanalyzerd"
@@ -1383,11 +1384,16 @@ static void exec_dexoptanalyzer(const std::string& dex_file, const std::string&
    std::string compiler_filter_arg = "--compiler-filter=" + compiler_filter;
    const char* assume_profile_changed = "--assume-profile-changed";
    const char* downgrade_flag = "--downgrade";
    std::string class_loader_context_arg = "--class-loader-context=";
    if (class_loader_context != nullptr) {
        class_loader_context_arg += class_loader_context;
    }

    // program name, dex file, isa, filter, the final NULL
    const int argc = 5 +
        (profile_was_updated ? 1 : 0) +
        (downgrade ? 1 : 0);
        (downgrade ? 1 : 0) +
        (class_loader_context != nullptr ? 1 : 0);
    const char* argv[argc];
    int i = 0;
    argv[i++] = dexoptanalyzer_bin;
@@ -1400,6 +1406,9 @@ static void exec_dexoptanalyzer(const std::string& dex_file, const std::string&
    if (downgrade) {
        argv[i++] = downgrade_flag;
    }
    if (class_loader_context != nullptr) {
        argv[i++] = class_loader_context;
    }
    argv[i] = NULL;

    execv(dexoptanalyzer_bin, (char * const *)argv);
@@ -1480,7 +1489,8 @@ static bool process_dexoptanalyzer_result(const std::string& dex_path, int resul
static bool process_secondary_dex_dexopt(const char* original_dex_path, const char* pkgname,
        int dexopt_flags, const char* volume_uuid, int uid, const char* instruction_set,
        const char* compiler_filter, bool* is_public_out, int* dexopt_needed_out,
        std::string* oat_dir_out, std::string* dex_path_out, bool downgrade) {
        std::string* oat_dir_out, std::string* dex_path_out, bool downgrade,
        const char* class_loader_context) {
    int storage_flag;

    if ((dexopt_flags & DEXOPT_STORAGE_CE) != 0) {
@@ -1550,7 +1560,7 @@ static bool process_secondary_dex_dexopt(const char* original_dex_path, const ch
        drop_capabilities(uid);
        // Run dexoptanalyzer to get dexopt_needed code.
        exec_dexoptanalyzer(dex_path, instruction_set, compiler_filter, profile_was_updated,
                            downgrade);
                            downgrade, class_loader_context);
        exit(DEXOPTANALYZER_BIN_EXEC_ERROR);
    }

@@ -1606,8 +1616,7 @@ int dexopt(const char* dex_path, uid_t uid, const char* pkgname, const char* ins
    if (is_secondary_dex) {
        if (process_secondary_dex_dexopt(dex_path, pkgname, dexopt_flags, volume_uuid, uid,
                instruction_set, compiler_filter, &is_public, &dexopt_needed, &oat_dir_str,
                &dex_real_path,
                downgrade)) {
                &dex_real_path, downgrade, class_loader_context)) {
            oat_dir = oat_dir_str.c_str();
            dex_path = dex_real_path.c_str();
            if (dexopt_needed == NO_DEXOPT_NEEDED) {
+5 −5
Original line number Diff line number Diff line
@@ -6630,7 +6630,7 @@ void TouchInputMapper::assignPointerIds(const RawState* last, RawState* current)
#if DEBUG_POINTER_ASSIGNMENT
    ALOGD("assignPointerIds - initial distance min-heap: size=%d", heapSize);
    for (size_t i = 0; i < heapSize; i++) {
        ALOGD("  heap[%zu]: cur=%d, last=%d, distance=%" PRId64,
        ALOGD("  heap[%zu]: cur=%" PRIu32 ", last=%" PRIu32 ", distance=%" PRIu64,
                i, heap[i].currentPointerIndex, heap[i].lastPointerIndex,
                heap[i].distance);
    }
@@ -6676,7 +6676,7 @@ void TouchInputMapper::assignPointerIds(const RawState* last, RawState* current)
#if DEBUG_POINTER_ASSIGNMENT
                ALOGD("assignPointerIds - reduced distance min-heap: size=%d", heapSize);
                for (size_t i = 0; i < heapSize; i++) {
                    ALOGD("  heap[%zu]: cur=%d, last=%d, distance=%" PRId64,
                    ALOGD("  heap[%zu]: cur=%" PRIu32 ", last=%" PRIu32 ", distance=%" PRIu64,
                            i, heap[i].currentPointerIndex, heap[i].lastPointerIndex,
                            heap[i].distance);
                }
@@ -6702,7 +6702,8 @@ void TouchInputMapper::assignPointerIds(const RawState* last, RawState* current)
            usedIdBits.markBit(id);

#if DEBUG_POINTER_ASSIGNMENT
            ALOGD("assignPointerIds - matched: cur=%d, last=%d, id=%d, distance=%" PRId64,
            ALOGD("assignPointerIds - matched: cur=%" PRIu32 ", last=%" PRIu32
                    ", id=%" PRIu32 ", distance=%" PRIu64,
                    lastPointerIndex, currentPointerIndex, id, heap[0].distance);
#endif
            break;
@@ -6720,8 +6721,7 @@ void TouchInputMapper::assignPointerIds(const RawState* last, RawState* current)
                current->rawPointerData.isHovering(currentPointerIndex));

#if DEBUG_POINTER_ASSIGNMENT
        ALOGD("assignPointerIds - assigned: cur=%d, id=%d",
                currentPointerIndex, id);
        ALOGD("assignPointerIds - assigned: cur=%" PRIu32 ", id=%" PRIu32, currentPointerIndex, id);
#endif
    }
}