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

Skip to content
Commit 28b82f0f authored by Hall Liu's avatar Hall Liu
Browse files

Fix broken test and in-call controller bug

1. testBindToService_DefaultDialer_FallBackToSystem was broken because
InCallController#onConnected returned false due to an empty list of
calls in the mock CallsManager. Added a return stub to prevent this.

2. If an incoming call disconnects remotely before onServiceConnected is
called, no services will be bound to InCallController, but
InCallController will also not attempt to bind to an InCallService for
future calls. This is because the failure case in
InCallServiceBindingConnection#onConnected calls disconnect() directly,
not setting mInCallServiceConnection to null. This means that
isBoundToServices will continue to return true, so bindToServices will
never be called again until something else calls unbindFromServices.
Fix was to not disconnect if no calls are found when onServiceConnected
is called.

3. A test was added to test the fix in #2.

Change-Id: I95caba2e3169be33d89424269a09b3ad292be3de
Fix: 28743971
parent e9c331b8
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