Skip to content
Commit 166f2569 authored by Yury Kotlyarov's avatar Yury Kotlyarov Committed by Pavel Maltsev
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
Bug: 143653311

Change-Id: I86c10b577dbab8cad2d5f7e19805511a93bcb668
Merged-In: I86c10b577dbab8cad2d5f7e19805511a93bcb668
(cherry-picked from ee7b0a6a)
parent c60e0323
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment