Initialize booleans

(Cherry-pick of cb840d8de7)

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
Merged-In: Iafb529b66084fbe196d6c8b10fabd62a5ec8ec4a
This commit is contained in:
Badhri Jagan Sridharan
2018-01-31 00:39:42 -08:00
parent 03a16f98d6
commit 6833d7ec02

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");
}