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
Loading
Please register or sign in to comment