Skip to content
Commit ee7b0a6a authored by Yury Kotlyarov's avatar Yury Kotlyarov
Browse files

Fix LocalOnlyHotspotReservation double stop of local hotspot.

If user executed startLocalOnlyHotspot(), then reservation.close()
garbage collector still keeps reservation object until drain.
If user executed startLocalOnlyHotspot second time during
application life cycle, garbage collector can delete previously
allocated reservation object. In this case finalize() of old
reservation object will be executed, then close(), then
stopLocalOnlyHotspot(). As result, new started LocalOnlyHostpot
can be immediatly stopped by old reservation object delete.
Steps to reproduce: execute startLocalOnlyHostpot() and
reservation.close() multiple times during application life cycle,
check if hotspot up couple of seconds after start.
This fix prevents stopping of local hotspot if reservation
was previously closed.
Test: manual

Bug: 139074896
Change-Id: I86c10b577dbab8cad2d5f7e19805511a93bcb668
parent f0723588
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