Show DialpadChooser correctly.
We need to make DialpadFragment to handle a new Intent
via onNewIntent(). The code was once removed in
I3b2f95b0d34e89bb9665b2014048a634d29e54ce because of possible
NPE. This time we avoid it by just using "if" clause.
Set DialpadChooserAdapter anytime when it is required. Now
Fragment can be reused with onCreateView() (when users' swipe
action), at which the adapter can be available though
the chooser view is recreated.
Modify DialpadFragment#resolveIntent() so that it is
easier to understand. Rename it to configureScreenFromIntent(),
since it is only about its screen state now.
Remove some logic around dial uri handling. Now DialpadFragment
gets the uri directly from Intent instead of parent Activity, so
there's no need to keep it inside DialtactsActivity.
TESTED:
- Launch "Phone" with no calls active
- Make a call, press the "Add call" button from the in-call UI
- Make a call, bail out of the in-call UI without ending the
call, launch "Phone" from the home screen. Play with swipe,
exiting dialpad chooser screen several times
- Launch "Phone" from the other app with a phone number Uri
Bug: 5087992
Bug: 4983278
Change-Id: I5fd687daccf15f632219925a4846019594beec0a
3 files changed