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

Commit 602de16c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use current thread for SetTaskProfiles" into main

parents 98f80351 c96f37a5
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -28,13 +28,8 @@ namespace input_flags = com::android::input::flags;
namespace {

bool applyInputEventProfile() {
#if defined(__ANDROID__)
    return SetTaskProfiles(gettid(), {"InputPolicy"});
#else
    // Since thread information (gettid()) is not available and there's no benefit of
    // applying the task profile on host, return directly.
    return true;
#endif
    static constexpr pid_t CURRENT_THREAD = 0;
    return SetTaskProfiles(CURRENT_THREAD, {"InputPolicy"});
}

class JvmAttacher {