Move applyInputEventProfile to cpp file

This is an implementation detail, so it doesn't need to be exposed in
the header file at all.

Bug: 330719044
Flag: EXEMPT refactor
Test: none
Change-Id: I54b0bac26f1a3a77a2b5c5a43a3d3e7f5a42a20d
diff --git a/services/inputflinger/InputThread.cpp b/services/inputflinger/InputThread.cpp
index bd4b192..7cf4e39 100644
--- a/services/inputflinger/InputThread.cpp
+++ b/services/inputflinger/InputThread.cpp
@@ -26,6 +26,16 @@
 
 namespace {
 
+bool applyInputEventProfile(const Thread& thread) {
+#if defined(__ANDROID__)
+    return SetTaskProfiles(thread.getTid(), {"InputPolicy"});
+#else
+    // Since thread information is not available and there's no benefit of
+    // applying the task profile on host, return directly.
+    return true;
+#endif
+}
+
 // Implementation of Thread from libutils.
 class InputThreadImpl : public Thread {
 public:
@@ -47,11 +57,11 @@
 
 InputThread::InputThread(std::string name, std::function<void()> loop, std::function<void()> wake,
                          bool isInCriticalPath)
-      : mName(name), mThreadWake(wake) {
+      : mThreadWake(wake) {
     mThread = sp<InputThreadImpl>::make(loop);
-    mThread->run(mName.c_str(), ANDROID_PRIORITY_URGENT_DISPLAY);
+    mThread->run(name.c_str(), ANDROID_PRIORITY_URGENT_DISPLAY);
     if (input_flags::enable_input_policy_profile() && isInCriticalPath) {
-        if (!applyInputEventProfile()) {
+        if (!applyInputEventProfile(*mThread)) {
             LOG(ERROR) << "Couldn't apply input policy profile for " << name;
         }
     }
@@ -75,14 +85,4 @@
 #endif
 }
 
-bool InputThread::applyInputEventProfile() {
-#if defined(__ANDROID__)
-    return SetTaskProfiles(mThread->getTid(), {"InputPolicy"});
-#else
-    // Since thread information is not available and there's no benefit of
-    // applying the task profile on host, return directly.
-    return true;
-#endif
-}
-
 } // namespace android