Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 391ef4c3 authored by Jordan Liu's avatar Jordan Liu
Browse files

Only unbind if bind() returned success

ServiceConnection may become disconnected asynchonously for various
reasons so calling unbind() on a disconnected SC is actually handled by
the framework. What we don't want to do is call unbind() on a service
which we never successfully called bindService() on, so in this CL we
will track the client-side binding instead of the connection status
through callbacks. This is less racy and handles the root cause of the
exception.

Bug: 145661922
Test: testUnbindWhenNotBound
Change-Id: Ia9bd746440faa047523a750afcae84c347de86d6
parent b4217510
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