Fix two animations when using Connection.setInitialized

STATE_NEW has no meaning within InCallUI and can confuse
the internal logic. Treat it as STATE_CONNECTING for purposes
of state tracking.

Also, track whether the activity is visible rather than
whether it is the foreground activity (by tracking onStart/onStop
vs onResume/onPause). This fixes some unexpected UI transitions
when a dialog (e.g. wifi-calling dialog) shows up over the InCallUI.

Bug: 19217176
Change-Id: Ifa5953e27aa4ed777ed8798c628df1bdc96ed1eb
3 files changed
tree: fb6e09c629c62777b631cd0d0a62b94d22df3610
  1. InCallUI/