History log of /packages/apps/Phone/src/com/android/phone/PhoneApp.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a1a9601840e50e18ff8ca4be9b888e592287577b 11-Sep-2012 Dianne Hackborn <hackbod@google.com> Don't crash phone app when running as non-primary user.

Rename PhoneApp to PhoneGlobals. Add new PhoneApp that only
instantiates PhoneGlobals when running as the primary user. Add
check in PhoneGlobals.getInstance() to immediately throw if called
when there are no globals for that process. Add new
PhoneGlobals.getInstanceIfPrimary() that doesn't throw;
OtaStartupReceiver uses to abort early if receiving a BOOT_COMPLETED
for a non-primary user.

All of the other files here are just due to the rename of PhoneApp
to PhoneGlobals.

Change-Id: Ic3999d956198ac836cb6a07fa3c77f36c1754ea3
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
6046c0d05994e434b7706fa1e3aec03d5f066d75 07-Sep-2012 Yorke Lee <yorkelee@google.com> Fix for screen staying on at quick response dialog

Fixes bug where the sleep timeout is ignored when an incoming
call is received, the user selects the quick response option
and then the incoming call is disconnected. If no quick
response is selected, the screen stays on permanently. Note
that this fix means that when the screen timeout occurs,
the InCallUi screen is exited and so when the screen turns on
again we are no longer at the quick response dialog. This is
working as implemented since the InCallUi screen exits when
onPause() is called.

Bug: 7073132
Change-Id: I4e9b1be4a1e3213b901408f4abe1af80da93c7a2
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
91177a70c9024522c1d0d3ac570124998f09647a 30-Aug-2012 Dianne Hackborn <hackbod@google.com> Update to specify which user broadcasts should go to.

Change-Id: Ibc5c165be4bd57395a43d08b3024d2dad084a3ad
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
03f8c57590db5459496fd88966bba2efdcb4c2ca 28-Jul-2012 Jeff Brown <jeffbrown@google.com> Use new PowerManager API.

Change-Id: If7560318278a720e513a25510df1f32d122b3ccc
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
b9f1b7870bb5591b5119521fd9e35c4d8cd23ea6 24-Jul-2012 Daisuke Miyakawa <dmiyakawa@google.com> Fix copyright notice and debug level.

See also I65a0e5076f5c

Change-Id: I7a6d38ca7206c422f577dbf0969dad05eead5126
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
de1cf0101d2b20a7895d11fd0d8869840137fa55 14-Jul-2012 Matthew Xie <mattx@google.com> Resolve merge conflicts from Bluedroid stack changes.

Change-Id: Ife6b7d72ba1cf780d85e8a71a45382a8698c9e93
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
59d39bc3d1f3930550dc572172e144831ac91c31 17-Feb-2012 Matthew Xie <mattx@google.com> Implement a Handsfree phone service file to get phone states and
establish communication between phone and bluetooth.

Change-Id: I65a0e5076f5c09bde33c0d410a081a8c28b466e1
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
02d680e702821997b17f09b68946255e42d57bbb 18-Jan-2012 Jaikumar Ganesh <jaikumar@google.com> Temporary changes to the phone app to get the build to pass.

Change-Id: I1dfadfc9b1082aa68897daece74949b13689aceb
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
9177815a41ca8d13b83e5774617f397e4efda485 12-Jul-2012 Jeff Brown <jeffbrown@google.com> Update reference to power manager service.

Change-Id: I46cb902e93567ff9ef53104283be7e196e58571d
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
b0f85b4a78abead921c363f9c8e247d5bdd20c74 14-Jun-2012 Wink Saville <wink@google.com> Use telephony-common

Change-Id: I1710418850040fc20afff4795ee4a85027203fc9
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
38e743a4f18da9db28b388fc80f1d274502e2504 17-May-2012 Jean-Michel Trivi <jmtrivi@google.com> Make the phone app register its media button event receiver

Make PhoneApp register its media button event receiver so it
sees media button key events first when the phone is ringing
or when in call.

Bug 6484717

Change-Id: I415e4b2b7a1e34922eabb06bb7f0e39b82e40faf
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
bda8f0cf8bb1f347d7e48dd03ede5c6413051891 04-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Implement new JB wonder-notifications for missed calls

- Use Builder and addAction
- Show photo for a missed notification

TESTED:
- have an incoming call and ignore it relentlesly.
-> Missed call notification should have call back button.

- have two missed calls
-> no action should be available (the user should go to call log)

- reboot the device
-> missed call notification should have contact picture on reboot.

Bug: 6289104
Change-Id: I3cb974fef48625f3c4d3a45b46f65e42ad899819
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
d649d4dcc7832139e6237cc2ffebf9680c7e2438 05-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Use new notification style for ongoing call

- Use Notification.Builder's Chronometer support, which was introduced
by Ib6ca3a8262f676d49d81e081a30c6d994c732a6b, instead of preparing
RemoteViews by ourselves.
- Use Notificatior.Builder#addAction() for hanging up the current call.

TESTED:
- hang up ongoing phone calls from ongoing-call notification
- hang up one of ongoing calls from the notification when having
multiple calls
- hang up holding phone calls from the notification
- (GSM) hang up conference call

Bug: 5161272
Change-Id: Iab7342df7c89057ef0d077b1e2a44b7e9f0190b9
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
5c594605452f1207311bfdbdd51c82907835a1e0 05-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Enable "horizontal position detection" when dialpad is up

Fixing bug 5663783 : Screen keeps turning off in-call when trying to use
DTMF keypad or swipe notifications

The issue has happened since our fixing bug 6006756, disabling
horizontal position detection in the entire in-call screen.

This change re-enable it only when dialpad is up, assuming we're sure
users want to use dialpad in that condition.

TESTED:
- move a hand close to prox sensor
-> should turn off the screen, regardless of the phone orientation

- open a dialpad and put the device horizontally. Then cover the prox
sersor
-> should keep the screen on, because users probably want to use it

- open a dialpad and put the device vertically. Then cover the prox
sensor (or just move it close to your ear)
-> should turn off the screen, because users probably want to talk
with the phone. No false touch please.

- open a dialpad and bail out of the screen.
-> should not change any behavior here.

Bug: 5663783
Change-Id: I88d668902cda779d2f64fbb476ddb2fa9c0b3668
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
a4bf2755bb67190b33bc8f506b6d484186231c02 02-Apr-2012 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Remove codes related to BATTERY_LOW warning"
80b8c1c8b17f8de870804c7e460a8b9d4af18370 02-Apr-2012 Wink Saville <wink@google.com> Merge "Add TelephonyDebugService."
cdd39f382fac41e0690ee8e2839a9a3521713b45 31-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Remove codes related to BATTERY_LOW warning

Those codes aren't used anymore

Bug: 6042916
Change-Id: Ia2f4ee57f5672b6340a075040b7b74d35602bd27
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4b3631d11043d8f6de23f76fa606934d7eb11b35 30-Mar-2012 Wink Saville <wink@google.com> Add TelephonyDebugService.

This serves as a proxy for com.android.internal.telephony.DebugService
and allows dumping of the current state of the telephony stack.

Change-Id: Iec3002d4331a54d522745667eab4163cb02f0901
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
f8a9fbe31969b4f97ea03d233684efc117888879 29-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Move TelephonyCapabilities from Phone to telephony

Must be after I0d4ca2f8e4d775004d146fe6f9c60165a94366a9 (framework)

- Use the class in framework and remove the original class.
- Add useShortDtmfTones() to PhoneUtils. It was originally in (old)
TelephonyCapabilities but it is more suitable to have it in the other
place.
- Remove now unused strings.

Bug: 6252254
Change-Id: Iee8964cd13f9a2fa9212b1655de0f49b04153ee5
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
db823115e7e30be089c1b15b837c61b9def1d2ba 27-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Wake up the screen when a call ends while the screen is off"
6522e3df7712f6259ed20242ced3a8246f8e6d9a 14-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Wake up the screen when a call ends while the screen is off

Fixing bug 1459910 : Wake up the screen and display the "Call ended"
state when a call ends while the screen is off

To achieve that we need to remember the wake-up request is per the
"Call ended" event. CallManager is already in IDLE state and thus
won't return any meaningful Call/Connection objects.

This change introduces InCallUiState.showAlreadyDisconnectedState. It
will be turned on when onDisconnect() is called and screen is turned
off by power manager (or prox sensor). The flag will force some of
UI components to show already-disconnected phone call. After showing
the screen once, the in-call screen goes background again, reseting
the flag.

The basic flow would be like this:

- InCallScreen#onDisconnect() (screen turned off by power manager):
the flag becomes true, waking up the screen
- InCallScreen#onResume(): the flag is true if needed
- InCallScreen#onPause(): the flag is turned off regardless of the
sitation

Somewhat tinier details:

- wake up the screen and remember the decision. Let CallCard keep
all information around CallerInfo. Also update ellapsed time TextView,
which is inactive during the screen's in background, so should be
updated manually at this moment.

- to detect the correct situation, use
isShowingCallScreenForProximity(), which was introduced in
Ie727dd779bb957cd6da948dbe1584a4382d9935a. Added some comments
for clarifying the meaning of the method.

- on onResume() set up shut down timer if the Activity woke up by
the request above, so that the screen will go off after a moment.
Force CallLog to show disconnected screen with the previous
CallerInfo without refering to CallManager. Because ImageViews
remember the previous state, it works as we expect.

- on onPause() reset the flag used for the decision, so the app
won't be confused any more.

TESTED:
1. hang up or let the other side hang up the call when the screen is on

-> Nothing suspicious should happen here.

2. let the other hang up the call when the screen is off

-> "CALL ENDED" screen should appear with an appropriate photo.
At that moment if the phone is still near to an ear, the effect should
happen after releasing the phone from one's ear.
From user's perspective, the flow should look like this:
say "bye"
-> let the other part hang up the call
-> hear "hanged-up" tone
-> release the phone from the ear
-> see hung up state with correct elapsed time
-> see lock screen after a while (if the phone is locked)

3. bail out of the in-call screen during a phone call and let the other
hang up the call (screen is turned on or off).

-> Should be same behavior as before. This change shouldn't affect
anything.

4. do multiple phone calls, move the phone near the ear (turning off the
screen), let all the other parts hang up each call. (GSM)

-> Should show one of the contact photo. At this moment the primary call
at that moment will be prioritized.

5. do a conference call, and do similar flow as above (GSM)

-> Should show in-call screen with "DISCONNECTED" conference call. The
screen should disappear like #1

6. do multiple phone calls (with CDMA)

-> Should show in-call screen with misc phone call state. The screen
should disappear like #1.

Bug: 1459910
Change-Id: Idf6988ae85faf54f422f97672a923dfb97dd6d4e
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4028c752d5e1c476765a9d73703c680d7def7bc7 22-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Explicitly specify when PokeLock is effective

For bug 5021798 : Screen times out after phone call much faster than
otherwise.

This change will *not* fix the problem but may make the code clearer
to understand why the problem occurs.

Bug: 5021798
Change-Id: If6293f455f72ff1e2979e183ef91fbe8ffe088fe
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
5c7faf1ac57ecd1ef39145521c18807ae9e87342 13-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Introduce fallback cache for ringtone/send-to-vm

Right now the app just relies on ContactsProvider for custom
ringtone and "send to voicemail" and falls back to system
default when it fails to obtain those info in 500msec, which often
happens when the system is overloaded or database is being synced.

This change introduces fallback cache for the latter case. The
cache is set up on the device boot, and is refreshed periodically.
It is used by CallNotifier only when the first lookup fails.

We do *not* fully rely on the local in-memory cache since it may
be stale at that moment, but we do not rely on ContentObserver
mechanism either to keep the cache super-fresh every time, because
it also will overload ContactsProvider, just for obtaining two tiny
info.

This change also prepares a BroadcastReceiver which is accessible
from Contacts editor screen. See "NEXT TODO" below.

NEXT TODO:
- Should have a mechanism to force update the cache from editor UI.
Without that the cache is being obsolete for longer time.

TESTED:
- Set custom ringtone and/or send-to-voicemail flag and see the
behavior.
- Insert intentional delay in async query code, forcing the fallback
behavior.

Bug: 1735194
Bug: 5568640
Bug: 5718903
Bug: 6020594
Bug: 6078996
Change-Id: Ib9a592e0db69683dc08753e9fd617fe7f89c9e71
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
b86f9397f1b1d3d385b9ff3f393fcd8f2ecac44d 19-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Delay releasing UpdateLock when screen is in foreground

TESTED:
- make a phone call and hang it up
- make a phone call and let the other side hang it up
- make a phone call, receive an OTA, and hang it up
- make a phone call, receive an OTA, and let the other side hang it
up
- make a phone call, receive an OTA, turn on/off the screen, and
hang it up
- make a phone call, receive an OTA, turn on/off the screen, and
let the other side hang it up

Bug: 6190148
Change-Id: Iab44a94d7605b4460e4068a640336bfa73f3af1a
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
621081f51e8c7f7daced2417264a58b945246a25 05-Mar-2012 Daisuke Miyakawa <dmiyakawa@google.com> Use UpdateLock

The new hidden API will prevent various system-update related things
happening (dialogs popping up and reboots for installing).

This change has Phone app acquire the lock during phone calls,
replacing the same capability existing in different component in the
system.

TESTED:
- Receive an OTA during a phone call.

Bug: 6115765
Change-Id: I6522c463acc43fd7f3e1df763da2b15b2e51a958
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
6c2c5d2ce8ddcfda0febb1b711a3352ada5afc8b 23-Feb-2012 Mindy Pereira <mindyp@google.com> am 0a717aa6: am 08916cba: am 4bf466a6: Setup a flag to detect when the screen is on and we are in call mode.

* commit '0a717aa6d161a65a3ad12828791f059ed6671fe2':
Setup a flag to detect when the screen is on and we are in call mode.
4bf466a6d117a6fc4ddfd480f7db7606a29cb4ff 17-Feb-2012 Mindy Pereira <mindyp@google.com> Setup a flag to detect when the screen is on and we are in call mode.

Fixes b/6029570 Proximity turns screen on and off repeatedly for no reason, when device is flat

Change-Id: Ie727dd779bb957cd6da948dbe1584a4382d9935a
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
7a6a3f0dbe27e1a1ef065b5b6f520b736551c43c 14-Feb-2012 Daisuke Miyakawa <dmiyakawa@google.com> am 4094a435: am 1738002f: am 40dcd14a: Disable horizontal detection during phone call

* commit '4094a43572e22025e5163714d70069ad9bad055b':
Disable horizontal detection during phone call
40dcd14ab398220dec2a25f812dde21899d109f2 14-Feb-2012 Daisuke Miyakawa <dmiyakawa@google.com> Disable horizontal detection during phone call

Aggressive horizontal orientation ignoring of prox should only be when
outside of the phone call. There is no UI at the top of the screen in
the call except notifications.

Bug: 6006756
Change-Id: Idc615ebcfa96ed59a71c2fb1e67e9a905e1cc2c8
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
2a5f795c4602bf519235a875b6a4003965642ddd 18-Jan-2012 Daisuke Miyakawa <dmiyakawa@google.com> Bunch of cleanups

- Add/fix comments (including misc ones for making IDE happier)
- Change visibility of some methods to make the intention clearer

Change-Id: I18cc8df323cd020b9376405c94f12177d9d712d9
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
04d8c424393d8ad82498f71addc322360457ec7c 03-Dec-2011 David Brown <dab@google.com> am 4aca85ca: Fix bogus "data disconnected due to roaming" notification

* commit '4aca85caae167d00b0e394c0cbbbcd291b4b348c':
Fix bogus "data disconnected due to roaming" notification
4aca85caae167d00b0e394c0cbbbcd291b4b348c 02-Dec-2011 David Brown <dab@google.com> Fix bogus "data disconnected due to roaming" notification

Due to a subtle change in the ACTION_ANY_DATA_CONNECTION_STATE_CHANGED
broadcast (see bug 5632572) the notification saying "You have lost data
connectivity because you left your home network with data roaming turned
off" could sometimes appear even when data roaming was actually on :-(

The fix: in addition to checking for state=DISCONNECTED and
reason=REASON_ROAMING_ON, we now also explicitly check that data roaming
is disabled before showing the notification.

Bug: 5632572
Change-Id: I90d9564418838178d54842c9c9e526e2d6e89133
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
b1545c869ff7fa76ce3c3256b23e1b2b4411f483 30-Nov-2011 Daisuke Miyakawa <dmiyakawa@google.com> Resume previous call origin if it looks a second call

3rd party app can intercept outgoing call and replace it with
another call initiated by the app, which makes the Phone app
forget call origin. We keep the call origin for very short term
and restore the previous info assuming the second call has
a same origin for users' perspective.

TESTED (with and without 3rd party app bypassing calls):
incoming calls
-> go back to calllog

outgoing calls
- make a phone call from dialpad -> go back to dialpad
- make a phone call from favorite -> go back to favorite
- make a phone call from calllog -> go to calllog
- make a phone call from call detail -> go to calllog
- make a phone call from People UI -> go to calllog
- make a phone call from dialpad and launch Phone UI
again during the phone call -> go to dialpad
- make a phone call from contact card (reached via
phone favorite) -> go to calllog
- make a phone call from dialpad or favorite, bail out the
in-call UI. Have the recipient hang up the call.
Then have an incoming call again. Hang up the second
phone call.
-> go to calllog
- make a phone call from search UI launched from dialpad
-> go to dialpad
- make a phone call from search UI launched from favorite
-> go to favorite

- make a phone call from dialpad and finish the call. Immediately
call again via People UI (to check the cache won't be used)
-> go to calllog

Bug: 5528034
Change-Id: Ia872c1fe9f5d00300377899271e8872bc9d8b90f
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
430f42b0bee5e778078354e072b4f3e5eee9c048 08-Nov-2011 Jeff Brown <jeffbrown@google.com> Handle EXTRA_DOCK_STATE_LE_DESK and HE_DESK.
Bug: 5569662

Change-Id: I52df009db345b9a25c0625e2775f9e1b2eed09f3
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
6734941af0f8874ca584a363ef3a8febe41b397d 27-Sep-2011 Daisuke Miyakawa <dmiyakawa@google.com> Introduce CALL_ORIGIN

Phone app now accepts "com.android.phone.CALL_ORIGIN"
as an intent extra, which allows the app to remember where
the phone call comes from. Because InCallScreen may
receive multiple Intents and thus multiple origins, we
just remember the last one as active request.

Right now we just use temporary logic for handling the
call origin, introducing Contacts app's DialtactsActivity when
the origin requested.

See also I7b88b245e82e96e150937ee53029d397a28a9b2d

Bug: 5360106
Change-Id: I4d5f825f7d5109c6ff8c27b6e53a31ca9e6b832f
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
df266ade99188365d4a52f89a6d26b549c2aaf9a 18-Aug-2011 David Brown <dab@google.com> Clean up StatusBarManager usage in the phone app

In preparation for adding the DISABLE_NAVIGATION flag while an incoming
call is ringing (see bug 5161286), here's a big cleanup / simplification
of the phone app's use of the StatusBarManager.

Previously, we had two separate helper methods to disable the status bar
"notification windowshade" while in-call: one in the PhoneApp
(disable/reenableStatusBar()) and the other in the NotificationMgr
(NotificationMgr$StatusBarMgr.enableExpandedView()).

The InCallScreen was calling them both(!) and they could potentially
interfere with each other.

Now, the InCallScreen purely uses the NotificationMgr's helper class for
this, so we can totally get rid of those two PhoneApp methods. (The
EmergencyDialer also used these, but it's a totally separate activity so
it can just call StatusBarManager.disable() directly.)

Also, some other related cleanup:

- Update the NotificationMgr to be more explicit about being a singleton,
and use the exact same naming conventions as we already use with the
CallController / CallNotifier / InCallUiState / etc.

- Rename the helper class from StatusBarMgr to StatusBarHelper to be less
confusing (since "StatusBarManager" means something already)

- Improve javadoc in several places

TESTED to make sure no regressions from Gingerbread:

- While on a call, with the in-call UI up:
- Status bar "windowshade" not draggable in all call states
- Speakerphone and Mute icons appear correctly when necessary
- Alert notifications (like when receiving a text) are silenced

- While still in-call, bail out of the in-call UI:
- Status bar "windowshade" is now draggable
- Speakerphone and Mute icons still appear correctly
- Alert notifications are still silenced

- End the call and return to the home screen
- Status bar "windowshade" is draggable
- Speakerphone and Mute icons are properly cleaned up
- Alert notifications make their usual sounds

- Also, tested bailing out of the in-call UI and then ending the call
remotely (by hanging up the other end): all status bar icons got
cleaned up correctly.

- Emergency dialer (from lockscreen): make sure "windowshade" is not
draggable

Bug: 5161286

Change-Id: I4fa0f0f305d038943b93494ce8500dc339304691
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4ba332e62c4d54b2623ccdc59fafd46ecba08cf0 20-Jul-2011 David Brown <dab@google.com> Clean up dead code that originally supported non-prox-sensor devices

In previous Android releases, the in-call UI provided special support for
devices with no proximity sensor. The main differences were:

- The entire in-call UI had to be driven by hard buttons rather than
onscreen touchable UI

- All in-call controls that didn't have dedicated hard buttons were
menu-based rather than touchscreen-based

- The DTMF dialpad was contained in a "SlidingDrawer" widget that you
had to drag up from the bottom of the screen

- A special "touch lock overlay" would come up after 6 seconds and cover
the DTMF dialpad to avoid false touches

The code to implement this behavior has been unused (and untested) since
the froyo release: Google hasn't built software for any non-prox-sensor
devices since the G1 and myTouch, and any OEMs shipping non-prox-sensor
devices are probably using a completely custom in-call UI anyway (or
perhaps a customized version of the Cupcake-era phone app.)

Given that, it's not worth the extra complexity and clutter to keep these
features in the code base. So this change removes all code and resources
in the phone app that were only there to support non-prox-sensor devices.

The gory details:

- Entirely remove all Menu-related code from the in-call UI:
- The classes InCallMenu, InCallMenuView, and InCallMenuItemView
- Menu item handling in InCallScreen.onClick()
- Special handling of the Menu key itself

- Remove all code and resources for the "SlidingDrawer" that was used to
access the DTMF dialpad

- Remove all code / resources / animations for the "touch lock" overlay

- Rename non_drawer_dialpad.xml to dtmf_twelve_key_dialer_view.xml to be
less confusing (since we don't use a "drawer" anywhere any more)

- Remove the onscreen hint that said "Press Menu for call options" in a
couple of states

- Simplify the layout in call_card.xml: we don't need that top-level
RelativeLayout any more since the "menu hint" is gone

- Remove the config resources that allowed you to disable the normal
onscreen touch UI

- Remove a bunch of no-longer-needed string resources and ids

TESTED:
- Basic phone states (incoming / outgoing; 1 or 2 lines in use;
conference calls)
- Onscreen DTMF dialpad
- In-call screen prox sensor behavior
- In-call screen timeout
- Press Menu button (verify nothing happens)

Change-Id: I6ad5fd6df9bdef89e4defc7add7ade52d30d6335
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
211ff4c5c95f63f845b953f0020dfb516c01fcad 02-Jun-2011 David Brown <dab@google.com> Get interactive OTASP working again

Here's the next step of the CallController / InCallScreen redesign
(http://wiki/Main/InCallScreenRedesign). This change gets
"interactive OTASP" (i.e. CDMA activation on voice-capable devices)
working again.

The main change here is to initiate the outgoing OTASP call via the
CallController, *not* from the InCallScreen activity.

Background: In gingerbread and earlier releases, the InCallScreen
used to directly handle certain intent actions that could initiate
phone calls, mainly ACTION_CALL and ACTION_CALL_EMERGENCY, but also
OtaUtils.ACTION_PERFORM_CDMA_PROVISIONING.

But it was a bad design to tie those actions to the activity lifecycle
of the InCallScreen, and in change
https://android-git.corp.google.com/g/106821 I moved the phone app's
"call control" functionality out to a new class called CallController.

This change makes OTASP calls work the same way. Interactive OTASP
calls are now launched using the CallController, from the new
OtaUtils.startInteractiveOtasp() method. And the InCallScreen itself
is now purely a "view" class in MVC terms: we only ever launch it
using the ACTION_MAIN action, and (upon launch) it performs no
functionality other than displaying the UI in a state that matches the
current telephony state.

Other cleanup in this change:

- Got rid of the confusing use of the EXTRA_PHONE_NUMBER extra with
the ACTION_CALL intent (see CallController.getInitialNumber()).

Now, when we place a call from the OtaUtils code we simply load the
OTASP number into the *data* of the ACTION_CALL intent, which is
where it should have been all along.

- Cleaned up naming and/or doc comments in a bunch of places

- Have CdmaOtaStatusChange messages go only to the PhoneApp instance,
not to the InCallScreen some of the time. (Either way, they would
still ultimately get forwarded to the OtaUtils instance.)

Note there's still more cleanup to do:

- It's really ugly for the OtaUtils object to reach into the
InCallScreen and directly manipulate its widgets.

Instead, the model/view separation should be more clear: OtaUtils should
only know about a higher-level abstraction of the OTASP-specific UI
state (just like how the CallController uses the InCallUiState object),
and the InCallScreen itself should translate that higher-level
abstraction into actual onscreen views and widgets.

- The current state of the OTASP call is confusingly spread out among four
separate classes:
OtaUtils.CdmaOtaProvisionData
OtaUtils.CdmaOtaConfigData
OtaUtils.CdmaOtaScreenState
OtaUtils.CdmaOtaInCallScreenUiState
with at least some redundancy, especially between CdmaOtaScreenState and
CdmaOtaInCallScreenUiState (not to mention the "InCallScreenMode"
maintainted by the InCallUiState object.)

Instead, we should combine these into a single object (or container)
with zero redundancy and clear documentation, and possibly make it a
com.android.internal.util.StateMachine to make the state transitions
more clear too.

- When handling the ACTION_PERFORM_CDMA_PROVISIONING intent, we're
supposed to come up in the "activate" state where we display the
message "A special call needs to be made to activate your phone
service" and wait for the user to press the "Activate" button. But
right now we skip that state and launch the OTASP call immediately.

These open issues are all flagged with "TODO(OTASP)" comments.

TESTED on crespo-S:
- manually dial *228
==> interactive OTASP succeeds
- manually launch ACTION_PERFORM_CDMA_PROVISIONING intent
==> interactive OTASP succeeds
- regular incoming and outgoing calls
==> these work as before

Bug: 4194458
Change-Id: I40911c7774bd0f2e9c904f7e15defb753dbd5fab
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
58e4707b6cc021a663deae3e614364545ec9ee6a 17-May-2011 David Brown <dab@google.com> Fix ACTION_CALL_EMERGENCY code path through OutgoingCallBroadcaster

InCallScreen/CallController overhaul: One place in OutgoingCallBroadcaster
was still launching the InCallScreen with a CALL intent, which would crash
the phone app if you tried to dial 911 :-(
The fix is to use CallController.placeCall() instead.

TESTED (crespo):
- regular outgoing calls
- directly dial 911
- dial 911 via voice dialer

Also double-checked that nobody else is manually creating intents pointing
to InCallScreen.class, except for places that are already flagged with a
"TODO(InCallScreen redesign)" comment.

Bug: 4444071
Bug: 4194458

Change-Id: I518fbf71302564bfb31d1c821464961823f1ed8b
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
f0c4d0e94b7fa915bcfacd28ee432f8b3846511a 10-May-2011 David Brown <dab@google.com> Singleton pattern code cleanup

Fix a few of the phone app's singleton classes to be more explicit about
their singleton-ness, by making the constructor private, and instead
providing a public factory method that creates the singleton instance.

TESTED: Basic telephony (including bluetooth) on crespo.

Change-Id: Idb5bac1cf97a6864b898b09645779de214ac5266
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
3886cbec6d3eafe37494fd094bca95c841c779f0 10-May-2011 Daniel Lehmann <lehmannd@google.com> Apply renames from Contacts

Change-Id: Ibafa920b7db2b54b7cbc1d3f195114166dd88479
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
75e3711d82d0c98444f6c438437cad41d862fca6 20-Apr-2011 David Brown <dab@google.com> Introduce CallController (Step 1 of InCallScreen redesign)

This is the first step toward pulling "call control" out of the
InCallScreen, and leaving the InCallScreen responsible for only the
onscreen in-call UI.

Design doc: http://wiki/Main/InCallScreenRedesign

The CallController is a singleton object which acts as the interface to
the telephony layer for all user-initiated telephony functionality, like
making outgoing calls.

In particular, any functionality which needs to happen whether or not
the InCallScreen is currently visible belongs in the CallController,
*not* the InCallScreen.

This change introduces the CallController class, and moves the entire
outgoing call sequence (basically placeCall() and its helper methods)
from the InCallScreen to the CallController.

Also, this change adds a helper class called InCallUiState, which keeps
track of some high-level state of the in-call UI that needs to persist
beyond a single pause/resume cycle of the InCallScreen.

This enables us to handle failed calls much more cleanly than before:
If there's a failure in the placeCall() sequence, the CallController
stashes away a failure code value in the "pending call status code"
field of the InCallUiState structure. Then, when the InCallScreen comes
up, if that field contains an error code we do some UI-specific action
(like displaying a dialog) depending on the code. See the "Error /
diagnostic indications" section of InCallUiState.java for the full
details.

Other details:

- Added a new class called "Constants", which currently contains the
CallStatusCode enum, but which I'll eventually use for other app-wide
constants too (for example the various EXTRA_* and intent action
constants that are currently all over the place.)

- Removed references to Intent.ACTION_ANSWER (which has never actually
been used for anything)

- Cleaned up confusing use of EXTRA_NEW_CALL_INTENT in
OutgoingCallBroadcaster (bug 3325827)

- Finally bit the bullet and added an mApp field to InCallScreen (so we
no longer need PhoneApp.getInstance() calls all over the place)

This change is just the first step of the InCallScreen/CallController
overhaul. Basic calling works fine with this change, but some other
stuff still needs to be fixed:

- OTASP-related behavior: (1) Handle the PERFORM_CDMA_PROVISIONING
intent in the CallController, not the InCallScreen; (2) move the
functions of InCallScreen.checkIsOtaCall() over to the CallController.

- Implement the "emergency call from airplane mode" sequence inside the
CallController (and get rid of the EmergencyCallHandler activity)

- plus various other loose ends covered by TODO comments.

TESTED: "Basic telephony functionality" on Crespo:
- outgoing calls
- incoming calls
- failed outgoing calls (airplane mode, no service, etc.)
- bail out and return to InCallScreen while in-call
- basic telephony states (two lines in use, hold/unhold, etc.)

Bug: 4194458
Bug: 3325827

Change-Id: I0523ef182a53fc7f252940d0b0e2804661dc9247
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
0248b9d3dbc78adc1c5fc02a0c73179001d5d793 08-Apr-2011 Joe Onorato <joeo@google.com> Remove the deprecated things from Config.java. These havent been working since before 1.0.

Change-Id: Ibc5976a4f362fc121746d667545d24acdc730b02
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
0f49ecead528c8b6b6c4a308c939e46351149d8a 07-Jan-2011 Wink Saville <wink@google.com> Fix merge conflict with I07c221fd097f3364833bded269a0c943d6b0455c

Change-Id: I86f2be1853a222d84ed2e86378386b989fa49683
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
7d059ff40fa0850c2cbec50abeaa30193c4a2cfd 08-Dec-2010 Jaikumar Ganesh <jaikumar@google.com> Renable headset profile for SCO audio.

Allow ability to connect to headset profile on the other device,
if handsfree is not supported locally.

Change-Id: Idad88533830ced8edc25c97fe799da6499a7e683
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
87daf6560253e065b073608f2db9ef1d99f4b0ae 24-Nov-2010 Jaikumar Ganesh <jaikumar@google.com> Disable BluetoothHeadset Service when there is no voice capability.

Change-Id: Ibc460170e2e124e9ea514717d9045968d076d2f1
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
e178d50a249054d107ffaf67c7dda50ab601f0c6 08-Nov-2010 Joe Onorato <joeo@google.com> Drop the cheek touch support that never worked.

Change-Id: I03be6cb8be34b2006a3cefc7513f278fc9e64807
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
1aa254b1cecfb2eb9b4cad78d2788874b8f11dab 04-Nov-2010 David Brown <dab@google.com> Correctly disable "missed call" notifications on non-voice-capable devices

We now explicitly make sure that the phone app doesn't do anything "call
log" related on non-voice-capable devices, namely (1) don't try go to the
call log after a call ends, and (2) don't ever display "missed call"
notifications.

I initially fixed this <https://android-git.corp.google.com/g/75328> by
detecting the presence or absence of the call log based on whether there
were any registered handlers for a VIEW intent with mime type
"vnd.android.cursor.dir/calls".

But as of change https://android-git.corp.google.com/g/76050 in
apps/Contacts, that's no longer a valid way to detect whether the device
has a call log UI, since the contacts app now provides an activity called
NonPhoneActivity which *does* handle that intent on non-voice devices.

So we now disable call-log-related stuff based on the system-wide
"config_voice_capable" resource, which is simpler (and more correct) than
trying to detect whether the Call log UI exists or not.

Also: in PhoneApp, set sVoiceCapable at the very top of onCreate to make
sure it'll be valid when we initialize the NotificationMgr/CallNotifier/etc.

Bug: 3159601
Change-Id: I95a40410e2acee7eb1f11bbff1409963ffbd6a33
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
2e97fab35871f41a9a8d8099ccb664b17d92554c 26-Oct-2010 David Brown <dab@google.com> Disable "ongoing call" notification on non-voice-capable devices

The "ongoing call" notification allows you to reach the in-call UI, so
totally disable it on non-voice-capable devices (even when the phone is
technically "in use" like during the OTASP call.)

Also some other related cleanup:

- Cache the config_voice_capable resource as a static PhoneApp field to
save a bunch of resource lookups. (This also minimizes the number of
places that know about that resource, in case we ever switch to using a
system feature instead of a resource.)

- Tracked down all other possible ways of bringing up the in-call screen:
- the ITelephony showCallScreen() API
- the internal displayCallScreen() method
and disabled those too on non-voice-capable devices.

Bug: 3121559
Change-Id: I13343233e8af7aef0846e3cacb429c6736902fd0
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
3ff152c80b97c32a5764c54d2aeb888509cf84ad 31-Jul-2010 David Brown <dab@google.com> Don't try to go to the call log on devices with no call log

Clean up some code in the phone app that assumed the existence of the
"Call Log" screen, and would lead to bad behavior on non-voice-capable
devices where there's no such thing as the Call log.

(1) After a call ends, in situations where we're supposed to go to the call
log, don't crash if there's nobody to handle the call log intent.

(2) When there's a missed call, don't bother posting the missed call
notification at all if there's no call log.

and also:

(3) Sanity check the other startActivity() calls in the phone app to confirm
that there are no other lurking problems (like bug 3056334, or any other
cases where future products might not have all same the built-in apps as
current ones.)

(Result: Fixed two internal helper methods where we were manually
bringing up the InCallScreen.)

NOTE that on Stingray you shouldn't have been able to get to the phone app
in the first place(!)

But there are currently some ways this can happen (see bug 3038102 and bug
3116625 for a couple of examples), so this fix really just makes the code
more robust in case you *do* somehow get to the phone UI on a
non-voice-capable device.

Bug: 3056334

Change-Id: I8ab41398a3a096a4462bbc5fc08aca56eae49376
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
8af28e56c800ffed824e4f30e606b0ae75c989d3 19-Oct-2010 Joe Onorato <joeo@google.com> am cc06a3e8: am a040c759: Reduce logging.

Merge commit 'cc06a3e8220336c26123f3cb9dece4adca6ca577'

* commit 'cc06a3e8220336c26123f3cb9dece4adca6ca577':
Reduce logging.
a040c759e1066cd23442f7f3fc660a5332234edd 19-Oct-2010 Joe Onorato <joeo@google.com> Reduce logging.

Remember, the system and main logs are
- Shared resources
- Primarily for recording problems
- To be used only for large grained events during normal operation

Bug: 3104855
Change-Id: I510d866aa3a80c43002ea40672e6be1ebdf8867a
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
1d417d7ede71bbcf72a7edebf528efbfcf9b82bb 26-Sep-2010 Jaikumar Ganesh <jaikumar@google.com> Update code for new Bluetooth Public profile APIs.

Change-Id: I125e7643d2aab9a31470d7602060cf4604352707
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
e0cde8e835e7875f0020ee9ed9524937310a872c 28-Sep-2010 Hung-ying Tyan <tyanh@google.com> am b30ba53c: am 8141651f: Merge "Move SipService to phone process." into gingerbread

Merge commit 'b30ba53c75ec1e16f64aee4f2a2d810ec518f9f4'

* commit 'b30ba53c75ec1e16f64aee4f2a2d810ec518f9f4':
Move SipService to phone process.
6b3548b38c9c2eb9c3c575f393336c9cba540588 25-Sep-2010 Hung-ying Tyan <tyanh@google.com> Move SipService to phone process.

Companion CL: https://android-git/g/#change,70186
http://b/issue?id=2998069

Change-Id: I57071458bd3f64eae701864dbb8183fba54d1da9
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
ba681d3ccc712991a2a7558b2bb5d8dbb4fcc464 23-Sep-2010 John Wang <johnwang@google.com> Remove PhoneType check while registering events "do not merge"

This commit was removed while debugging a proximity sensor bug.

Add it back since the bug is fixed and not related to this commit.

The corresponding change was in master so this one is "do not merge" one.

This reverts commit 7a7e105e6cd42fc5fc4f662d0ebef203e7f33a0d.

Change-Id: Icfee55213a65df65c7702069805137fab837c04b
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
7a7e105e6cd42fc5fc4f662d0ebef203e7f33a0d 16-Sep-2010 John Wang <johnwang@google.com> Revert "Remove PhoneType check while registering events." "do not merge"

This reverts commit 34b17481486fc41e99627d68dda9b5c075b4cc8e.

Change-Id: I4505e20ace67579e62673637cbd39ad3611fb95d
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
6feb759a3fac67792c5c7598336431a688f317e7 16-Sep-2010 John Wang <johnwang@google.com> resolved conflicts for merge of cccc630a to master

Change-Id: Iff333a62f75280b0ff51d3bc28f8e71d4798fd0a
34b17481486fc41e99627d68dda9b5c075b4cc8e 15-Sep-2010 John Wang <johnwang@google.com> Remove PhoneType check while registering events.

Part of effort of PHONE_TYPE_CDMA cleanup.

While regitering phone events via CallManager, there is no need to

check PHONE_TYPE anymore since CallManager will do internal check

and register to the corresponding events in registerPhone().

PhoneApp should register to all phone events and let CallManager

determine which phone supports which kind of events.

Change-Id: I7e9df61b7df8fd1d0127d7fbe0bf305663e7a4dc
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
6b4d37ced9d2db95b988482789cf299da00d2dae 28-Aug-2010 John Wang <johnwang@google.com> resolved conflicts for merge of fcf90596 to master

Change-Id: Iaa7e7cdd0beb8cb83169455021206154b25efc2d
8058bbc4c7d0d56e133bd2fb9dfc559004e4d61a 23-Aug-2010 John Wang <johnwang@google.com> Integrate CallManager with Bluetooth call service.

Replace Phone APIs with CallManager APIs in bluetooth call service.

Delete mForegroundCall, mBackgroundCall and mRingingCall in bluetooth class.

Since those calls dynamically refer to calls of different phones, bluetooth call handler has to access them via CallManager APIs.

Change-Id: Icdb04fbc0caef2dfda7ca73a3f67bd4177d4e92d
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
a4f8d09a653f1322bb3d38cd65a8cc038a984280 20-Aug-2010 Hung-ying Tyan <tyanh@google.com> resolved conflicts for merge of 62bdb7e7 to master

Change-Id: I23c9660917972b843a9c6ef375b528e1886726e5
a4b443115c1442c9d65ba58fcb667b0e025993de 17-Aug-2010 Hung-ying Tyan <tyanh@google.com> Move PhoneUtils.setAudioMode().

As different audio modes need to be applied for different phone types, (for example,
SIP call needs to be in MODE_NORMAL while GSM call in MODE_IN_CALL,) we move the
logic to CallManager. A side benefit is that since CallManager knows the current
phone state, PhoneUtils does not need to keep the audio control state (sAudioBehaviourState)
anymore.

The companion CL is at https://android-git/g/#change,61553

Change-Id: Ibb40e1853f2e5818b4b28c976f5756f567b3de41
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
b154630235935e1aab2a41eff9ed794d40084a02 28-Jul-2010 David Brown <dab@google.com> Add "non-interactive" mode for the OTASP (CDMA provisioning) call.

Non-voice-capable devices (like Stingray) have no built-in phone UI, but
do still need to make a special phone call when first "activating" the
device.

Till now, the code handling the OTASP call (OtaUtils.java) was very
tightly coupled to the InCallScreen, using special modes of the in-call UI
to display the "skip" and "activate" choices, and display a DTMF dialpad
and Speaker button and progress info during the call.

This change decouples the OtaUtils and InCallScreen code, and allows the
OTASP call to run in "non-interactive" mode. Now, on data-only devices we
launch the OTASP call without involving the InCallScreen at all.

This change also cleans up the way we send results back to the
SetupWizard:

- First of all, in non-interactive mode, we now return an activity result
right away after kicking off the OTASP call. This lets our caller know
either that the OTASP call started (and is running in the background),
or that that we couldn't start the OTASP call at all.

- And as before, when the OTASP call ultimately finishes, we send back a
PendingIntent that was originally provided by our caller. But now, we
explicitly add an extra called EXTRA_OTASP_RESULT_CODE to that
PendingIntent. That extra's value is an integer code, which allows
the caller to distinguish among several possible outcomes, namely
"success", "failure", and "user skipped".

Finally, this change includes a test activity called OtaspTestActivity which
exercises the whole "non-interactive" OTASP sequence (which basically
mimics the PERFORM_CDMA_PROVISIONING behavior of SetupWizard.)

More details:

- When we handle the PERFORM_CDMA_PROVISIONING intent (see
InCallScreenShowActivation.java) we check a config resource called
R.bool.voice_capable to decide whether to use the in-call UI. (That
resource is true by default, but overridden to false on Stingray.)

- The singleton OtaUtils instance is now owned by the PhoneApp, not the
InCallScreen, since we can now have an OtaUtils instance *without* an
InCallScreen.

- I renamed the "com.android.phone.InCallScreen.SHOW_ACTIVATION" intent
action to be "com.android.phone.PERFORM_CDMA_PROVISIONING", to be more
precise, and especially to make it clear that it's not tied to the
InCallScreen.

- Moved all OTASP-releated string constants into OtaUtils (rather than
having them sprinkled around in 3 or 4 places.)

Bug: 2837917

Change-Id: Ifa82591478ccb2ec9501163963944d0d0659b9ea
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
9afe1de771110096822a2501d78135575101421d 14-Aug-2010 John Wang <johnwang@google.com> resolved conflicts for merge of 17509be3 to master

Change-Id: Ie52e3bfd5f127788840b11e56ba5fe9dd5b97cf0
8343169cc89621d46dce86449f5ee1ff5d3a4919 11-Aug-2010 John Wang <johnwang@google.com> Enable CallManager to handle SIP call.

Using CallManager to handle SIP call

1. Register SIP phone in SipBroadcastReceiver

2. Answer SIP incoming call

3. Reject SIP incoming call

4. Make SIP outgoing call

5. hangup SIP outgoing call

6. Add SIP call while there is foreground call

7. Answer SIP call while there is foreground call

8. Swap SIP call and background call

Change-Id: I2fc1f88e0fc100da45eb497469d69c784f44d06a
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
862cd3adad2b2cdf7ca6a1a5750c43882aeeaa3c 26-Jul-2010 John Wang <johnwang@google.com> Use CallManager register methods "do not merge".

Merge code from master to gingerbread.

Replace the phone.register methods with CallManager.register in CallNotifier class.

Change-Id: Ic059edf6d74e10c469281a0a5f2f47fffbdf1d4c
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
ba72aa717c41d96e57209b3a74f0bedc8599ec15 05-Aug-2010 John Wang <johnwang@google.com> Use CallManager call list API "do not merge".

Migrate CL from master to gingerbread.

Integrated CallManager to InCallScreen and CallCard.

Use active call list APIs of CallManager to replace
direct access foregroundCall, backgroundCall, and
ringingCall via Phone APIs.

Change-Id: Ie8379b650fb5bec1125b6f889d4d76a15775a588
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
d6a536563ca5a7e842a1f51b00d51c0c4d5a2562 27-Jul-2010 Joe Onorato <joeo@android.com> am d699af88: am af886f8a: am 6d6523c5: Make the phone app call into the power manager for a short timeout when a call ends and we are still on the dialer screen.

Merge commit 'd699af8861cbb27bcba32b6c97a2c4f5f11f38fa'

* commit 'd699af8861cbb27bcba32b6c97a2c4f5f11f38fa':
Make the phone app call into the power manager for a short timeout when a call ends and we are still
af886f8a6cf1a9ca06c224c131b24bcd4fc88bf6 27-Jul-2010 Joe Onorato <joeo@android.com> am 6d6523c5: Make the phone app call into the power manager for a short timeout when a call ends and we are still on the dialer screen.

Merge commit '6d6523c51e68ddfd1140713ddd9cb279499e9f4f' into gingerbread

* commit '6d6523c51e68ddfd1140713ddd9cb279499e9f4f':
Make the phone app call into the power manager for a short timeout when a call ends and we are still
170160f6550b2933ff5a6c96c879d074a3ca2f16 26-Jul-2010 John Wang <johnwang@google.com> Use CallManager register methods.

Replace the phone.register methods with CallManager.register in CallNotifier class.

Change-Id: I89d9fabe14cc0022709e47ded683d2f24263ecc8
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
6d6523c51e68ddfd1140713ddd9cb279499e9f4f 24-Jul-2010 Joe Onorato <joeo@android.com> Make the phone app call into the power manager for a short timeout when a call ends and we are still
on the dialer screen.

Change-Id: Id80a8c50850a82b823c1ad31333f121d78781c01
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
c97fea097483c6e58c199e857b279ec92e64d8e3 16-Jul-2010 John Wang <johnwang@google.com> Use CallManager call list API.

Integrated CallManager to InCallScreen and CallCard.

Use active call list APIs of CallManager to replace
direct access foregroundCall, backgroundCall, and
ringingCall via Phone APIs.

Change-Id: I7ef85eba51647262924fe8042cf0bd3d09a2448a
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
9537852545bf97d9e4d903c1eb2b528adc22dbc8 02-Jul-2010 David Brown <dab@google.com> resolved conflicts for merge of 7ef43908 to master

Change-Id: I485f26e74aaed88638deadad72da3c1e766f2453
49c2f55d9544b3262b82ff956cc84c06cfed7f41 02-Jul-2010 David Brown <dab@google.com> Don't post the "incoming call" notification till we're ready.

Remove the call to NotificationMgr.updateInCallNotification() that was
happening directly from CallNotifier.onNewRingingConnection().

At that point we don't want to post a status bar notification (yet), since
we still need to run the caller-id query (and we may ultimately not even
ring at all, if the "send directly to voicemail" flag is set.)

(This is also why incoming calls would show up in the mini-me with a raw
phone number like "16505551212" rather than a contact name.)

We now update the notification -- and potentially launch the InCallScreen --
only from the showIncomingCall() method, which runs when the caller-id
query completes or times out.

Also add a bit more logging for the overall updateInCallNotification()
sequence. (Like before, only for userdebug or eng builds.)

Tested: incoming calls, both immersive and non-immersive. Also confirmed
the contact name (not raw phone number) now shows up in the mini-me.

Bug: 2768760
Change-Id: Iccbc88f224377d967945c260dc1416b5e44faaa0
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
50af50953c053c7822362a59d14bc32c20d873ee 01-Jul-2010 David Brown <dab@google.com> am 42e8d8de: am 7f63f08c: Launch incoming call UI via notification, not with startActivity()

Merge commit '42e8d8de0a8e31692c0f936f810bd1a6e5048b00'

* commit '42e8d8de0a8e31692c0f936f810bd1a6e5048b00':
Launch incoming call UI via notification, not with startActivity()
7f63f08c5c88d604abba447032ed42f4f972f3ef 25-Jun-2010 David Brown <dab@google.com> 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
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
0a275d514c9cb856d1ca5ae844e17ff030cc72a0 21-Jun-2010 Mike Lockwood <lockwood@android.com> am 7a25601a: am fcce8fd3: Merge "Do not force the screen on when the device becomes horizontal until the prox sensor is negative." into gingerbread

Merge commit '7a25601a4cb05efc00f2a7be986450fd32de0e53'

* commit '7a25601a4cb05efc00f2a7be986450fd32de0e53':
Do not force the screen on when the device becomes horizontal until the prox sensor is negative.
e1d48da94d860afa490ac59106432f8572183553 18-Jun-2010 Mike Lockwood <lockwood@android.com> Do not force the screen on when the device becomes horizontal until the prox sensor is negative.

This avoids turning the screen on if the user moves the phone
to a horizontal position while it is still next to her head.

BUG: 2636560

Change-Id: I9c0c9887a515f3b8c71acd92daf650e380e14c61
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
b632cabbaf60ca8fa8f23aafe13027303edfc6fc 22-May-2010 Martin Hibdon <mah@android.com> CDMA/GSM cleanup in InCallScreen and phoneApp

Replace some checks on phone type with
TelephonyCapabilties.supportsOtasp.
Also, let InCallScreen register for
all phone state messages, regardless of
phone type. If the underlying phone does
not suppor that message, then it simply
will never deliver it to the phoneApp.

Change-Id: Idc3abe894c58dd22131f0fe1f05c37dd0533577f
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4255de8ccf5680c75a4e0ade7b63981f33ec355a 22-May-2010 Martin Hibdon <mah@android.com> Cleanup CDMA and GSM differences in NotificationMgr

add two more policy methods to TelephonyCapabilities:
- supportsVoiceMessageCount()
- supportsNetworkSelection()

These are now used in NotificationMgr in place of
checking phone type.

Change-Id: Ie907aba18e664bad69c30bf7dafcae86ab766ef8
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
98cdd546ec6b9224863ecef92307496761067cc6 21-May-2010 David Brown <dab@google.com> Clean up "ECM == CDMA" assumptions.

Style nit: Fix capitalization of TelephonyCapabilities.supportsEcm().

Use supportsEcm() instead of "if (CDMA)" in a couple of places.

Change-Id: I257104b6917887af3bccf0eee22329b5f7191456
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
d3a8a3a138614071a7a8020e1579048c411abd78 21-May-2010 Wink Saville <wink@google.com> Cleanup OTASP use in OtaStartupReceiver.

Make isCdmaPhone private in OtaUtils.

Rename TelephonyCapabilities.supportsOTAProvisioning to
supportsOtasp.

Add PhoneApp.getPhone().

Change-Id: I2406864a7c4ce2e3f56d97d6dd678df2c22160cf
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
02139e8e22adbdd2f148243248d59bf492389c99 08-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: I989e47aa32998ecb13b42f7469fe469191c31e01
065752d0b858268bd1fe3208f64129638fcdf411 08-Apr-2010 Wink Saville <wink@google.com> Fix phone crash in BT MT call disconnect, enable mute/hold in GSM.

When phone is in global mode and acquires CDMA signal first, it will start an
OTA call. OTA variables get initiazed which are only valid in CDMA. On switching
to GSM/UMTS these variables are not cleared. MUTE/HOLD options in InCallMenu are
enabled/disabled based on these variables and hence MUTE/HOLD options are
disabled for normal GSM calls. Similarly while disconnecting the MT call in BT,
the OTA vars are checked and some processing is done which leads to phone crash.

To fix these issues, phone type is checked for CDMA before using OTA data. OTA
variables are cleaned up and call screen is cleaned up when there is a
radio technology change.

Change-Id: I7f2d3c8214e832c7423dedb4d0a3e4d27ec11068
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
47765dadd119fedd04f40f4474147b4ca0416e68 24-Mar-2010 David Ingram <davidi@google.com> Entering silent mode now cancels a currently active vibrate.
This fixes bug #2536406.

Change-Id: I36330d3398ee0f24e287ca58b92347ebbaeb33c0
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
893d0233193b2095293d890a9ad1c73b1dc6a9a2 05-Feb-2010 mah <mah@android.com> Fix bugs #2305101 and #1704011
Now when the user long presses the headset hook button on the wired headset,
the phone hangs up. Short press still toggles the mute state.
Also, the Phone app now captures and consumes any media key events
if a call is in progress, so pressing the next or previous button
will no longer start up the music player.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
fb6e861345db8c4213280c7f32aa4e2eac4b0d11 11-Feb-2010 Eric Laurent <elaurent@google.com> resolved conflicts for merge of 3cdfe2a5 to master
dc4b8d2f09ca215cc4a29513e56cd254d0c6d5f8 10-Feb-2010 Eric Laurent <elaurent@google.com> Fix issue 2413494: Add TTY support.

The TTY implementation is modified in order to operate on several platforms:
- The actual TTY mode configuration is moved from CallFeaturesSettings to PhoneApp.
CallFeaturesSettings only updates the user selected preferred TTY operating mode
in the Settings data base and broadcasts an intent indicating the preferred mode
change.
- Phone app processes this intent and only applies the user requested mode if a headset
is connected: The new TTY mode is indicated to both RIL and audio hardware.
- A consequence is that the TTY indication in the status bar is only shown if TTY mode is
not OFF AND the RIL has accepted the TTY configuration AND a device is connected.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
fb77637a64007dbd30359fa94c5e314333e3053d 06-Feb-2010 Eric Laurent <elaurent@google.com> am 37969f6c: am 2c8c6732: Merge "Partial fix for issue 2422322: [Passion#VZW] audio issues found with release CL24761." into eclair

Merge commit '37969f6cfad4298a40ad7be440e3b8fc6a874a21'

* commit '37969f6cfad4298a40ad7be440e3b8fc6a874a21':
Partial fix for issue 2422322: [Passion#VZW] audio issues found with release CL24761.
06376849cdac54b573be9204837b451ef8013cc6 05-Feb-2010 Eric Laurent <elaurent@google.com> Partial fix for issue 2422322: [Passion#VZW] audio issues found with release CL24761.

Re-apply HAC setting when phone app is started.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
027987172fa2033d10657a03cbce661d2546f0f4 05-Feb-2010 David Brown <dab@google.com> FIX 2172935 -- Descenders are cut off in the CallCard 'name' field

The fix: Add some leading between "name" and "number".

Also, some minor code cleanup (no functional changes) in PhoneApp.java and
NotificationMgr.java.

TESTED: on passion, confirmed:
- Descenders are completely visible (not clipped at all) when
label+number fields are not present. This was the original bug.
- When the label and number *are* present, the leading between the two
lines looks good (i.e. not too tight or too loose), regardless of
whether the name field contains characters with descenders.

BUG=2172935
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
9fd5e84fd6f5c2c5f488bf08d8dd9a2c0aab1370 02-Feb-2010 Wink Saville <wink@google.com> Cleanup comments, see bug 2401350.

Change-Id: Ic02eb907a663fe5e4a8991d42a5795199e228c2f
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
11aceea577d724e61056a646ef6ac8c6430613ee 08-Jan-2010 Nicolas Catania <niko@google.com> New CallLogAsync class to handle blocking log ops.

Currently only adding a call to the log is supported.
Uses AsyncTask to do the work in the background.
Got rid of the dedicated thread used in the current form.

Bug:2227429
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
03adaac30038029e90dbbb266bacb3f2abb32397 31-Dec-2009 Mike Lockwood <lockwood@android.com> Use accelerometer to augment proximity sensor logic

Do not force the screen off while in call and the device is being held
in a horizontal position.

Change-Id: I52ec82498970d55e7e8daf973860cf27ff01a2d4
Bug: 2175559

Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
6646249c7f8414cd1e4e05f211b2a752fae59ddd 16-Dec-2009 John Joseph <jnjoseph@quicinc.com> Initialize cdmaOtaInCallScreenUiState when radio technology is switched
to CDMA.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
85a88f4daa11c518aedd97028c3faa8d3e421167 16-Dec-2009 Mike Lockwood <lockwood@android.com> am 0672ed93: am 6a8928a7: Use the FLAG_DISMISS_KEYGUARD while we are in-call.

Merge commit '0672ed93d3c4d7f58205ee4c85a58a1640d650f1'

* commit '0672ed93d3c4d7f58205ee4c85a58a1640d650f1':
Use the FLAG_DISMISS_KEYGUARD while we are in-call.
6a8928a7265b6586b561e60ee93b23f5fa6f30ea 16-Dec-2009 Mike Lockwood <lockwood@android.com> Use the FLAG_DISMISS_KEYGUARD while we are in-call.

This is a better fix for bug b/2330359.
When we are actively in-call, we now set the FLAG_DISMISS_KEYGUARD flag
so the user can press Home to exit directly to the home screen.
But in the case of a declined or unanswered phone call we will drop into
the keyguard after the call terminates.

Change-Id: I6ee0759dbedeaf05e940558ed27f09f58c6582fa
Signed-off-by: Mike Lockwood <lockwood@android.com>
Bug: 2330359
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
2eba6fabd0bedaf2a59da643ce475586b62f0ff9 02-Oct-2009 Peng Zhu <w46254@motorola.com> Phone in a dock: turn on speaker

When the phone is in a dock and you call a contact, the speaker phone should
be turned on by default, as long as there is no other headset connected.

Bug: 2144974
Change-Id: I9e1fb94f3b149056b7f40c6df1230740628f6ef2
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
41f2b80631a4bdc78a772d100bd0c4715689e28c 02-Dec-2009 Mike Lockwood <lockwood@android.com> am 343259ed: Use FLAG_SHOW_WHEN_LOCKED window flag to disable the keyguard in the phone app.

Merge commit '343259ed73c21a4c9550fe4d7cf175385d87290a' into eclair-mr2

* commit '343259ed73c21a4c9550fe4d7cf175385d87290a':
Use FLAG_SHOW_WHEN_LOCKED window flag to disable the keyguard in the phone app.
343259ed73c21a4c9550fe4d7cf175385d87290a 01-Dec-2009 Mike Lockwood <lockwood@android.com> Use FLAG_SHOW_WHEN_LOCKED window flag to disable the keyguard in the phone app.

This replaces use of KeyguardManager.disableKeyguard() and reenableKeyguard().
Fixes bug b/2287830 "The phone is accessible for unauthorized user even when pattern lock is enabled"

Change-Id: I1a52144c16f0e6f2079c78241751ce632f1357e3
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
0ff0a8d3bc27947fb5e7b881fa28de75c3e40b3d 24-Nov-2009 Eric Laurent <elaurent@google.com> 2218799 Speakerphone switches back to wired Headset any time the in-call UI comes to the foreground

Handle speakerphone state update upon headset connection/disconnection event in PhoneApp only.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
5bcbca1162b1b462d15ebb4a5b2859a076d382e2 18-Nov-2009 Mike Lockwood <lockwood@android.com> Turn screen on immediately if proximity sensor is active and keyboard is opened or headset is attached.

Now we only wait for proximity sensor to go negative when the call is ended
Part of the fix for b/2243198 (Black screen lockup after ending call)

Change-Id: Ia0ecf7c4539be3ff24e3228b947c0a26def74a4c
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
7cef385a85853b4e3a3a61af4314aa008bb60dd8 16-Nov-2009 Mike Lockwood <lockwood@android.com> Add missing synchronization in requestWakeState() and wakeUpScreen()

Fixes a new occurance of bug b/2183174 (RuntimeException: WakeLock under-locked PhoneApp)

Change-Id: Ib80b6e36434a35ec814376013415a0ca0aa6b105
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
39a84144262f12df44861d746788b9de92259e4f 29-Oct-2009 Abhishek Pillai <pillai@motorola.com> CDMA 3-way calling and call-waiting UI changes

Changes in this patch have the following impact on calling UI for CDMA:

1) On originating a 3-way call, the "Dialing Party 2" is displayed for 3 seconds, after which
UI changes to generic "In call" screen.
Merge call icon in the upper left corner of the screen appears.
"Add call" option is available in the bottom Call control area.
2) On selecting "Merge" option
The "Merge" button changes to "Manage calls" button.
"Add call" option is available in the bottom Call control area.
3) On answering a call-waiting
The "Merge" button changes to "Manage calls" button
"Add call" option is available in the bottom Call control area.

Bug: 2226325
Change-Id: I4d116d1968a1fd5e0df9f14de1928df76c1803e0
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
0327eebefa8d277d8ce3226ebbe884310efa0bed 28-Oct-2009 Mike Lockwood <lockwood@android.com> Decouple status bar disabling from keyguard disabling.

We want to disable the keyguard while in call at all times, but the status bar
should be disabled only when the in-call UI is in the foreground.

Fixes bug b/2188593

Change-Id: I3f9e13338b1373b5f1458423b3b1c027f760e004
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
28644752309f4cf5ff68ddc8f4bbb66064f1bcef 23-Oct-2009 Mike Lockwood <lockwood@android.com> Fix race condition in PhoneApp.updateProximitySensorMode()

updateProximitySensorMode can be called from both the main thread and the
CallNotifier InCallTonePlayer at the same time, which was resulting in
WakeLock under-locked exceptions when disconnecting calls in automated tests.

Fixes bug b/2183174 (RuntimeException: WakeLock under-locked PhoneApp)

Change-Id: I6172a2c500ddeab2772aeb3d7534b3a4a4a1f09c
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4a5a966f0d43e04d336be1b94182346399a931f6 22-Oct-2009 Wink Saville <wink@google.com> Fix bug 2189519.

The speaker mode is disabled sometimes after OTASP.

Sometimes if an OTASP has occurred speaker mode will be set
to false when InCallScreen.onResume is called. This can happen
when the screen is turned off by the screen timeout or pressing
the power button. The bug is that initOtaState calls cleanOtaScreen
which calls setSpeaker(false) disabling speaker mode.

To reproduce:

1) Complete the OTASP sequence using *228
2) Make a call using Phone application
3) Press Speaker to enable speaker mode
4) Press power button to turn off screen
5) Press power button to turn on screen
6) Speaker mode will be disabled

Two fixes were tired, one was to remove the call to
cleanOtaScreen in initOtaState thus speaker mode will
not be reset. This was recently added as some defensive
programming in case there was a code path that cleanOtaScreen
was not called when completing an OTASP call and is
not strictly necessary.

In normal operation where an OTASP has not been done
or onCreate has been called otaUtils member variable
will be null and thus this change has no effect under
most useage cases.

The second solution was to change cleanOtaScreen to have
a disableSpeaker parameter. It was decided to use this
solution as it was a less risky change.

Return to activation when VKEY back is pressed.

The routine finish() is called when the VKEY back is
and it was a mistake to call setInCallScreenMode(UNDEFINED)
here as the Activity is not really finished. So a new
new routine, endInCallScreenSession has been created which is
called from internal routines and finished just moveTaskToBack
as it was before change Ic70cff84.

To reproduce:

1) Begin an OTASP call via *228
2) While the call is offhook and not complete press VKEY Back
3) Pull down the notification screen and select "Current call (xx:yy)"

Instead of going back to the activation InCallScreen you see a
regular in call screen, with this fix you are returned back
to the Activation screen

Removed activity-alias InCallScreenOtaActivation and added
InCallScreenShowActivation as a separate activity instead
of an alias.

An alias causes multiple instances of InCallScreen to be created.

To reproduce:

1) Factory Data Reset via Settings > Privacy
2) After booting
3) Press the Android
4) Press the Activate button <<< InCallScreen.onCreate is called
5) Press the VKEY back (not back button)
6) Press the Android
7) Press the Activate button <<< InCallScreen.onCreate is called
8) Press "1" on dial pad and complete setup wizard
9) Run Phone application from home screen
10) Dial *22899 <<< InCallScreen.onCreate is called
11) Press Next when complete

The solution was to use a new Activity InCallScreenShowActivation
and not an alias. This new trivial activity, with just an onCreate,
validates that the Intent is SHOW_ACTIVATION and then forwards
that Intent to InCallScreen. A second option was also tried which
was to export InCallScreen directly by adding the permission and
and the intent filter from the alias to InCallScreen. This worked
but it was felt the first option was better as it more clearly
shows that only the SHOW_ACTIVATION intent is exported.

Bug: 2189519
Change-Id: Ib20d326d7433c7baf951bd26f6f36fdb649d172e
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
1e8a3579f8e49fd1f1a078d6be6864a6a8bac306 03-Oct-2009 David Brown <dab@google.com> Reduce Phone App logging verbosity

- Update PhoneUtils.dumpCallState() to use a (much) more compact format
- Turn down verbosity of some other stuff that's not needed any more
- STOPSHIP cleanup: Remove a runtime exception that should just be a Log.e()

TESTED=GSM,CDMA.
BUG=2163789
DRNO=timsullivan
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
cec56587c1d3c90014848d7adfe817bef9c325ea 08-Oct-2009 Nick Pelly <npelly@google.com> Update application code for BluetoothAdapter.getDefaultAdapter().

Change-Id: I6163a1522678658b76a6eee0c96868a170638e35
DrNo: eastham
Bug: 2158765
Joke: What did Batman say to Robin before they got in the car? Robin, get in the car.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
e22715b7e908074c33140eded331b01946026d4e 01-Oct-2009 Mike Lockwood <lockwood@android.com> Move status bar disabling from KeyguardViewMediator to Phone app

This will allow us to disable the keyguard while docked without disabling the status bar.

Change-Id: I27b66ee55e9dc19b2ea298ce21e56bbeb2b5c88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
f6eb7893215a875863e1e0200e4aa3174137f76c 26-Sep-2009 Wink Saville <wink@google.com> Refactor Cdma OTASP InCallScreenState to be saved in PhoneApp via OtaUtils.

State that needs to outlive the life of an activity must reside
in an application. This fixes a bug which the caused the OTASP
to apparently not complete because if the Activity was recreated
then last OTASP state would be lost.

One way to see this occur is when in OTASP mode press the power
key to turn off the display which makes the InCallScreen Activity
a background task. When InCallScreen moves to the foreground it
is recreated and we lose state and there is no Next button displayed.

Bug: 2133182
Change-Id: Ife9753bf7689b48be4c5e78f95be95250d0a55b5
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
79b9f6e30e8402b103f1ec3ed9dda1fcad2b1cd5 22-Sep-2009 Tammo Spalink <tammo@google.com> Replace Phone.getPhoneName() calls with getPhoneType().

The latter is numeric, and hence allows some compiler protection
against typos.

Addresses issue:
http://buganizer/issue?id=1905415

Change-Id: If46c709fd7bfb817a2801d0200eac0ad8cf819e0
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
325cc2ced6f1ff5fb1708abfcc5e9c73ac0cd962 22-Sep-2009 David Brown <dab@google.com> Misc Phone app cleanup:

- Naming: Clean up the various "request UI update from some other thread"
APIs to all be named like "requestSomeKindOfUiUpdate()".

Also got rid of the way-too-generic postNewMessageDelay() method,
replaced it with specific methods for the 2 things that the OtaUtils
code actually needs to do.

- Added comments for one unclear case in OutgoingCallBroadcaster

- Remove no longer used IncomingCallDialWidget, and its assets. (It's now
in the framework as com.android.internal.widget.RotarySelector.)

- Added better javadoc comment for CallNotifier
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
87145810d08c0c89e3197c063a5a90d085e1a308 18-Sep-2009 Mike Lockwood <lockwood@android.com> Add a counter to disableKeyguard() and reenableKeyguard()

Change-Id: Icff7d9c5fc4f296c5288be33f51e44c4abe0900e
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
b8df8173e1a0ea8ba89cea984176216201c4d5e7 16-Sep-2009 Paul Berman <paul.berman@motorola.com> Correct the mute state for new incoming connections

When we receive a new incoming connection for CDMA, we want to make sure
that the audio is automatically unmuted (which is particularly important
when receiving a call-waiting call, but even for normal MT calls). Also
changed scope of an InCallScreen API to allow the onscreen widgets to be
updated when a wired headset is being used to answer/change mute state of
a call.

Bug: 2115195
Change-Id: I2921435e63bd42f285f09028779996f6d8de48de
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
5601d455864ffb08ff995ba3fc162580dc7b8998 17-Sep-2009 Mike Lockwood <lockwood@android.com> Disable keyguard while proximity sensor wake lock is held.

This replaces a change in PhoneWindowManager with the same purpose,
but was apparently causing a deadlock in the window manager service.

Change-Id: I1d10ba6af76bca6ad68f0fbb3c6a329cba66cf1e
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4a8cbde060e7876a5560346215c11078a9efc90e 14-Sep-2009 Eric Laurent <elaurent@google.com> Fix issue 2115199: Speaker key remains on after ending call when wired headset is unplugged.

The problem comes from the fact that when a headset is connected while on call and speaker phone is on, the speaker phone is automatically turned off, but the user requested state is saved by PhoneUtils to restore it when the headset is unplugged.
When the call is terminated, current code in CallNotifier.resetAudioStateAfterDisconnect() will not turn speaker off because the speaker state was already off. When the headset is unplugged later on, the headset disconnect event handler in PhoneApp will restore previous speaker state as saved in PhoneUtils and the speaker will be enabled.

The fix consists in always turning speaker off in CallNotifier.resetAudioStateAfterDisconnect(), regardless of actual speaker state. This makes sure that the speaker state as requested by user is reset by PhoneUtils when a call is terminated.
The headset disconnect event handler in PhoneApp is also modified to ignore headset connection events when the phone is not off hook.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
18e0a07cc700234f5a02fe10eee9b3ea10db58b3 10-Sep-2009 Nick Pelly <npelly@google.com> Update application for Bluetooth API changes.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
99d10538d840f0103c36dafa44db9f649ca884c8 09-Sep-2009 johnwang <johnwang@google.com> Add notification while selected network fails.

Provide a notification to user when the chosen network cannot be found. When tapping it the user could be taken to the settings to change the network selection.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
445c9030dc93750a8209ace086ea3820ee33f0b1 09-Sep-2009 Mike Lockwood <lockwood@android.com> Enable proximity sensor as soon as we begin a call rather than waiting for phone state to change.

Also moved some logging from debug to verbose

Change-Id: I3ae4b83daf7bcecab40370f4bb2cb009dca3fbbf
Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
425b8e3c9846d5e0e76466604b35cad8856d79de 02-Sep-2009 Eric Laurent <elaurent@google.com> Fix issue 2094757: Wired headset connection while in call disables speaker button but leaves speaker on.

The fix consists for one part in never disabling the speaker button: the user has the possibility to enable/disable the speaker even if a headset is connected.
When a headset is connected while the speaker is on, the speaker is automatically turned of but its current state is remembered so that it can be reapplied if the headset is disconnected.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
6bdc4d568f008ca476c744d52056dde3e8db27f8 22-Aug-2009 Abhishek Pillai <pillai@motorola.com> OTA fix for Home and Back key scenario

Issue: While on OTA call if user presses Home or Back key to return to home screen
and if OTA call ends while in background, OTA state was not getting updated
and was blocking next MO/MT call.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
039a8e51aa4a3ed27ad788dd5f1e043446517d92 25-Aug-2009 Mike Lockwood <lockwood@android.com> Use default screen timeout when in-call and the proximity sensor is in use.

Note: this does not include logic for bluetooth, speaker phone, etc.

Signed-off-by: Mike Lockwood <lockwood@android.com>
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
d3744ff481f7d96669740b015a39d7441208152b 20-Aug-2009 Abhishek Pillai <pillai@motorola.com> Disable proximity sensor for certain scenarios while on a call

PhoneApp.java Changes:
-> Added boolean member to track keyborad state
-> Added calls to updateProximitySensorMode() on receiving any wired headset,
keyboard show/hide, bluetooth event.
-> Modified updateProximitySensorMode() not to acquire PROXIMITY_SCREEN_OFF_WAKE_LOCK when:
1) If the audio is routed via Bluetooth
2) If a wired headset is connected
3) if the speaker is ON
4) If the slider is open(i.e. the hardkeyboard is *not* hidden)
-> Added new interface to provide "phone" object(required in changes in PhoneUtils.java)

PhoneUtils.java Changes:
-> Added call to updateProximitySensorMode() on changing speaker state
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
fa3fbeedf018e40f8d6696a382bbf316219cf4ae 18-Aug-2009 Reli Tal <reli.tal@motorola.com> Disable MMI registration for CDMA

Changes include:
1. PhoneApp.java: Do not register for MMI for CDMA
2. PhoneUtils.java: In placeCall() for CDMA, if connection object is NULL
return CALL_STATUS_FAILED
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
ee77dd0ec7fcbe315a34ef6625854a8affe31885 13-Aug-2009 David Brown <dab@google.com> In-call: don't turn off the screen while DIALING.

This fixes bug 2042741 ("Display blacks out prior to call being
connected"). The problem happens because the CDMA "origination" state is
sometimes very slow, especially with poor coverage, and and it's confusing
for the screen to go black before the call gets connected (or fails.)

The fix: force the screen on the entire time we're in the DIALING state,
just like we already do for the RINGING state.

Note we do *not* do this for the ALERTING state, since on GSM phones
sometimes an outgoing call can stay in the ALERTING state even after the
call gets connected. (This usually happens with automated voice systems.)

Also note there's a separate but related issue that we shouldn't be using
that 15-second timeout on prox sensor devices in the first place (see bug
2042741.) I plan to fix that too, but wanted to check this piece in first
since it's the "real" fix for this bug.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
f0f6d973992a988c0fc801ba80f826c8edf02c03 05-Aug-2009 David Brown <dab@google.com> Disable "touch lock overlay" when not needed.

Don't use the "touch lock overlay" feature on devices with a proximity
sensor.

Also, enable a bit of (temporary) verbose debugging to help track down a
bug where the prox sensor auto-lock feature stays on even after a call.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
73caead845b30580010a7502e4b7551d21dfa265 05-Aug-2009 Matthew Sun <w00278@motorola.com> Fix CDMA OTA call conflict with incoming call

On the OTA activation screen, OTA screen persists when receiving an incoming call
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
60877272381161201c6969dea501e683705d6e32 07-Aug-2009 w36256 <pillai@motorola.com> Fix for possible crash from "CDMA Bluetooth calling fixes" change
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
c9d9ed30aa547b79b81adc13a4d148a003b6ee62 30-Jul-2009 w36256 <pillai@motorola.com> CDMA Bluetooth calling fixes

BluetoothHandsfree.java Changes:
- Added CDMA_MAX_CONNECTIONS definition for CDMA CLCC connections update

- Added mCdmaIsSecondCallActive CDMA specific flag used in context with BT
devices having display capabilities to show which Caller is active.
This state might not be always true as in CDMA networks if a caller drops
off no update is provided to the Phone. This flag is just used as a toggle
to provide a update to the BT device to specify which caller is active.

- Modified BluetoothHandsfree() to initialize mCdmaIsSecondCallActive

- Modified updatePhoneState() to build CIEV response for:
1: 3 Way Call origination
2: Swaping between calls and merging two calls.

- Modified cdmaGetClccResult() for better readability

- Added CDMA specific interface to handle CLCC request
1: cdmaGetClccResult()
2: cdmaConnectionToClccEntry()

- Modified CLCC handler to call cdmaGetClccResult for CDMA phones

- Added new interface cdmaSwapSecondCallState() accessible to rest of the PhoneApp
to update the mCdmaIsSecondCallActive state.

- Modified CHLD handler to add capability to
1: Swap between calls after accepting a Call waiting and
2: Merge calls if on a Three-Way Call.
3: hangup a call on receiving CHLD=1 based on the phone state.

- Added cdmaSetSecondCallState() api to set second call state for CDMA

InCallScreen.java Changes:
- Modified internalSwapCalls() for calling cdmaSwapSecondCallState() if a BluetoothHandsfree
is connected.

- Modified handleCallKey() for calling internalSwapCalls() for CDMA.

PhoneApp.java Changes:
- Rearranged the creation and initialization of CdmaPhoneCallState before the BluetoothHandsfree creation.

PhoneUtils.java Changes:
- Added DBG statement for Merge calls in CDMA part.
- Modified answerCall() so as to set the second call state in Bluetooth as active
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
cd0189299f484dcbd51400b994daf585923e9e8d 30-Jul-2009 David Krause <david.krause@motorola.com> dynamic callsetting for umts, cdma and world phone
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4e879989bb6e23763802ceb128e8785f8f063ac0 28-Jul-2009 Robert Kowalski <r.kowalski@motorola.com> Modified UI for Emergency Callback Mode

Specific list of changes that are needed for the support of CDMA emergency
callback mode:
1. Removed Teleca's implementation of the ECM UI - it had limited functionality
2. Added service that inserts ongoing ECM notification in the status bar and updates countdown
info in the notification in 1sec intervals when phone enters ECM.
3. Added dialog box prompting to exit ECM when any application wants to prompt a user to exit
ECM or a user selects ongoing ECM notification. It responds to
ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS intent.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
ef93beade4291da0170b260d008628fd190b3b3c 30-Jul-2009 Wink Saville <wink@google.com> resolved conflicts for merge of 4e41cdf8 to master
4e41cdf8b65434a324f3e83be1095689ddabd153 29-Jul-2009 Wink Saville <wink@google.com> Fix bug 1890426 ERI Text widget appears for 3G devices(dream and Sapphire).

The EriTextWidgetProvider was added by Teleca/Qualcomm and it was done
in such a manner that the widget was available on GSM phones. As it turns
out this widget is not needed for CDMA phones so it is being removed.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
58de0c5d10bbf48f6316a12495cd1c176a11a6fe 29-Jul-2009 David Brown <dab@google.com> Phone: hook up proximity sensor support (bug 1781059).

On devices that have a proximity sensor, the Phone app now holds a
PROXIMITY_SCREEN_OFF_WAKE_LOCK (see Change 8681) any time the phone is
offhook, regardless of what app is in the foreground.

TESTED:
- On device #1 (with proximity sensor): screen turns off automatically
when I hold it up to my face. Verified this with both InCallScreen and
Home app in foreground.
- On device #2 (no proximity sensor): no new behavior.

Watch out: there are still some issues with how the PowerManager and the
lock screen interact while the PROXIMITY_SCREEN_OFF_WAKE_LOCK is held.
(In particular, if you go to some other app while a call is active, and
hold the phone up to your face, you'll be forced to unlock the device
*every* time you move the phone away from your face.)
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
7fe7f7e57aaa38290c37ab48867d34a279d198f3 21-Jul-2009 w00278 <w00278@motorola.com> CDMA OTA tone/vibrate and misc CDMA fixes

1. Remove OTA vibrate feature when OTA call ends.
2. Fix OTA issue: When All Sounds are in Silence Mode, OTA tone is still played.
3. Fix call waiting issue: Phone display does not Update after Incoming call is ignored.
4. Add TTY support: sync TTY settings from AP to BP NV after phone completes powerup.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
af684393e2c6d0c051b9d5a189c2cd1de2506831 16-Jul-2009 Wink Saville <wink@google.com> Rebase against latest changes.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
7957f63826136b71474d24f29954dfb03758003b 02-Jul-2009 David Brown <dab@google.com> resolved conflicts for merge of 87258b2b to master
87258b2b589c3afea4b89b840251012378e0d3b4 27-Jun-2009 David Brown <dab@google.com> Misc phone app code cleanup.

- remove unused String "finalTitle" in NotificationMgr (accidentally
included in one of the Moto changes)

- tweak bottom margin of one CallCard text field to avoid cutting off
descenders

- remove the unused PhoneUtils getCompactName() methods

- remove unused CallCard showCall* methods

- remove useless CallCard reset() method

- When the radio technology changes, have PhoneApp call a new InCallScreen
method that unregisters then re-registers for phone state events.
(Even though we don't have any devices yet that can switch on the fly
between GSM and CDMA, the code still ought to do this.)

- some minor debug logging cleanup

TESTED: ran basic telephony test cases.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
3800ac871d6548790ac6119bb68b9be0640af261 10-Jun-2009 David Krause <david.krause@motorola.com> CDMA lost call dialog and auto-retry feature
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
0fb2b4b8eff811fd3243aefdf536e7ba2b10f4e9 25-Jun-2009 Wink Saville <wink@google.com> CDMA UI - 3-way calling, call waiting, and display info records

This is dependent on 5338 to add the string resource
network_message.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
c39ff93aae5d2052dd0d2916dda17dfc10433a75 10-Jun-2009 jsh <jsh@google.com> Don't call Phone.getCdmaEriText on non-CDMA phone.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
691eae1fa5e1d4e2a9ae318f9dad5320ed5ec5c1 01-Jun-2009 Wink Saville <wink@google.com> TODO fixes from Teleca 090527
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
abeff00b5242e795baa8f5271525c5911f649993 22-May-2009 Wink Saville <wink@google.com> Minimal set of changes needed to run with the modified frameworks/base.

Another set of changes will be coming next week to complete this
merge.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
404edc94de563aef5fd5ba48be9114a970cb93bb 18-May-2009 Wink Saville <wink@google.com> Teleca 2b changes.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
947436a262178bf48b83f70974c56198fd922ba4 07-May-2009 Eric Laurent <elaurent@google.com> fix issue 1699014 remove obsolete SoundEffect class

Removed file SoundEffect.java and call to SoundEffect.init() from PhoneApp.onCreate()
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
09328f1bd9acf6b16a9cb79d7d9fa59d322ac6c2 21-Apr-2009 David Brown <dab@google.com> Fix bug 1793462 (part 1): add a resource to disable the "SIM network unlock" screen

Some networks may not have the concept of "unlocking a SIM", in which case
we should *not* show the "Sim network lock" screen even if we get an
EVENT_SIM_NETWORK_LOCKED message.

This change adds a boolean resource called ignore_sim_network_locked_events;
if true, the phone app will ignore EVENT_SIM_NETWORK_LOCKED events.
The default value is false, meaning that a EVENT_SIM_NETWORK_LOCKED event
will launch the IccNetworkDepersonalizationPanel, and prevent the user from
doing anything else until they enter a valid SIM network PIN (i.e. the
current behavior.)

To change this behavior, just set ignore_sim_network_locked_events to true
in a product-specific overlay file.

TESTED: faked an EVENT_SIM_NETWORK_LOCKED.
With ignore_sim_network_locked_events=false, the
IccNetworkDepersonalizationPanel came up normally.
With ignore_sim_network_locked_events=true, nothing happened.
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
a69de9f9a2e99fe08f0009bb218b95ed7985c575 02-Apr-2009 Wink Saville <> AI 144185: Integrate cdma into the main code base.

Automated import of CL 144185
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4472ce7a7e8568b4bb66098c4e4a2e71099167ac 25-Mar-2009 David Brown <> Automated import from //branches/donutburger/...@141035,141035
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
796c70c99bc39295bf685061056f06ab8949c742 25-Mar-2009 David Brown <> Automated import from //branches/donutburger/...@140614,140614
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4b8337277ec2e375c3536b97c40e6617a7b12990 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
4079f559beb3e414036056b4b33ad40de5e89c4a 13-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@138607
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
8bb467d9a1106dedd79e42166c7b6e9fc9a897a7 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
b16363f5fc191b769e88c364243e34b92eb22688 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
a412e78a7bba553a66503370b4c618db83528916 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
60a7029cd43c5bcef4a0d30390bdaaab43690c7c 20-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132569
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
826b9655d14b57d026515fdc7107589c895fc3f5 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
0918cc33174eebee7ae13449a76a2fe48f84d6dc 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
35e71bd6b86663caedf7318be14b904d1dace95b 22-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127436
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
56874fd9c8f91d484990a634396c809419f77547 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
bb1e6add51a1d0c4ed2ee63fd314503e8d62cdd8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/packages/apps/Phone/src/com/android/phone/PhoneApp.java
abc47110c17fa8e8cb6161bc045e87f31eeb7a1c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/packages/apps/Phone/src/com/android/phone/PhoneApp.java