Detach pollThread only if it is joinable

sensor HAL is not required for Android TV. Hence, ISensors returned
from getService() was null and pollThread was not associated with
any thread of execution.

Bug: 120910004
Test: run vts -m VtsHalSensorsV1_0Target
Change-Id: If16af7313ff7bb22e5ca16c03a0fee0b8d733335
diff --git a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
index c18eedd..098a24f 100644
--- a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
+++ b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
@@ -105,7 +105,9 @@
     if (stopThread) {
         *stopThread = true;
     }
-    pollThread.detach();
+    if (pollThread.joinable()) {
+        pollThread.detach();
+    }
 }
 
 void SensorsHidlEnvironment::resetHal() {