libhwbinder: fix using destroyed mutex warning.
Bug: 77473515
Test: Boot device successfully.
Change-Id: I729c74f76a289cbece1a443dc801ec1af090582a
diff --git a/Static.cpp b/Static.cpp
index c63e503..a84f811 100644
--- a/Static.cpp
+++ b/Static.cpp
@@ -73,7 +73,7 @@
// ------------ ProcessState.cpp
-Mutex gProcessMutex;
+Mutex& gProcessMutex = *new Mutex;
sp<ProcessState> gProcess;
class LibHwbinderIPCtStatics
diff --git a/include/hwbinder/Static.h b/include/hwbinder/Static.h
index 99821ca..4b84c89 100644
--- a/include/hwbinder/Static.h
+++ b/include/hwbinder/Static.h
@@ -29,7 +29,7 @@
extern Vector<int32_t> gTextBuffers;
// For ProcessState.cpp
-extern Mutex gProcessMutex;
+extern Mutex& gProcessMutex;
extern sp<ProcessState> gProcess;
} // namespace hardware