Skip to content
Commit 222ed0fc authored by Badhri Jagan Sridharan's avatar Badhri Jagan Sridharan
Browse files

Check for preexisting flag before enabling the gadget

onRegistration callback gets triggered as soon has the
serviceNotification object is registered with registerForNotifications.
The preexisting flag in the callback is set if the gadget hal service dies
and restarts. Use this to differentiate between the onRegistration call
for the registerForNotifications vs actual gadget hal service restart.
Do not reset usb gadget if the onRegistration callback is called as a
result of registerForNotifications. This will overcome the occasional
reset of the usb gadget hence the connection during phone bootup.

Bug: 118678530
Test: Verified that gadget reset does not happen
Change-Id: I3b94e55289bb3a53eb9e083177fd4d54bec5f4da
parent 2c87f2ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment