Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
David Brown
committed
Jun 21, 2011
1 parent
a232063
commit 9e25b78
Showing
7 changed files
with
392 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- Copyright (C) 2011 Google Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<!-- Menu of choices for the "respond via SMS" feature for incoming calls. --> | ||
|
||
<!-- TODO: still need product / UX decision about whether the user will be | ||
allowed to to manage or customize the canned messages. For now, keep | ||
these messages here in a static <menu>. (But I'll probably need to | ||
build the menu dynamically at some point, which means that these | ||
canned messages will probably move over to res/values/array.xml.) --> | ||
|
||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:id="@+id/canned_message_1" | ||
android:title="Can't talk now. What's up?" /> | ||
<item android:id="@+id/canned_message_2" | ||
android:title="I'll call you right back." /> | ||
<item android:id="@+id/canned_message_3" | ||
android:title="I'll call you later." /> | ||
<item android:id="@+id/canned_message_4" | ||
android:title="Can't talk now. Call me later?" /> | ||
<item android:id="@+id/custom_message" | ||
android:title="Custom message..." /> | ||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.