Launch incoming call UI via notification, not with startActivity()

This is step 2 toward the new notification-based incoming call UI, which
will allow for special behavior if a call comes in while a
non-interruptable ("immersive") activity is in the foreground.

Previously, we'd explicitly call PhoneApp.displayCallScreen() as the very
last step of the "incoming call" sequence in CallNotifier.java.  Now, we
instead post a notification that includes a "fullScreenIntent" field,
which the framework will automagically launch as long as we're *not* in
the middle of an immersive activity.

(Note that we specify a non-null fullScreenIntent only while the phone is
ringing, so the regular "ongoing call" notification is unchanged.  We also
set the notification's FLAG_HIGH_PRIORITY bit if the phone is ringing.)

Next: implement UI for the case where we *are* in an immersive activity.

Other refactoring/cleanup in this change:

- Replaced PhoneUtils.showIncomingCallUi() with the new
  CallNotifier.showIncomingCall() method.  The functionality is the same
  *except* that the new version puts up a notification instead of
  explicitly calling startActivity() to bring up the InCallScreen.

  (I moved the code from PhoneUtils to CallNotifier since it's only ever
  called from CallNotifier methods.)

- Update NotificationMgr to use the new stat_sys_phone_call_ringing
  resource for the "incoming call" notification.  (That's still a
  placeholder icon, though.)

- Remove the totally obsolete PhoneApp.handleInCallOrRinging() method

Tested: incoming calls in both immersive and non-immersive activities.
  (Note that there's currently no way to actually *answer* the call if
  you're in an immersive activity, though.)

Bug: 2768760

Change-Id: If33a64d7c2fba3a4eb1ecab7db8f03f7593ca5c5
5 files changed