]> nv-tegra.nvidia Code Review - android/platform/packages/apps/Phone.git/commit
First pass at "respond via SMS" UI for incoming calls
authorDavid Brown <dab@google.com>
Thu, 16 Jun 2011 02:20:36 +0000 (19:20 -0700)
committerDavid Brown <dab@google.com>
Tue, 21 Jun 2011 05:37:47 +0000 (22:37 -0700)
commit9e25b785cc7edae682144536f58080edb3a374e4
tree97df5a4f15b962803e01b51f1da96f552889cc90
parenta232063e9bb9f7b8875a24af212287ba0d2cd0c3
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
AndroidManifest.xml
res/layout/incall_touch_ui.xml
res/menu/respond_via_sms.xml [new file with mode: 0644]
res/values/ids.xml
src/com/android/phone/InCallScreen.java
src/com/android/phone/InCallTouchUi.java
src/com/android/phone/RespondViaSms.java [new file with mode: 0644]