First pass at "respond via SMS" UI for incoming calls
Here's an initial ultra-simple implementation of the "respond via SMS"
feature. The exact UX design and product requirements haven't been
thought through fully yet, so this change implements just the most basic
functionality in order for droidfooders to start trying it (and
hopefully help shake out the rest of the requirements for this feature.)
In this change:
- Handle the SEND_SMS_ID trigger from the MultiWaveView widget by
bringing up a popup menu of "respond via SMS" actions.
- The actions contain a few canned responses, along with a "Custom
message..." item. The canned responses are non-customizable for now
(see the <menu> in respond_via_sms.xml). The "Custom" item brings up
the regular SMS compose UI.
- Almost all of this implementation is found in the new file
RespondViaSms.java. That contains a PopupMenu subclass to display the
choices, a class called RespondViaSmsClickListener that handles the
various actions, and a static method called showRespondViaSmsPopup()
that starts the whole sequence.
- Code cleanup in a few places
Still-open design issues:
- Allow user to manage or customize the canned messages?
- For the "Custom..." choice, is it OK to make the user unlock their
device right at that point?
- When you first select the "SMS" choice from the MultiWaveView
widget, exactly what do we do with the incoming call? reject it?
just silence the ringer? Do nothing till you've actually picked one
of the choices from the popup menu?
- What happens if the user dismisses the popup by tapping outside the
menu or pressing Back? Bring back the MultiWaveView widget? Restart
the ringer too? Or just dismiss the whole incoming call screen?
(Also, should the popup menu have an explicit "Cancel" choice?)
- All visual design and exact layout in this change is provisional
Known missing pieces / bugs with this change (besides the above):
- We're sending texts using the old SmsManager.sendTextMessage() API,
but we should switch to the new SENDTO_NO_CONFIRMATION intent once
change https://android-git.corp.google.com/g/114664 gets checked in.
- Need to disable the "respond via SMS" option entirely in a few cases
(see TODO in showIncomingCallWidget())
- Some bad interaction with the non-secure keyguard when using "Custom
message..." (see TODO in launchSmsCompose())
Bug:
4598484
Change-Id: Id7ebd25dfc7d62cfac16ecc077d7e9f059b807db