Reland^2 "libutils: disable implicit ref base construction"
This reverts commit 2cb75937925e19c5cc7dccd84906b14d5297cf0a.
Reason for revert: reland after fixing b/186468053
Bug: 184190315
Change-Id: I2a46b7a8148db444f9bd4b24746f64217cbba947
diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp
index 540dcf4..1c8f810 100644
--- a/libutils/Threads.cpp
+++ b/libutils/Threads.cpp
@@ -693,7 +693,7 @@
mThread = thread_id_t(-1);
// hold a strong reference on ourself
- mHoldSelf = this;
+ mHoldSelf = sp<Thread>::fromExisting(this);
mRunning = true;