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

Commit eebd4407 authored by Angela Wang's avatar Angela Wang
Browse files

Register callback again after service is connected

The exception is thrown when trying to unregister a not-registered callback. This may happen when after rebooting the device, the proxy is not attached to the service while registerCallback() is called in onResume(). The callback will not be correctly registered and hence causing this exception when unregisterCallback() is called in onPause().

Add listener to listen the onServiceConnected() callback and re-register
the callback if the service is not connected when user enters to the
page.

Bug: 330116041
Test: manually test the scenario and confirm no exception thrown
Change-Id: I1f99d067e28e285bcbfff1f34bd322cdbac8063a
parent 9ab22c28
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment