Revert "AudioFlinger: Boost priority on a separate thread"

This reverts commit c00c06b45256fd61a192ae5355c6f4666e9e70f5.

Reason for revert: Different solution landed for b/297322674
that avoids using an external service.

Change-Id: I761188ec2744802817c633e9267a6b3f8a19d37a
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index c4b41fd..df0b576 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -85,7 +85,6 @@
 #include <utils/Trace.h>
 
 #include <fcntl.h>
-#include <future>
 #include <linux/futex.h>
 #include <math.h>
 #include <memory>
@@ -3900,25 +3899,15 @@
 {
     aflog::setThreadWriter(mNBLogWriter.get());
 
-    std::future<void> priorityBoostFuture; // joined on dtor; this is a one-shot boost.
     if (mType == SPATIALIZER) {
         const pid_t tid = getTid();
         if (tid == -1) {  // odd: we are here, we must be a running thread.
             ALOGW("%s: Cannot update Spatializer mixer thread priority, no tid", __func__);
         } else {
-            // We launch the priority boost request in a separate thread because
-            // the SchedulingPolicyService may not be available during early
-            // boot time, with a wait causing boot delay.
-            // There is also a PrioConfigEvent that does this, but it will also
-            // block other config events.  This command should be able
-            // to run concurrent with other stream commands.
-            priorityBoostFuture = std::async(std::launch::async,
-                    [tid, output_sp = stream()]() {
-                const int priorityBoost = requestSpatializerPriority(getpid(), tid);
-                if (priorityBoost > 0) {
-                    output_sp->setHalThreadPriority(priorityBoost);
-                }
-            });
+            const int priorityBoost = requestSpatializerPriority(getpid(), tid);
+            if (priorityBoost > 0) {
+                stream()->setHalThreadPriority(priorityBoost);
+            }
         }
     }