Support connecting and disconnecting from Phone app.

Phone app now connects/disconnects from the UI when there are no active
calls but UI did not previously support being disconnected.  This change
adds the following functionality to support dis/reconnection:

- CallCommandClient now supports setting new ICallCommandService
  instances.
- CallCommandClient now checks if mCommandService is null before
  executing a method.
- CallHandlerService performs more careful ordered cleanup with
  destroyed including removing pending messages and clearing any
  existing calls from the call list.
- InCallActivity now performs tearDown of the presenters with onDestroy
  instead of finish() to reduce NPE instances.
- InCallActivity not notifies InCallPresenter when is finishes, and not
  just when it starts.
- InCallPresenter tears itself down after two things happen: the UI is
  destroyed and the service is disconnected.
- InCallPresenter now issues a full-screen restart of the UI if the
  UI was previously hidden (except for new outgoing calls). This allows
  the UI to come back to the foreground if it was in the foreground when
  the app went down.

The above changes also now protect against the phone app crashing or the
incall UI crashing.

bug: 10363682
Change-Id: I9b785f906f29015827e8e53e64cd5f5c72cd7981
6 files changed
tree: 2cf417515ed43e271d69b36aa9cab9d1003b006d
  1. InCallUI/