Initialize booleans

Since mMonitorCreated wasnt initialized to false, join was called
on the thread eventhough the thread didnt exist.

Bug: 72691300
Test: Booted asan and verified that adb was enabled.
Change-Id: Iafb529b66084fbe196d6c8b10fabd62a5ec8ec4a
This commit is contained in:
Badhri Jagan Sridharan
2018-01-31 00:39:42 -08:00
committed by Ethan Chen
parent 841419065a
commit 0ec677b9ef

View File

@ -164,7 +164,9 @@ static void *monitorFfs(void *param) {
return NULL;
}
UsbGadget::UsbGadget() {
UsbGadget::UsbGadget()
: mMonitorCreated(false),
mCurrentUsbFunctionsApplied(false) {
if (access(OS_DESC_PATH, R_OK) != 0)
ALOGE("configfs setup not done yet");
}