History log of /packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f7b5c5c30d69dbaf5066ccfe2cf6a6abb57c2619 08-Aug-2015 Jay Shrauner <shrauner@google.com> DO NOT MERGE Null check CallList mapping in callbacks

In onPostDialWait, onDetailsChanged, and onConferenceableCallsChanged
callbacks, check to make sure the call list contains a mapping for the
Telecom Call object.

Bug:23031241
Change-Id: I2a9703d9c303fe0b2e320d811d21c71e5c429269
(cherry picked from commit 71a6555ac854303dc023c5e6c9a27c63ec956e3d)
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
e9c6c1ba7262093ff199df81d3e6b74dd83f1103 09-Jul-2015 Yorke Lee <yorkelee@google.com> Fix for glowpad not showing when dialing out + call waiting

The AnswerPresenter is responsible for initiating the creation
of the UI during a new incoming call, so there is no need
to do a null check on getUi in onIncomingCall.

Original fix was made in ag/651766 but seems to have been
lost in a series of merges.

Also, if the same instance of InCallPresenter is reused across
activity teardown and setups, this can result in mAnswerPresenter
getting lost from the set of incoming call listeners. To fix this,
always readd it at setup.

Bug: 22357229
Change-Id: Iecd80fa0187d756181ada7631c4246ad48f7131e
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
c4c4d9da1a9a786e4cd31dbbd95c5b150e8ff352 09-Jul-2015 Yorke Lee <yorkelee@google.com> Set task description for InCallActivity

Bug: 22275083
Change-Id: I0e955a2bca1af9d0059082872aaa2b7f4e6e8042
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
bcb912f3f7bcc792ad64cc1c2cf2df1dcde23603 29-Jun-2015 Yorke Lee <yorkelee@google.com> Merge "Don't hide InCallActivity from recents" into mnc-dev
9d3ef78a405f4831a54f70be6cdb20aa297a85a1 27-Feb-2015 Yorke Lee <yorkelee@google.com> Don't hide InCallActivity from recents

Show InCallActivity in recents (only during an active
call)

Bug: 17411752

Change-Id: I2c69c517f7278df78454bf69fce93880bc00997a
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
5e80e79d71972ad3e72fab4c8eb84b19ff6c280c 25-Jun-2015 Yorke Lee <yorkelee@google.com> Send a new notification for non-HUN notifications

Reusing a previously HUN for a non-incoming call notification
can lead to unexpected behavior with the NotificationManager.

Instead, keep track of what kind of notification we are currently
displaying, so that we can cancel the old HUN and display a new
notification if the need arises.

Also log a little less verbosely when creating notification actions.

Bug: 21926442
Change-Id: Id888b65aeecded6b9ca22f7cf36b265af3d93327
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
4d9be45a5df11b10a4fbb7d580f4199b5441345e 24-Jun-2015 Yorke Lee <yorkelee@google.com> Merge "Fix two animations when using Connection.setInitialized" into mnc-dev
c82efd736f6cc93af6e450a6bcb3541a61fcfd2c 23-Jun-2015 Yorke Lee <yorkelee@google.com> Don't wtf if second InCallActivity is set

Setting a second InCallActivity before destroying the first is
unexpected but not irrecoverable, so don't crash.

Bug: 21806586
Change-Id: I817041ff6bae900c3b9f225ec66fe223c877e68d
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
a2bb50839ee5b72d1c51c2825ca1ea19689779cb 20-Jun-2015 Yorke Lee <yorkelee@google.com> Fix two animations when using Connection.setInitialized

STATE_NEW has no meaning within InCallUI and can confuse
the internal logic. Treat it as STATE_CONNECTING for purposes
of state tracking.

Also, track whether the activity is visible rather than
whether it is the foreground activity (by tracking onStart/onStop
vs onResume/onPause). This fixes some unexpected UI transitions
when a dialog (e.g. wifi-calling dialog) shows up over the InCallUI.

Bug: 19217176
Change-Id: Ifa5953e27aa4ed777ed8798c628df1bdc96ed1eb
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
bc1584e509ac1ba5530d772f5eeb8b14b93f4002 28-May-2015 Santos Cordon <santoscordon@google.com> Add extras to Connections/Calls. (3/3)

Two major changes:
1) Add the notion of extras to a Connection. These extras will be
parceled through to InCallService as Call.getExtras()
2) The previously existing Call.getExtras() has been renamed to
getIntentExtras(). This name better describes the fact that these
particular extras are from the original CALL or INCOMING_CALL intents.

Change-Id: I85358827905abe3fd93b6b901dd78c86bb7d653c
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
97d3f981e5715af6a7e07b79ec67841fa3ccf06a 18-May-2015 Tyler Gunn <tgunn@google.com> Remove reliance on getDefaultDisplay() to determine screen rotation.

Replaced the calls to getWindowManager().getDefaultDisplay() with code
to determine the screen rotation angle based on the angle ranges.

Bug: 21208380
Change-Id: Ie91d38f9c0b4227bb2148a193c00339b5d8f4ce6
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
b586ec8d0896edf5f22099cb64f01cc046010b91 13-May-2015 Yorke Lee <yorkelee@google.com> More video related API fixes

android.telecom.Connection.VideoProvider
* onSetPauseImage takes Uri instead of String
* changeCallDataUsage -> setCallDataUsage
* add quality constants to changeVideoQuality() docs

android.telecom.InCallService.VideoCall
* setPauseImage takes Uri instea dof String

android.telecom.VideoProfile.VideoState
* Move constants to VideoProfile, prefix with STATE_

Bug: 21040387
Bug: 21066505
Change-Id: I764e72aced9d1e2d30d6d0cf0862100860d47c79
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
14b0add249fd1cfe2bbf7df8f6c272daea6db4c2 12-May-2015 Tyler Gunn <tgunn@google.com> Handle fullscreen mode toggle when tapping contact photo.

1. Moved the fullscreen mode state tracking and logic from
VideoCallPresenter to InCallPresenter (since it is more to do with the
entire InCall UI rather than just the video presenter).
2. Added click handler for the contact card to toggle fullscreen video
mode.

Bug: 20912417
Change-Id: If1656365f7fcfcee5a902c7f5d5d2862edee1661
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
243211275e5db724391c9d9c09ba32fb51da2667 17-Apr-2015 Andrew Lee <anwlee@google.com> Fix setting callback.

Bug: 20160491
Change-Id: I45c16b229eb521b91a4eab1394b5d2fbb75ec478
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
b22b0fc5da3a522b680a8dd3f86d0319e304d548 17-Apr-2015 Andrew Lee <anwlee@google.com> Bad conflict merge.

Bug: 20160491
Change-Id: I4f5b21eaaf5af5cab4b69be2e8c35e067165a0e3
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
2fd27356f8590095cf62a33ef67d5ea053ff5c3e 15-Apr-2015 Andrew Lee <anwlee@google.com> Rename CallListener to CallCallback.

To match API changes.

Bug: 20160491
Change-Id: I664cb0c3db7e0affc42179d467828246887069e8
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
0ea6ed91cc6956cf9497e506a9c63ef8380aaf42 15-Apr-2015 Santos Cordon <santoscordon@google.com> Remove usage of Phone.java in InCallService APIs.

Start using the direct methods of InCallService instead of using the
Phone object. InCallService methods represent the public API which is
what In-Call needs to compile against.

Bug: 20160495
Change-Id: I223347e239e5d5954b6118c7ba5befdaea2932a0
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
a3f7b82b805296703d4ea6254f4b6b84f8566aa0 15-Apr-2015 Vinit Deshpande <vinitd@google.com> am b04d61a..697f674 from mirror-m-wireless-internal-release

697f674 Fix orientation of preview surface when device rotated.
17de502 Merge "Always allow landscape mode if video call is the primary call" into m-wireless-dev
3692e77 Always allow landscape mode if video call is the primary call
a77ad8d Video calling landscape changes to match specs
cb74fc0 Merge "Simplify and rewire in-call buttons" into m-wireless-dev
ed0775d Simplify and rewire in-call buttons
80a1aad Hide incoming video until call is connected.
4f2a70b Merge "Cleanup AnswerFragment glowpad UI" into m-wireless-dev
6591f05 Merge "Initial refactoring for call buttons" into m-wireless-dev
c70a63c Initial refactoring for call buttons
4a63afd Hide end call button when video upgrade glowpad is showing
7ba13e9 Cleanup AnswerFragment glowpad UI
6b2b8df Show progress spinner when upgrading to video
c02794b Merge "Cleanup of Video Call pause functionality." into m-wireless-dev
bec5807 Standardize fragment layout names
bc65cbc Adding video call icon in secondary call info.
a77ad8ddb8c1688c1290773467ba454c9a225249 31-Mar-2015 Yorke Lee <yorkelee@google.com> Video calling landscape changes to match specs

* Call card has 4dp corners, and is 90% visible
* Margins for call card
* Call buttons are center aligned with end call button
* Remote surface is always center aligned, tapping call card slides
it in and out
* Status bar is black

Bug: 19668216
Change-Id: Ifea27faa5f8ff32f6be13e777ca70aa4d0c7727e
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
5468d9beac7c4e9efe3dfe25a74c87ff94a0f9ef 10-Apr-2015 Prerepa Viswanadham <dham@google.com> Merge commit '8bef461' into merge_work

Change-Id: I4cfea114e24c0b0671e99118316ad839dafbe400
376820a050b585024e10d7073b9c7c10f9ad1af6 03-Apr-2015 Jay Shrauner <shrauner@google.com> Fix NPE in handleAccountSelection

Null check mCallList

Bug:20064415
Change-Id: I4129eb4fcc8fe8b3eb2c719c544dec20ce51c56c
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
237af200f18b30ec229f02680ba54c7d0b25b829 27-Mar-2015 Yorke Lee <yorkelee@google.com> Fix some jank during shrink animation

* Prevent call updates while animation is running
* Create hardware layers for animating views before animation starts.
Alpha animations on the text elements require a hardware layer to
be built beforehand. Do this before the animation starts instead of after
the first frame is drawn.

Change-Id: I21a8a9096f36adc4688597f7469a2f05a1b5234c
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
8bef461247ec597f4fbbc604ee6e37fbdbc27d1e 18-Mar-2015 Rekha Kumar <rekhak@codeaurora.org> IMS-VT: Add support for video calls

IMS-VT: Upgrade downgrade and hold resume video calls
-Add support for upgrade downgrade video calls.
-Add support for hold resume and call waiting

IMS-VT: Fixed surface caching.
Fixed surface caching.

IMS-VT: Fixes InCallUI/Dialer crash when there is a VT call.
-Fixes InCallUI/Dialer crash when UE is rotated.
-Fixes InCallUI/Dialer crash when UE VoLTE call
is upgraded to VT.

Don't default to speaker phone for VT when speaker is disabled
- The adb property persist.radio.ims.audio.output indicates
whether speaker is disabled explicitly or not.
- If the above property is set to 1, don't enable speaker
phone by default in VT call.

IMS-VT: Fix CVO, surface and resource related issues.
- Send initial orientation to VT Service.
- Detect if Activity is being destroyed due to
confugration changes.
- Close the camera when InCallUI is pushed to background.
- Fix surface and VT service related issues when Fragment
and Presenter gets destroyed.

IMS-VT: Peer Resolution Feature Implementation
Change display video size based on peer resolution values
received from far end.

IMS-VT: Answering calls and upgrade requests as VT_TX and VT_RX
-Support for showing one way options for incoming upgrade request
-Fix issue where incoming video popup stays on screen even after
rejecting the request.
-Fix issue where incoming video popup stays on even after it has
been timed out by lower layers.
- Answer with different calltypes support.

Notify listeners of video quality changed event and display message on UI
- Add methods to notify listeners of type VideoEventListener
when video quality changes.
- Display a notification on the UI when video quality changes.

IMS-VT: Enable SIP based video multitasking.
Enable SIP based video multitasking.

IMS-VT: Call data usage feature
- Add support for call data usage callback
- Request for call data usage stats
- Log call data usage stats when IMS layers send update

Change-Id: I3f0dde0d82698085fa5d3f110720f10326eca768

IMS-VT: When TTY is ON, do not allow upgrade to VT call
When TTY mode is ON, the user SHOULD NOT be allowed to upgrade
a call from VOLTE to VT/VT-TX/VT-RX and an UI alert message will
be displayed explaining upgrade to VT call cannot be initiated.

IMS-VT: Add null check in call upgrade fail scenario
Crash is observed if call is ended in the interval wherein
handler is started to change state from REQUEST_FAILED to NO_REQUEST
after an interval. Added null check to change state only when call
exists

Propagate call substate message and display a notification on the UI

Ims: Reject upgrade request
1. If there is waiting call that is pending user action and
2. Before offering a waiting call

IMS-VT: Provide Player State indication to user.
Change to display "player started/stopped" toast message
whenever video starts/stops flowing

IMS-VT: Cleanup video views when not required
- Hide video views when not required.

Set display size as per current TextureView size
- Using TextureView height and width to calculate the display size.
- When ever there is change in display make sure that center the display.

IMS-VT: Exit VT call full screen mode.

If the call is no longer a VT call, then exit full screen mode

Change-Id: Ibc4ad8f9a4c38e467820028cdc2c7e68d65fd93c
CRs-Fixed: 760925

IMS-VT: Upgrade button fix
-Show upgrade/downgrade button only when call is in ACTIVE or
ONHOLD state

IMS-VT: Show correct call types during video pause
-In paused state, upgrade downgrade button does not list the
calltypes dropdown box
-Remove the paused bit to calculate call type during video paused
state.

IMS-VT: Move strings for video quality changed indication to resource files

IMS-VT: Clean up the showCallSubstateChanged API
- Make the code more readable.

IMS-VT: Set audio route to Speaker if current route is not bluetooth or headset
- We always set the audio route to speaker when we enter video mode.
- That is not correct. We should check if headset or bluetooth is
connected before defaulting to speaker.

IMS-VT: Turn speaker on/off for video calls based on call state changes
- Turn speaker on only when video call is active or dialing
- Switch back to the previous audio mode when there are no
more calls
- Make the previous audio mode static so that information
persists when the class is recreated (e.g. when UE is
rotated or multitasking happens)

IMS-VT: Use back camera instead of front camera for VT-TX
Set back camera for below cases
1) VOLTE to VT-TX
2) VT to VT-TX
3) Waiting call over Vt-TX call.

IMS-VT: Fix upgrade in call waiting scenarios
-When one VoLTE call is active and another VoLTE call is on hold
and upgrade button is hit, call ends. Fix this upgrade issue.

IMS-VT: Enter video mode when the primary video call changes
- We only enter video mode when we have any video state changes
- Enter video mode should also be called when the video call
changes. e.g. When we have a second call with the same video
state, we don't enter video mode which is incorrect. This
change fixes the issue

Add null check for InCallActivity in setInCallAllowsOrientationChange
- In some cases, this API is called when InCallActivity is null.
This causes a null pointer exception. Fix is to add a null check.

IMS-VT: Fix check for VOLTE call (AND to OR) when turning speaker on

IMS-VT: Check if call is video before enabling speaker in updateAudioMode
- Moved the video call check to the correct block where we
are enabling speaker

IMS-VT: Get call substate values correctly from the bit mask
- We were getting the call substate incorrectly as an int.
- Fixed that by getting it from the bit mask and using the
possible multiple values to display the call substate message.

IMS-VT: Keep the screen on during video calls.
UI screens times out after some time. During
video calls the screen must be kept on.

Change-Id: Icaa8662210b2dd323b29f4a472869a9ed1e01d00

IMS-VT: Open front facing camera for VT calls.
Open front facing camera for VT calls.

IMS-VT: Show manage conference button for Video Call
- We show the manage conference in a separate section for
VOLTE Calls.
- In the case of Video Call, the entire screen is occupied
by the far end video. So we display manage conference in
the overflow section of the call button fragment.

IMS-VT: Fix camera preview freeze for CONF video calls.
Fix camera preview freeze for CONF video calls.

IMS-VT: Move persist.radio.ims.audio.output to frameworks
Move persist.radio.ims.audio.output and related constants to
TelephonyProperties and PhoneConstants so that these can be accessed
from multiple git projects instead of redefining.

IMS-VT: Multiple video call fixes/optimizations.
-Current implementation clears primary call cache upon exiting
video mode. This will remove video call provider interface as
well, which will prevent further communication with the backend.
Don't clear primary call cache upon exiting video mode.
-Unregister call details listener when UI transitions into
unready state
-Send surface of incoming video to video call provider before
opening camera.

IMS: Cleanup all listener objects
Clean all stale listener objects to avoid the memory leak.

IMS: Fix speaker icon display issue in Call UI.
In few devices, InCall UI can show upto five buttons
in a row. Modify code to display at most five buttons
in a row. Show overflow menu if number of buttons is
more than five.

IMS-VT: Show glowpad view with accept/reject for most video upgrade cases
- Show the glowpad view with all options only when upgrading
from Volte to VT
- For all other cases, show the glowpad with accept/reject only

Change-Id: I41ecbda40db7c3c69428fc4272f8bfbd258e2980
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
3b0ab5241128ffc5488110a139e75b73a6a643d5 20-Mar-2015 Yorke Lee <yorkelee@google.com> Dynamically add/remove CallCardFragment

Only show the CallCardFragment when it is needed:

1) Incoming calls
2) After completion of circular reveal

Also make Calls class public so that it can be mocked with
Mockito

Change-Id: Ife7ed38bde25daf5a9fd0329ade5e794fa1bff65
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
c5722b4638a4807a3accbd85822eeb7c09973c44 19-Mar-2015 Andrew Lee <anwlee@google.com> Finish activity before reveal if not setup.

This seems to be happening because it tries to start the circular
reveal before the InCallPresenter has been configured to start a
call. This is an error case; finish the activity to try to resolve
it more gracefully.

Bug: 19719403
Change-Id: I83240b88b7015d8709d5b4cb56a099a68c9c15ca
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
3e1d355906746acdf26f7f909814eece3250b848 14-Mar-2015 Yorke Lee <yorkelee@google.com> Add VideoCallFragment back into InCallUI

Statically add VideoCallFragment into the view hierarchy
so that video calls can be shown in the UI.

Change-Id: I8afbaaa750371a4afe3946d268882f46f5ec7eb4
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
eca1bf5627b6b411df12276e59516fb7d3d80101 16-Mar-2015 Yorke Lee <yorkelee@google.com> Merge "Dynamically add AnswerFragment"
189e1efe04d1073a2abd100eb33b267435951ff3 09-Mar-2015 Yorke Lee <yorkelee@google.com> Dynamically add AnswerFragment

AnswerPresenter is a little tricky because it is in charge of
responding to incoming calls, so we want it to be alive and getting
onIncomingCall callbacks, but we don't want to create an instance
of AnswerFragment, which it is dependent on.

Move some dependencies around so that AnswerPresenter is created
by InCallPresenter instead. It registers for callbacks via InCallPresenter
instead of directly to CallList, and shows/hides the AnswerFragment via
InCallActivity.

Change-Id: I7026150988bf3cda762dda8a319f48e1af132361
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
a51093ba000fea1760ee26a0e55ced8a3182008c 10-Mar-2015 Yorke Lee <yorkelee@google.com> Merge "Flesh out more InCall tests"
d56fe0889e08343662f31fed332a8de72326140a 09-Mar-2015 Yorke Lee <yorkelee@google.com> Standardize naming of methods and fix a typo

Change-Id: I9b294ab9f483bb5e7af149ff6054cd8cd667adca
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
28754684be03a7d9429d4d5c9fe796d9f9927c2c 06-Mar-2015 Yorke Lee <yorkelee@google.com> Flesh out more InCall tests

Change-Id: If77e0767e9dbc65a9235dc1841f4d7298e4d39d5
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
b8f6c478612eb0e116b0866fb0e9465d000da05d 03-Mar-2015 Yorke Lee <yorkelee@google.com> Add tests for InCallPresenter

Add a bunch of end-to-end tests for InCallPresenter

Refactor InCallPresenter to be more dependency injection
friendly.

Add some test-only methods to make testing easier

Change-Id: I86b6eeff91d35bc3b5cb3de9262d8850673919b7
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
f4e6259684a6a20593689f6c9c06ac885b5f959c 05-Mar-2015 Yorke Lee <yorkelee@google.com> Merge "Remove CircularRevealActivity"
1e05f313eb939168116af054df2666c247ffb450 20-Feb-2015 Yorke Lee <yorkelee@google.com> Remove CircularRevealActivity

Replace CircularRevealActivity with a fragment that is tied to
the lifecycle of InCallActivity so that InCallActivity is the
only activity that is involved in the outgoing call process.

Simplify some of the intent creation logic that is used to launch
InCallActivity since we no longer need some of the flags that were
currently provided via various method overloads in
InCallPresenter.getAnimationIntent and getInCallIntent.

To further simplify this CL, a very rudimentary approach is taken to
track the state where we are starting up the UI but haven't received
a call from Telecom yet. This is done by a boolean flag set on the
InCallPresenter: mBoundAndWaitingForOutgoingCall.

Further changes will build upon and improve this.

Also set most elements inside primary_call_info.xml to
visibility: GONE by default to fix some animation jank where a
empty but not GONE view would continue to take up space.

Change-Id: Ic70857685680af6868d4b2153d942d73eef3ca56
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
6b7f5a8653edbe4090e39bfdf5f59e87b579ecfc 03-Mar-2015 Yorke Lee <yorkelee@google.com> Merge "Don't hide dialpad when disconnecting"
fa6f3adc1256c24f6736cb6b89e4c3b7cc6fb36f 03-Mar-2015 Yorke Lee <yorkelee@google.com> Standardize use of CallList in InCallPresenter

Always use mCallList instead of CallList.getInstance

Change-Id: Ied182f41a219066ac16cb9d6b7c828994440b522
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
45fdbcdfd1b4217aea6c1ca793661b567685939d 28-Feb-2015 Yorke Lee <yorkelee@google.com> Don't hide dialpad when disconnecting

This was originally needed because the dialpad was full screen
and would obscure the call status when ending the call.

This is no longer true with the L dialer and the dialpad
sliding animation when the call is ended looks weird.

Change-Id: Id78c2bef3470066b9e8e86bce0c6f431df5adde2
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
d86a3b8870919f95e1cdb6abcf7ec406d04e30d4 06-Jan-2015 Tyler Gunn <tgunn@google.com> Ensure sim color is shown on multi-sim devices when only one sim installed.

- Removed telecomManager check hasMultipleCallCapableAccounts() which would
only return 1 when a single sim is installed in a multisim phone.
- For single-sim devices, the Sim color is 0 (ie not selected) for the
Sim PhoneAccount, so the default behavior is to not show a sim color.

Bug: 18696518
Change-Id: I3968e181a41244092d2058fcf3dc8d627d12b412
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
211bccf2a3ad6c523930c1f159929678b9abc946 06-Jan-2015 Tyler Gunn <tgunn@google.com> Ensure sim color is shown on multi-sim devices when only one sim installed.

- Removed telecomManager check hasMultipleCallCapableAccounts() which would
only return 1 when a single sim is installed in a multisim phone.
- For single-sim devices, the Sim color is 0 (ie not selected) for the
Sim PhoneAccount, so the default behavior is to not show a sim color.

Bug: 18696518
Change-Id: I3968e181a41244092d2058fcf3dc8d627d12b412
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
3448dd02cf7682273b57f9157de7a8cc252c938c 19-Dec-2014 Yorke Lee <yorkelee@google.com> Merge "Show error dialog and end call for service not supported error" into lmp-mr1-dev
adfe810e4073992bc5d386f7f5600ce941c6c158 18-Dec-2014 Yorke Lee <yorkelee@google.com> Show error dialog and end call for service not supported error

Add another condition for which InCallActivity is launched so that
it can disconnect the call and show the error dialog.

Slight refactor of code that checks if a call has valid accounts so
that it can be shared.

Bug: 18781230
Change-Id: I83a9c4ee30f2a80168f3244f4929f70aa46b9d83
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
ddaed9152c17a83930ba4c8229b48cc1be676157 15-Dec-2014 Andrew Lee <anwlee@google.com> Use mInCallActivity if mContext is null.

It seems that attemptFinishActivity can occasionally be invoked when
mContext hasn't been set, via setActivity -> updateActivity ->
attemptFinishActivity, if there are NO_CALLS. In this case, fall back
on mInCallActivity as the context for clearing the display.

Bug: 18728214
Change-Id: I504af612f79e14787741b14b03170805f57c5699
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
6bd19a57611950ff85c0411b77ea5c051e7659a6 10-Dec-2014 Tyler Gunn <tgunn@google.com> Merge "No InCall UI visible after hiding conference manager." into lmp-mr1-dev
467cf770237c13d291a8fea59817d469909d5e60 10-Dec-2014 Tyler Gunn <tgunn@google.com> No InCall UI visible after hiding conference manager.

- The hide of the conference manager fragment and subsequent show of the
call card was being done inconsistently in a few places.
- Added a new method to hide/show the conference manager fragment and
the call card at the same time and replaced all references with this new
unified method.

Bug: 18699503
Change-Id: Ia6b80bdc29198627b1c46de72da432dc9523dc5e
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
948ae08cd309fff87a3ffc20e27eb917c6172978 10-Dec-2014 Yorke Lee <yorkelee@google.com> Show error dialogs in InCallUI

* Show InCallActivity for state IN_CALL as well to ensure that
error dialogs are shown
* Override pending transitions in CircularRevealActivity
to avoid animation jank when starting new call from launcher
* Don't override disconnect cause in onCallRemoved
* Track service unbinding and binding in InCallPresenter. An
unbound service means InCallActivity will not be shown.

Bug: 18675781

Change-Id: I6a34091dba13c730e5b69bfef50c2dda8224803a
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
9cb3912d5153097073234cd2345ac8063c80584d 05-Dec-2014 Yorke Lee <yorkelee@google.com> Add some logging to outgoing call flow

Bug: 18373617
Change-Id: If742fb29397c0d617721a54eaa05c098eeaf4280
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
c670713ab39f3490c90e9651d9e09bca695edd5c 24-Nov-2014 Yorke Lee <yorkelee@google.com> Improve outgoing call UI responsiveness

* Start InCallUI immediately once Telecom binds

* This CL is a bandaid for improving outgoing call responsiveness
in the MR1 timeframe. Refactoring InCallActivity into dynamically
added fragments and modifying its lifecycle with respect to
the call list is too risky.

* Add a lightweight activity (CircularRevealAnimationActivity)
that is used to display the circular reveal animation while
the significantly heavier InCallActivity is starting up

* Inside InCallServiceImpl.bind, start the reveal animation once
bind is called to avoid being blocked by any synchronous work in
Telecom.

* Refactor CallCardFragment.animateForNewOutgoingCall to
conditionally display the reveal animation, depending on
whether or not it was already displayed by the
CircularRevealAnimationActivity.

* Refactor the calculation of theme colors in InCallPresenter so that
the CircularRevealAnimationActivity can use those colors as well.

* Remove PENDING_OUTGOING from the list of call states that bring up
InCallUI.

Bug: 18373617
Bug: 18611753

Change-Id: I44c593373864ffc0ba9edebb88887177112d8b27
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
bf4c638976b6afd6a31926b0a9456bad18908ab8 03-Dec-2014 Yorke Lee <yorkelee@google.com> Merge "Add some more logging in InCallActivity and InCallPresenter" into lmp-mr1-dev
52c7d98be56b539725b7dc023711cb8656b715ae 03-Dec-2014 Yorke Lee <yorkelee@google.com> Add some more logging in InCallActivity and InCallPresenter

Bug: 18589036
Change-Id: Idac704fab2f31ecc908c1fe9ffe854dda0d2c34f
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
fcd44c7de3928918dc7e4e93c45f23db5801d201 02-Dec-2014 Nancy Chen <nancychen@google.com> Merge "Stop ringer when selecting "respond via text"." into lmp-mr1-dev
737f56760b617688aac7218021a5e615ed750810 13-Nov-2014 Ihab Awad <ihab@google.com> Telecom API updates (3/6)

Bug: 18292176
Change-Id: I5bcb1838a8423f15ebdf87c945ca91da460506f4
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
e6ff80bf362e937686eb597a6b41c4cc802d1172 26-Nov-2014 Nancy Chen <nancychen@google.com> Stop ringer when selecting "respond via text".

Ringer should stop while user is selecting response from "respond via
text" dialog.

Bug: 14656360
Change-Id: Ib73e6f10f1bda8363b65391a53e61dc5eb5d8d8d
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
a312c8e4b9a010407085dbaea69c10aacfb6945c 12-Nov-2014 Nancy Chen <nancychen@google.com> Use the highlight color instead of the tint color

The tint color of a phone account only refers to the color of the icon,
the highlight color is the general display color used for text,
backgrounds etc. We should use highlight color in InCallUI
Also minor color updates (lightening the "dark" version a little)

Bug: 18192071

Change-Id: I4078897bcb871326a4806f64355a67c5b267e9e6
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
3c9e3f45cba23b78a2a6a5bce8622db1764d808f 03-Nov-2014 Ihab Awad <ihab@google.com> Update PhoneAccount icon API (4/6)

Bug: 18291787

Change-Id: I38e63df22c6c1c77c6583493ff7169f8f0ec1f62
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
1f3e6538daaadef650d0ed53de13f4a038b7c84a 10-Nov-2014 Santos Cordon <santoscordon@google.com> Merge "Make add-call a global property of telecom. (4/4)" into lmp-mr1-dev
ba4e858e872fe446f3a7a17321289d025a40a847 08-Nov-2014 Santos Cordon <santoscordon@google.com> Make add-call a global property of telecom. (4/4)

ADD_CALL didn't make sense as a property of Connection or Call.
This changes it to be a global property instead.

Bug: 18285352
Change-Id: If43b30c54a6e6438933b19b8e3e628c9c02d3960
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
30fd6cd5b348e087568a0acd67fa0cf5549f8103 06-Nov-2014 Yorke Lee <yorkelee@google.com> Merge "Make setting and unsetting InCallPresenter.mInCallActivity more robust" into lmp-mr1-dev
c88b94ae3fa3bb5be2676ea6730c9784aa456f82 31-Oct-2014 Yorke Lee <yorkelee@google.com> Make setting and unsetting InCallPresenter.mInCallActivity more robust

It is not likely because InCallActivity is single instance, but protect
against InCallPresenter.setActivity(null) being called by a second instance
of InCallActivity while the first is still active.

Also minimize the time InCallPresenter spends on the state where
mInCallActivity is not null but it is also finishing.

Bug: 18150786
Change-Id: I51ea5765cbc72cd9d0144d3f6bb6f64a7c8f17cf
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
6c1e0d8809bc084bd081a23b48d09e095a615348 25-Oct-2014 Nancy Chen <nancychen@google.com> In Multi-SIM cases use the color of the SIM icon for InCallUI.

Set the color of the InCallUI to be the color of the SIM icon. In the
single SIM case, the background should be the default background.
* Added id to all call button backgrounds for color change
* Initialize color onResume for InCallActivity
* CallCardFragment/CallButtonFragment/DialpadFragment update their colors
* Added InCallUIMaterialColorMapUtils to extract color

Bug: 17971273
Change-Id: Ia247b153b57ffc8a5277d521c433ab0be6696cf6
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
d911ca5668ac3226465af6e2d76ee1b23956882a 23-Oct-2014 Evan Charlton <evanc@google.com> Merge "Allow for callers to subscribe to UI visibility" into lmp-mr1-dev
90b4ee033c8c0e9ceeaef0495ce8e1c205203aa5 22-Oct-2014 Nancy Chen <nancychen@google.com> InCallUI should report to Telecom when user sets default account via dialog

Modify the phoneAccountSelected method to support the option to set the
selected phone account as the default for outgoing phone calls.
Refactor InCallUI to support this feature.

Bug: 18078232
Change-Id: I4d90a58c896f036020cc7e3ea63b0493976042a4
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
bb5e244e4e5db71a2f0dc82aa7512207c378a376 20-Oct-2014 Evan Charlton <evanc@google.com> Allow for callers to subscribe to UI visibility

Expose a callback to allow callers to subscribe to changes of InCallUI's
visiblity.

Bug: 17736353
Change-Id: I5bf8fd52649358ec2f5aad16742e8186e6970571
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
63c85b7bbe13b6beea0355c5ee08790fa0284ce0 27-Sep-2014 Yorke Lee <yorkelee@google.com> Merge "Fix for not being able to return to InCallUI after accepting call via BT" into lmp-dev
554c76ad81167eecb900336b1b67a6cda7c6ee5b 27-Sep-2014 Yorke Lee <yorkelee@google.com> Fix for not being able to return to InCallUI after accepting call via BT

No longer require that the activity was previously started for
bringToForeground to work. That check seemed to be unnecessary and was
causing problems in the case when the UI hadn't been shown previously
(e.g. accepting a call via BT).

Tested with the following scenarios:
1) Accepting an incoming call HUN via finger
2) Returning to in-call screen via dialer after accepting HUN via BT
3) Returning to in-call screen via lock screen after accepting HUN via BT
4) Returning to in-call screen via notification after accepting HUn via BT
5) Accepting a full screen call via BT
6) Receiving call waiting
7) Adding a new call
8) Conference calls

Bug: 17654200
Change-Id: I4886c9a611a71fd04eeb154960293f6b1494b4b2
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
766c1e05845fa4d22b22acb32ad76d4b9e0eecab 26-Sep-2014 Ihab Awad <ihab@google.com> Preemptively update In-Call UI upon hangup

Updates the In-Call UI right away after hangup, to give the user
immediate feedback despite any disconnect delays that may exist in
the underlying layers.

Bug: 17480900
Change-Id: Iccd6a3d5bae9159284883df116822670557080f7
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
6ba7f9de0e50e1c49daee77a9706e4d442779b96 19-Sep-2014 Nancy Chen <nancychen@google.com> Display error dialog if no accounts are available to call from.

Immediately disconnect call if no accounts are passed from Telecom to
select from and no account is preset.

Bug: 17486242

Change-Id: Ia2e3f78a75783f6c838c0ed38fc68d8eb96cf7af
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
6bfbae405c734c3000320d5b2d65654b2caa8d4e 16-Sep-2014 Evan Charlton <evanc@google.com> Pass Context to InCall ObjectFactory

When calling InCall's ObjectFactory to create Intents, pass along the
current Context.

Bug: 17523252
Change-Id: I301df3c046d6e2bd5ddf4b3501a567cd23c0471f
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
e37fdac4a3090acd609eab754b221de500e5e7ef 16-Sep-2014 Evan Charlton <evanc@google.com> Merge "Switch InCallUI broadcast to be sticky" into lmp-dev
6cddf46812634fadc194830774110780f14e9462 13-Sep-2014 Tyler Gunn <tgunn@google.com> Renaming Telecomm to Telecom.

- Changing package from android.telecomm to android.telecom
- Changing package from com.android.telecomm to
com.android.server.telecomm.
- Renaming TelecommManager to TelecomManager.

Bug: 17364651
Change-Id: Ie5ae18f51baa5da2eb9793785ad0c9d83b6343d1
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
1561de71662964208a6a2161d51cbedcdfb57ce1 12-Sep-2014 Evan Charlton <evanc@google.com> Switch InCallUI broadcast to be sticky

Make that "InCall ready" broadcast sticky so that a listener which
is registered after the fact will still get the Intent.

Bug: 16988478
Change-Id: I9fa9c18bb39337464f0903448304134e1b933ad2
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
c8d497214bdb5cae99b2dee6f8226bb392e17f5d 11-Sep-2014 Evan Charlton <evanc@google.com> Merge "Send a broadcast when InCallUI is visible" into lmp-dev
fc48d607878f5abe156ff4145c5e32672d56e0b4 06-Sep-2014 Evan Charlton <evanc@google.com> Send a broadcast when InCallUI is visible

When InCallUI is visible, send a broadcast to let other apps know that
InCallUI is ready, and that it is now safe to draw UI.

Bug: 16988478
Change-Id: I1e9c3054e7c4f6d9809a4b13c3d1ff4516372143
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
f20aee70331db950bc069403ed3270a9df1ade59 08-Sep-2014 Ihab Awad <ihab@google.com> Fix incorrect call state in InCallPresenter

Bug: 15195036
Change-Id: Id33577c2d9215fc7eb274b163c755684931bbc34
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
52c30ebe11e132c5b00a15aabdf4a411355bf0f4 05-Sep-2014 Santos Cordon <santoscordon@google.com> Support CDMA conference calling.

Bug:17316859
Change from using GENERIC_CONFERENCE to a better MANAGE_CONFERENCE.

Change-Id: I0306aaa5cf4d35bf095d85db63b3d08395394645
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
33d2ba2cd5dc9639b7e85ecd5719b1875d5a2927 03-Sep-2014 Evan Charlton <evanc@google.com> Remove startActivityFromInCall API

This API no longer exists, so remove usages from InCall.

Bug: 16988478
Change-Id: Ib7b0493353262d9e795d78b78a98dd29e7a3f88e
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
d33f525aa93abbd9919528679a641291f3599944 20-Aug-2014 Nancy Chen <nancychen@google.com> Merge "Ensure the InCallUI does not reanimate when it already is shown." into lmp-dev
026b7c4db27f13e31bc6d98e99df27679bbffb05 09-Aug-2014 Nancy Chen <nancychen@google.com> Ensure the InCallUI does not reanimate when it already is shown.

Closely restrict the cases where the InCallUI is initialized.

Bug: 16898291
Change-Id: I78be81f140b8de24fdd4a27cdf0aa01c6a230e3a
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
4822c9429136fa3f225a4a7de96e7a8b19e01ff3 14-Aug-2014 Jay Shrauner <shrauner@google.com> Prevent ConcurrentModificationExceptions

Use sets backed by ConcurrentHashMaps instead of HashSets, and
CopyOnWriteArrayLists instead of ArrayLists, to prevent concurrent
exceptions if listeners try to remove themselves in callbacks while
iterating over the listeners.

Bug:16325026
Change-Id: Ia86f5cafa1d844aa7927df8ff9b02b5574bdde2b
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
4ceb26e183d633586e54630820aad09c1ee1eaef 14-Aug-2014 Jay Shrauner <shrauner@google.com> Prevent ConcurrentModificationExceptions

Switch from HashSets to Sets backed by ConcurrentHashMaps, and from
ArrayLists to CopyOnWriteArrayLists, to prevent exceptions when listeners
remove themselves in their callback while iterating through the set or list.

Bug:17030803
Change-Id: I99511e56d77526796679e2840437d0ea47062830
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
43f3e6e0760ea774e479935733d8a30b724457cd 08-Aug-2014 Ihab Awad <ihab@google.com> Final structural tweaks to Telecomm API (3/8)

Bug: 16416927
Bug: 16494880
Change-Id: If756941a5bdd25ff8ac633a56fe90c894d4a46a4
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
fe4982c221c8ee734afedc4d005661d9c6c1ac31 11-Aug-2014 Andrew Lee <anwlee@google.com> Add UI/functions to handle a video upgrade request.

+ Move session modification listener into the video call presenter.
+ Add new video accept/reject notification and full-screen UI.
+ Added "handling" which sends session modification response.

Bug: 16657915
Change-Id: I35ff04e383d4938cbfb4e76677730f82557fd918
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
f3d0654f2b6d77b7eef8bdcb4c39ee59e55017de 01-Aug-2014 Nancy Chen <nancychen@google.com> Reduce latency for InCallUI by adding an intermediate state

Add PENDING_OUTGOING as a state where the Telecomm information has not
yet returned but the UI has started. This allows the UI to immediately
begin initiating while Telecomm is waiting for the return of its
broadcast intent.

Bug: 16396523

Change-Id: Ia4b39689b89f9dea3aafae9e63ca0bfebb730501
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
c79d745deeda2cdd2b17122602a32812132885aa 30-Jul-2014 Santos Cordon <santoscordon@google.com> Add setConferenceable() API from ConnectionService to incall. (3/4)

Change-Id: I64fdca08d35f893d755e3b154543a261b1418343
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
85c114df8721b51b3b76cba9e7f9af825d05dc26 30-Jul-2014 Tyler Gunn <tgunn@google.com> Merge "Various changes." into lmp-dev
15a8e3cb2c01b59b5328a74e6c46144843103205 29-Jul-2014 Tyler Gunn <tgunn@google.com> Various changes.

1. Add InCallCameraManager to track active camera and manage camera
capabilities.
2. Use new camera manager in CallButtonPresenter instead of directly
accessing camera.
3. Implemented new camera setup flow between incall and telephony.
4. Landscape video call support (actively rotating while video is running
crashes InCall at the moment, but you can start it in portrait or
landscape fine). Includes ensuring layout works properly with RTL
locales.
5. Added progress spinner to CallCardFragment, useful to show when an
upgrade to video is pending.

Bug: 16012946
Change-Id: Iff33422eec3a92d8cbeb217f5be2f1c9c5f3e98d
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
43b78a98d11ef11114fc05df6a11d19d80be4a40 28-Jul-2014 Andrew Lee <anwlee@google.com> Update VideoCallProfile.VideoState references.

Bug: 16629892
Change-Id: I689b5ce4f41db109b003bd15f9cae5596a1c3819
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
2c702f7e3c774471c3ba5d557effa056a3b93b8f 22-Jul-2014 Tyler Gunn <tgunn@google.com> InCall UI VT changes

1. Adding CallVideoClientNotifier - used by InCallVideoClient to notify
interested listeners of events related to call video clients.
2. Change InCallVideoClient to use CallVideoClientNotifier to notify
listeners of incoming events.
3. Modify call details listener signature in InCallPresenter to include
the call for which the details changed.
4. Changing VideoCallPresenter to subscribe to call details changes,
so it will keep informed of changes to the video state of the call.

Bug: 16012946
Change-Id: I47aa2a8e8c852bb7e4ea2e83fa4a30b2697266e6
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
bfb48c19b99fb1e2412f9c722f6f55a967c45233 20-Jul-2014 Evan Charlton <evanc@google.com> Rename PhoneAccountMetadata to PhoneAccount

Change-Id: I4597b14110c1cee7f637ec125b839852ef0f34c4
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
2b22a35ee4c94adae074b1dd720fa8734d8461b7 20-Jul-2014 Evan Charlton <evanc@google.com> Rename PhoneAccount to PhoneAccountHandle

Change-Id: I2e97b348e6316a8b3ccc39fd81013e7f514a2889
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
cdf1e087f31e9be47f6489c1d99cbd2faae4625b 19-Jul-2014 Sailesh Nepal <sail@google.com> Merge "Handle Call.onStartActivity in InCallUI" into lmp-dev
2bd22389354789782f8fe7377f5f29a8c96f353a 17-Jul-2014 Andrew Lee <anwlee@google.com> Merge "Hook up answering as video call." into lmp-dev
9044e6296320cac2ee7c49465fdbb4a55912058a 15-Jul-2014 Andrew Lee <anwlee@google.com> Hook up answering as video call.

Pass in the desired video state when answering incoming video calls.

Bug: 16013878
Bug: 16015750
Change-Id: I7f46dadfdaa6ab256626d2e2e49971e114f506dd
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
3f4f33bc27ee1c9a12c9e55856b29079301c8a08 15-Jul-2014 Evan Charlton <evanc@google.com> Show message or call-back number in InCallUI

If the ConnectionService sets a call-back number or message, show
it in the in-call UI.

Bug: 13334257
Bug: 13334252

Change-Id: If7fde7c1ca6940cec8b7232469a22900c36dbb17
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
39a579d7af514eced760426ccedf84ef5d412b6f 17-Jul-2014 Sailesh Nepal <sail@google.com> Handle Call.onStartActivity in InCallUI

With this CL, the InCallUI does PendingIntent.send() when
Call.onStartActivity is called.

The hope is that by having InCalUI do this, we wont have a
problem where the InCallUI shows up infront of the dialog
created by the ConnectionService.

Change-Id: I65119a89c925a93467d1b27304ffec9b088b172f
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
4fbdb77e2abc34e0a5e2479ab3a7e71c1da4619d 09-Jul-2014 Nancy Chen <nancychen@google.com> Bring up dialog when an account is not set for the phone call

If an account default is not set, the incall ui will display a dialog to
allow the user to select an account for that particular call.

Bug: 16243703

Change-Id: Ic97c50d1116dd11ef900c4d20c6439683ed60e06
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
df06e232852a93d8238f3cacaab4d704de7e1216 12-Jul-2014 Ihab Awad <ihab@google.com> Implement new In-Call Service interface

Change-Id: Ic1eb6fc98e7f030885596c9c40f0ed4f0e34e28b
(cherry picked from commit c90543e6ef64b16b4c1bb240494152bc513f1e36)
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
5461c6a3b5090e6fab47076c5c0aeb2d1091606d 12-Jul-2014 Sailesh Nepal <sail@google.com> Misc Telecomm API changes: InCallUI

This CL hooks up the new APIs introduced in ag/501321 to the
InCallUI.

Change-Id: Iaffe0b84cea6003f2a9b9d8b30676743d2b236d4
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
8238f7b3ad3a71beb5d5961e0f94d0f7d2f4ff41 13-Jun-2014 Andrew Lee <anwlee@google.com> Merge "Delete unused methods."
f55854f27dda67f4da6144cdce0f01d3883988fe 13-Jun-2014 Andrew Lee <anwlee@google.com> Delete unused methods.

Change-Id: I67d42f3476c1d173bcdd778505c24cdf11fb2142
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
c9e18a969b97f6d110c1e1e84240d4828706c401 06-Jun-2014 Santos Cordon <santoscordon@google.com> Support conference calling. (4/4)

Bug: 15006702
Change-Id: I2764ea242f783ba478c9eae86618dd33e9fc792a
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
e306b703259683799ade122458f6b05a03949800 15-May-2014 Yorke Lee <yorkelee@google.com> First pass at Dialer to InCall transition

* Modify InCallActivity to perform an animation only on a new outgoing
call
* Add an animated scrim to call_card.xml that serves as the backdrop
of the full screen animated reveal
* Add resize animation
* Add circular reveal animation

Bug: 14820894

Change-Id: Iaa7e87e8a96dcd269e444a40eadac9d912625c01
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
b48e2280930b5ed0b04dd34d59dc5980b379a475 01-Apr-2014 Sailesh Nepal <sail@google.com> InCallUI: Use Telecomm CallCapabilites

Change-Id: I4236543da5648d2cf6ba525c8fc87a93000f50a7
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
6af0c61c32da6cfb400168ae3b0cf9f802abfed4 01-Apr-2014 Sailesh Nepal <sail@google.com> InCallUI - Use String IDs

Change-Id: Ibacb79658c146466d4f23bfcf7af0ebfb6e84dd0
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
fc22ba88566ef70e202128335231c367de6c52af 01-Apr-2014 Sailesh Nepal <sail@google.com> InCallUI - Use custom object to track Calls

This is the first step in completely moving away from Telephony.

This CL creates a custom Call object. Currently this is just a
copy of the telephony Call object. I'll update various fields
in individual CLs.

This CL also deletes the old Telephony services.

Bug: 13643568
Change-Id: Id1860a5df9706f2a7fddd40e70f0d693af7b04bd
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
4549f54d6799f549fa60cfe32949c640135480e4 09-Mar-2014 Sailesh Nepal <sail@google.com> Update InCallUI to use new Telecomm wrappers

Change-Id: I4ea05f03418302bf9eb904bda25844a9c52ea609
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
65ece2267bcdf2520241eb2cbec7c41200b46611 27-Feb-2014 Chris Wren <cwren@android.com> am d52e4929: add actions to the incoming call notification

* commit 'd52e4929af6e83e9fcb9ffef3f2f8c74a14e5aca':
add actions to the incoming call notification
d52e4929af6e83e9fcb9ffef3f2f8c74a14e5aca 25-Feb-2014 Chris Wren <cwren@android.com> add actions to the incoming call notification

Bug: 12605720
Change-Id: Ic3593da8693e9fd51e9d3d87aa3ede770aa598cc
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
d9adc4f7cae49347238c51ae10acde7ced78b29e 27-Feb-2014 Chris Wren <cwren@android.com> am 757f6653: Merge "only disable the system bars when inCallActivity is visible"

* commit '757f6653ce8686f5e853aa52bef7c77f6f110536':
only disable the system bars when inCallActivity is visible
23be40f480f324cdd685ab81cc6f248ac15f7732 27-Feb-2014 Chris Wren <cwren@android.com> am d8babfb9: Merge "always add full screen intent if a call is incoming"

* commit 'd8babfb9c75a48f28312146f4e8b7bf407333652':
always add full screen intent if a call is incoming
dd5a1c327227420bed2c911a57329ecd15d22a77 11-Feb-2014 Chris Wren <cwren@android.com> only disable the system bars when inCallActivity is visible

Change-Id: I1fb7c7dc403720d22520710155dbd0bf87f1a9fd
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
8fe89fd254473c569c5afe306634df586ad884d8 09-Dec-2013 Chris Wren <cwren@android.com> always add full screen intent if a call is incoming

Bug: 12605720
Change-Id: Ic1527d49661d1b6dfefed2de3620f5185c42d2de
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
e3a1a6245bd952cb6ad378fc136889c841ff3713 30-Jan-2014 Santos Cordon <santoscordon@google.com> OutgoingCalls(4/6) - Connecting the in-call disconnect button with Telecomm.

In-call app now sends appropriate disconnect command when user clicks
the end-call button.

Change-Id: I3da99827ce068566ca9e72d69c0375f0409a8014
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
166aa8d5aa00d343d83226e110ea0be4e1577ba9 29-Jan-2014 Santos Cordon <santoscordon@google.com> Add implementation of InCallService.

Adds a rudimentary implementation of IInCallService which supports
updating the UI with new outgoing calls and changing a call to active or
disconnected. The new service takes updates from Telecomm in the form of
CallInfo object or callInfo IDs and turns them into Call objects which
work with the existing CallList.

This CL does not have the changes to send commands back to Telecomm.

Change-Id: I985de1d7e0c7fbcbf242ce3f7a831335790d05b5
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
01563b04e60e34845ed57d8bb0e90ed01c8462ab 06-Dec-2013 Jay Shrauner <shrauner@google.com> Fix NPE in onPostDialCharWait

Handle calls to onPostDialCharWait when mInCallActivity is null.

Bug:12021342
Change-Id: Id8da6074f7bd3a0c0962dbaa9246c2de18e6e38b
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
35f767bc119403a8503984e1fea8a2cffaa4ea4c 15-Nov-2013 Chiao Cheng <chiaocheng@google.com> am cd29be4c: am fa7dd751: am 59517317: Merge "Add logic to dynamic dismiss keyguard." into klp-dev

* commit 'cd29be4cd60d6818b58a5927d452aaf52da43f6b':
Add logic to dynamic dismiss keyguard.
7f1d6342bd61a1e4e6b3198f3f7602b3cb378cce 15-Nov-2013 Santos Cordon <santoscordon@google.com> am 1d0e426e: am 78cbbb3f: am 0b2b20a9: Add incoming-during-hold case to fullscreen Notification code.

* commit '1d0e426ed2a22deffca8e24c463be7dc44bfe296':
Add incoming-during-hold case to fullscreen Notification code.
59517317d64761707b4d6d437ef49025d478eb17 15-Nov-2013 Chiao Cheng <chiaocheng@google.com> Merge "Add logic to dynamic dismiss keyguard." into klp-dev
225f91fe84d243ca1a4eabf0756639adb3c07bd4 14-Nov-2013 Chiao Cheng <chiaocheng@google.com> Add logic to dynamic dismiss keyguard.

If the user rejects or misses call, keyguard should not be dismissed. Check for
active or outgoing call.

Bug: 11580109
Change-Id: I1d83041d38ae60dd835bb967ae307791b605cf21
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
0b2b20a9dbecff3e0ac345b559caeaae779de03d 14-Nov-2013 Santos Cordon <santoscordon@google.com> Add incoming-during-hold case to fullscreen Notification code.

We use fullScreen notifications to bring up the incoming call screen
when it is not already being shown. Android framework ignores
fullScreen property if the same notification ID already exists. To fix
that we cancel the notification right before setting it to full screen.

We only used to do that for the CALL_WAITING state since that when it
mattered. However, if the current call is on hold, a new call comes in
as INCOMING instead of CALL_WAITING so this change adds that condition
as well.

Also fixed two other minor pieces of code which only checked INCOMING
and not CALL_WAITING. One for an icon, the other used to acquiring
location as part of the contact info (we only do so for incoming calls).

bug:11578080
Change-Id: Id010a6848cd1ca06d68e8405041565bc008a781e
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
86a4e32687a12f50f877a85a6764d6d03f55aff7 14-Nov-2013 Ihab Awad <ihab@google.com> am a7c0d02a: am bc52c444: am dba637fa: Merge "Show status bar notification on quick navigate from in-call UI" into klp-dev

* commit 'a7c0d02adf20bd8fe8f6e1dba87e842360d88aba':
Show status bar notification on quick navigate from in-call UI
e6d74148bc5f9cf586933429a67da0d46bc2e7a8 08-Nov-2013 Ihab Awad <ihab@google.com> Show status bar notification on quick navigate from in-call UI

Add logic to force the status bar notification of an outgoing call
to be displayed after a reasonable if the user, e.g. by pressing
Home, navigates away from the in-call UI before it has a chance
to show up.

Bug: 11341599
Change-Id: I13f86b940cc82097596634c7634cb5a8726e7d12
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
55e998472730cae27a82eed49cf7b020699b9286 19-Oct-2013 Christine Chen <christinech@google.com> Removing private dependencies in InCallUi

- This CL addresses most of the private API calls in InCallUi.
- This CL removed Android.mk as we are not building InCallUi.apk
separately anymore. Changes to make an unbundled app will go into
Dialer, GoogleDialer, and Contacts apps' makefiles.
- Separated CLs will add libphonenumber, libgeocoding, and util classes
for TelephonyManager and PhoneNumberUtils.
- The only thing left for InCallUi is to unbundle ProximitySensor.
Currently PowerManager's functions to deal with the proximity sensor
are all private. It will take a rather substaintial amount of work to
implement the proximity sensor functions ourselves (read proximity
sensor event values, ask the screen to turn on, etc.). So we should
rather push to get those functions into the public API.

Change-Id: I18b3c52adb41c6131c1eb3c07ce32ebd56d0cc59
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
ff40f157168bc54fec724350387670876ae382b1 15-Oct-2013 Christine Chen <christinech@google.com> Clears notification when there is no call.

Bug: 11083320
Change-Id: I05efd985114a78d87098a46b1c4c33ad5bcc5b94
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
64f6ec50ac061ccd063bfb1093e91600e4bac286 12-Oct-2013 Santos Cordon <santoscordon@google.com> Recalculate in-call state when activity ends.

Previoulsy we only calculated the in-call state on activity end if
TeleService was still connected. This was insufficient as transitions
to NO_CALLS (which happens generally when TeleService disconnects) may
rely on the recalculation after the activity ends in cases where the
app finish()es out of in-call's normal flow (like hitting back button
while the call is ending).

bug:11122139
Change-Id: I02eb8e7a977048d6f167c11a3f28e7aa629bdbe2
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
c8bde8e136be44d4a02cff6deb9441786c802321 08-Oct-2013 Santos Cordon <santoscordon@google.com> Turn screen on for call-waiting calls

Normal incoming calls get the screen powered on through the window
flag FLAG_TURN_SCREEN_ON. However, this only works when the window
is being created or sent to foreground. But for call-waiting cases where
the screen is off and in-call is in foreground, the screen remains off
since the flag is not triggered.

Solution is to look for the case where the screen is off and the new
incoming call is a call-waiting call...and in that case finish() the
activity and create it again. Since the screen is off, there is no
concern over jank from bouncing the activity.

bug:11031245
Change-Id: Ic0c206d57c9d1ce5beebff49a07c7877f6d1a423
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
442af5cf9d3946e4927ef2ab52e0600a1871f11e 30-Sep-2013 Santos Cordon <santoscordon@google.com> Protect hideDialpad() code with isActivityStarted() check.

Could hit NPE if the activity was not up or already brought down like
with Fixed Dial Number where a disconnect comes almost immediately after
dialing out.

bug:10995838
Change-Id: I150d1ca135702814ac6d78722c3ad15ae5273c83
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
428e848d50a2a34f4815f31786c0d2af1a4b611c 26-Sep-2013 Yorke Lee <yorkelee@google.com> Show call ended if call disconnects while dialpad is showing

Bug: 10899209
Change-Id: Iefdef1890f8968fda57eb5f3286b97228906b596
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
d72076f2561ec8099fe11983d5995c65325847b3 24-Sep-2013 Santos Cordon <santoscordon@google.com> Check for null during notification hangup Intent receipt.

bug:10863336
Change-Id: I775f1855d07cc4f6591ceb51a0f90754ecc833ad
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
7fff6a25f65e0949c8e2682d6470cf065e76a63f 21-Sep-2013 Santos Cordon <santoscordon@google.com> Add generic error code dialogs for failed calls.

This change listens for disconnected calls and if the disconnection
cause matches a set of predefined causes, we show a dialog to the user.

New dialog messages:
- You can\'t make outgoing calls while call barring is on.
- All calls are restricted by access control.
- Emergency calls are restricted by access control.
- Normal calls are restricted by access control.
- Outgoing calls are restricted by FDN.

Several changes were necessary to support this:
1) Dialog code (InCallActivity.java)
2) Notifications for a new disconnect (CallList.java)
- previously we sent a large update for ondisconnect, now we just
send the notice for that particular call. InCallPresenter was
written so that the same thing that used to happen still happens.
3) Check if we need to show a disconnect dialog when the UI comes up.
- I found that FDN disconnection happens so quickly that the
disconnect came before the UI was up, so this was necessary.
(InCallPresenter.setActivity())
4) CallCard should be initialized with disconnecting/disconnecting calls.
- Call Card presenter intializes itself when it starts up using live
calls, but as with the FDN case above, a disconnected call should be
used if no live calls exist. (CallList.getFirstCall())
5) If a dialog is up while an incoming call comes up, dismiss it
automatically so that users can see incoming UI.
- (InCallPresenter.startOrFinishUi())
6) Keep the UI up as long as there is a dialog for the incoming call.
- Previously, UI would come down once all calls were shut down but
in the case of present dialogs, we want it to stay up.
(InCallActivity.finish())
- When the dialog is dismissed, check if we want to tear down UI.
(InCallActivity.onDialogDismissed())
7) Only tear down UI once we are in the NO_CALL state.
- We used to tear down when the activity was null (closed) and the
service was disconnected. This is problematic because a call that
immediately disconnects (like FDN errors) would shut down the service
before the UI had a chance to come up. We added a check to the
conditional for the state NO_CALL before shutting down.
(InCallPresenter.attemptCleanup()).

bug: 10680210
Change-Id: I1fd33dd53dc0eec5a02b7a940cfd018cec3d20c0
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
672b16d0620d033e10fab30ccd70f5dd23e823b7 19-Sep-2013 Santos Cordon <santoscordon@google.com> Add "retrying" text for CDMA redial calls.

listening for new REDIALING state.

bug:10824223
Change-Id: I2b6f2f74713197902c93deca203f4f136732f7a2
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
46a86660c3f8150bf63d89ec3ce37396d4ac1858 19-Sep-2013 Santos Cordon <santoscordon@google.com> Merge "Tear down proximity sensors when no longer in use." into klp-dev
f6fb19c1e4ac91a325f0f2608f874ce18b33a7f9 19-Sep-2013 Santos Cordon <santoscordon@google.com> Merge "Add support for hardware CALL button." into klp-dev
db4054e7c14191285cd23032b6a59f4432eb93cd 19-Sep-2013 Christine Chen <christinech@google.com> Merge "Adds DISCONNECTING state support." into klp-dev
972946d1abbba1e72e292c3e7dcab59df94af0fc 19-Sep-2013 Yorke Lee <yorkelee@google.com> Merge "Hide home and back buttons during incoming call" into klp-dev
f9080e1eeaf03d90b955133ba28485291491cbd9 19-Sep-2013 Santos Cordon <santoscordon@google.com> Tear down proximity sensors when no longer in use.

bug:10493709
Change-Id: I76e1940472aa503f1fe8c4a73c82852f8670b61c
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
14ba5d960414ea8fc69d644f1ecca7872d7ffa03 19-Sep-2013 Santos Cordon <santoscordon@google.com> Add support for hardware CALL button.

bug:10809304
Change-Id: I8b6c5e27a37624f38df965e2ad001703cf558708
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
ecabb6923e6587e0f0ca98cc895be7d99e694015 19-Sep-2013 Christine Chen <christinech@google.com> Adds DISCONNECTING state support.

When user ends a call locally, we first set the call state to
DISCONNECTING and show "Hanging up" as the status. We then show the
"Call ended" status when the telephony layer comes back with the
DISCONNECTED state for the call.

Bug: 10808537
Change-Id: Iad5eda6ee34e2f04a861977ac1a2453a52081d27
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
da6476c15e902e10c33adda5d5687322aa264af7 19-Sep-2013 Yorke Lee <yorkelee@google.com> Hide home and back buttons during incoming call

Bug: 10692603
Change-Id: I9bacaf39d926b9004778b33c33420a51dde1332f
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
7fee23beeb764c116f6d0c288ad3f27188025d31 19-Sep-2013 Santos Cordon <santoscordon@google.com> Merge "Allow bringToForeground to work even after activity is destroyed" into klp-dev
046386ed5ae615c8d83bb5a9eccc15e5f79b61cc 18-Sep-2013 Christine Chen <christinech@google.com> Moves some TODO(klp) to TODO

Bug: 10605909
Change-Id: I6c961494f5470e6e96dd50ccec49bbc8c5862285
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
120c3547957d69fa938de4510078b99c381e5153 16-Sep-2013 Santos Cordon <santoscordon@google.com> Allow bringToForeground to work even after activity is destroyed

bug:10550460
Change-Id: I63d8b13c423c198603768e17a1ef15bbbb4c7705
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
2ce872d6f7dd8a7eb0275b4195336f779972f698 13-Sep-2013 Makoto Onuki <omakoto@google.com> b/10699042 show dialpad when connects to voice mail.

Also now "Use touch tone keypad" in the dialer works, and
it automatically un-holds if there's only once call and it's
on hold. (which was a regression too.)

Change-Id: Id8eeb2737ffa2223acfbf9a8a30d957599c9db36
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
6b381d25a7ebd048a26a5f115e920cea27507603 16-Sep-2013 Santos Cordon <santoscordon@google.com> Merge "CallCardPresenter should listen for Call Waiting" into klp-dev
1ee82fcea79556c90eec0f55ea2e2ab5c6dfadda 16-Sep-2013 Santos Cordon <santoscordon@google.com> CallCardPresenter should listen for Call Waiting

Regression from recent change to only update UI with incoming calls
using the onIncomingCall callback. The CallCardPresenter wasn't
listening for that specific change so call-waiting calls were not
displaying "incoming call" label.

Change-Id: I6a732585509c1e27e7ecf5805cb17ea8e7f043ed
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
4eae63d139bca9f9dc6e2d42beef918b43490e79 16-Sep-2013 Santos Cordon <santoscordon@google.com> Shut down if UI starts after service is disconnected.

Additionally, this change can cause multiple calls to attemptToCleanup()
so the change adds appropriate null checks.

bug:10767438
Change-Id: Ieeb4a00653a6b3bcacca105d649ca9efd8ae8d44
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
14dbc3f0ca3a7998c9c5d28aba637487724f529f 14-Sep-2013 Santos Cordon <santoscordon@google.com> Fix UI lag when calling a contact with a photo.

Related fixes unrelated to latency problem:
a. Update StatusBarNotifier with new changes to CallerInfoCache.
b. Outgoing JANK fix in notifier needed to know if the activity
was previously started, not just if it was finished. (b/10734874)
c. Consolidate places where we use the Intent.

Several improvements to speed up startUp time from most egregious to
least:
1. In InCallPresenter, statusBarNotifier wasn't unlistening to
incoming call changes which kept orphaned instances still listening and
calling into contactInfoCache. ContactInfoCache was subsequently calling
into many notifiers which did heavy image parcelling work.
- Clear incomingCallListeners on tear down.
2. StatusBarNotifier was getting called directly from InCallPresenter &
onIncomingCall() callbacks. onIncomingCall callback was unnecessary and
caused extra work.
- Fix is to stop listening to incoming calls. Status bar notifier gets
called directly by InCallPresenter in startAndFinish() so listening
to incoming was redundant.
3. Make ContactInfoCache listeners list a Set to avoid duplicate
entries and reduce callback execution.

bug:10712670
bug:10734874

Change-Id: Ic8d50b1d9ce336ffe3a5191abe1c9db32365eee6
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
c5991d5b374cec8e0fd07329711226d33bcc9a50 09-Sep-2013 Santos Cordon <santoscordon@google.com> Merge "Improve lifecycle ordering for InCallUI" into klp-dev
b0d08a16da088e01f416f52a7b74ee9630c1493a 05-Sep-2013 Santos Cordon <santoscordon@google.com> Improve lifecycle ordering for InCallUI

This CL rearranges startup and teardown of InCallUI to reduce the number
of race conditions resulting in runtime exceptions and app crashes.

At a high level this CL fixes the following:
- TeleService should be able to unbind and rebind at any time without
causing problems in the UI. (Fixes to InCallPresenter)
- On weird occasions we were seeing secondary UIs pop up if we
rebound while the older UI was still up and one of the UIs would be
orphaned on the foreground.
- call notifications can be sent during (1) activity startup, (2)
activity lifetime, (3) activity destruction, (4) no activity...and
nothing should crash.
- Lots of crashes when notifications came during destruction and
startup. (Fixed setup in InCallActivity + presenters, and
startup/teardown ordering in InCallPresenter)

Details:
(1) InCallPresenter handed out instances of member classes to the UI
classes, but upon unbinding and rebinding, the classes were
recreated. This meant that the activity which was potentially still up
had stale versions of AudioModeProvider and ProximitySensor.
- Classes created/used by CallHandlerService are now singletons so that
they do not change from one bind to the other. If the service tries
to initialize InCallPresenter while the activity is still up (and so
we haven't yet torn down) we reuse the reuse the previous
initialization since there is no need to recreate them, and classes
in the Activity dont ever become stale.
(2) We were recreating new copies of InCallActivity on updates that
occur while tearing down the previous activity. This caused weird
errors where second emptier activities were up after all calls ended.
- Solution to this was to ignore all updates while we are finishing the
activity. When the activity is finally finished, we check if we
should bring up a new activity in case some update came while we were
finishing.
(3) We set listeners on presenters from a parent class that wasn't aware
of UI transitions.
- All Presenters are not responsible for setting and unsetting their
listeners. This allows them to unset them before their UI goes away.

+ renamed HIDDEN to NO_CALLS as hidden was confusing to developers
which associated the term with foreground/backgroundness of the app.
+ Improved some logging

bug:10573125

Change-Id: I2d1af6a6e972b3b3bd93af839054e879f0b74b4f
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
2fa6baa2e70e26f6c6f3681e804c33677384fbd7 07-Sep-2013 Chiao Cheng <chiaocheng@google.com> Port dtmf post dial wait feature.

Bug: 10459289
Change-Id: Iee799bd72aac9bb86e2f414e68f2643d8ba1c563
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
518519c83063f94fe5010ed5075b38a066e794ec 30-Aug-2013 Santos Cordon <santoscordon@google.com> Merge "Allow new call waiting calls to pop up when not in foreground." into klp-dev
179bcc00d5140f577f009e296c965bdfebfb4763 29-Aug-2013 Santos Cordon <santoscordon@google.com> Allow new call waiting calls to pop up when not in foreground.

Added some additional debug logging.
Allow full-screen startup sequence to happen with any transition
to IN_CALL state, not just from a HIDDEN state.
(e.g., from IN_CALL -> INCOMING)

And for the grand finale, uncomment the code that would have made
this work from the beginning. :P

bug:10396126
Change-Id: Id34805941b75b28d4876153bb1bf0305142fc4cd
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
0d9cfa48c3bf44d800e280ec6bf1d8a226fab7ca 29-Aug-2013 Santos Cordon <santoscordon@google.com> Ensure that OUTGOING calls bring up the notification dialog.

Change-Id: I32b3ed77dae7f839036ea24ae09b9a9d0e87b746
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
11b099d632e87965c4240b1a1829989d4e2e2193 28-Aug-2013 Santos Cordon <santoscordon@google.com> Adding implementation for bringToForeground.

Add implementation for CallHandlerService's new method, bring to
foreground. When called, the incallui determines if we have an active
call and the activity is not currently in the foreground. If both those
are true, then we bring up the existing InCallUI.

bug:10313347
Change-Id: Ic70cd7f1c5701992580626458c8d459a8ece7d9c
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
7791690df4406bd51e3d3b0c256a4d6664951141 28-Aug-2013 Chiao Cheng <chiaocheng@google.com> Merge "Major fixes for in call to work with reverse number lookup." into klp-dev
8b6c8d0dbfba6eabe3d835f8cdcec8a13e253d0c 23-Aug-2013 Chiao Cheng <chiaocheng@google.com> Major fixes for in call to work with reverse number lookup.

- Separated caller info data into CallIdentification and switch callbacks to use
it where call state is un-necessary.
- Changed mCallList.update() method to be onIncoming().
- Catch all exceptions from service methods so errors do not vanish.
- Fixed bind failure cases which led to DeadObjectException.
- Changed local contact lookup to only occur for incoming calls.
- Fixed CallCardPresenter to start contact search upon isntantiation instead of
waiting for next call update.
- Convert ContactInfoCache to singleton to avoid race condition where it's not
initialized.
- Handle cases where primary call may be null when we find a contact.
- Fixed race conditions in CallButtonPresenter where audio mode is being set
before ui is ready.
- Fixed race condition in AnswerPresenter where state change was being called
before ui is ready.
- Changes to CallCardPresenter to support lookup for conference calls.

Bug: 10413515
Bug: 10390984

Change-Id: I9fc4f2f35e8f5aad33c301b3c5c93132634cb63c
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
2c9fa78fea8fad3190ebdd1e2e1b789a2ceb8cf2 28-Aug-2013 Santos Cordon <santoscordon@google.com> Remove extra code which set Activity to null.

Activity is set to null with setActivity() called from onDestroy and
thise additional set (that this CL removes) was causing a precondition
failure due to a double-teardown.

bug:10516078
Change-Id: I501b36173f24f2a4fdf38ecc38239ea81cc66e55
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
759c018d108551b0d2dac1294e7cddf55ea6edf1 24-Aug-2013 Santos Cordon <santoscordon@google.com> Adding more public logging to InCallUI

bug: 10461651
Change-Id: Ib79717530911d30478a9c00ad154423f0aca670d
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
1a7f2bcab2d2023f2ee4cfb0bc57bc265b5aab87 21-Aug-2013 Chiao Cheng <chiaocheng@google.com> Protect all logging statements.

- Rename global logger so it can be a drop in replacement for framework log
class.
- Remove imports of android.util.Log

Bug: 10411948
Change-Id: I377625263b16c4f9408c79d5c533a1810fa6cde7
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
3c2a439eb67ec6fb89daf1914ab3ce05e8aaa428 21-Aug-2013 Santos Cordon <santoscordon@google.com> Adding proximity sensor code to in-call UI.

Many of these changes are verbatim code copies from what used to exist
in services/Telephony. The rest of them are straight logic copies that
should do the exact same things.

New class ProximitySensor manages the proximity behavior. It receives
device state from InCallPresenter, AudioModeProvider, CallButtonPresenter,
and AcceleromterListener, the last of which is a transplanted class from
services/Telephony.

ProximitySensor listens for the following events:
1. Change in the call state
2. Change in the audio mode
3. Change in the device orientation (from AccelerometerListener)
4. Change in the dialpad visibility
5. Change in hard keyboard open/close events.
6. Change in foreground position of InCall UI app.

It uses these to figure out when to enable/disable proximity sensor.

CL that removes code from TeleService: I77e0d15ad1a8f5a090c1368db98edaa246dbcd72

bug: 10366512
Change-Id: I5c2ea6daa9443e7ad77c67f272bc0bafdb060e5e
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
3c5581a67ba89fd96fc19e64f6c4780d0a58f640 20-Aug-2013 Santos Cordon <santoscordon@google.com> Support connecting and disconnecting from Phone app.

Phone app now connects/disconnects from the UI when there are no active
calls but UI did not previously support being disconnected. This change
adds the following functionality to support dis/reconnection:

- CallCommandClient now supports setting new ICallCommandService
instances.
- CallCommandClient now checks if mCommandService is null before
executing a method.
- CallHandlerService performs more careful ordered cleanup with
destroyed including removing pending messages and clearing any
existing calls from the call list.
- InCallActivity now performs tearDown of the presenters with onDestroy
instead of finish() to reduce NPE instances.
- InCallActivity not notifies InCallPresenter when is finishes, and not
just when it starts.
- InCallPresenter tears itself down after two things happen: the UI is
destroyed and the service is disconnected.
- InCallPresenter now issues a full-screen restart of the UI if the
UI was previously hidden (except for new outgoing calls). This allows
the UI to come back to the foreground if it was in the foreground when
the app went down.

The above changes also now protect against the phone app crashing or the
incall UI crashing.

bug: 10363682
Change-Id: I9b785f906f29015827e8e53e64cd5f5c72cd7981
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
1df52df7a0248814fbd4575103059a8b427f5d9a 15-Aug-2013 Santos Cordon <santoscordon@google.com> Add logic support for manage conference screen. (Part 2 of 4)

Changes:
- Add conference call resource photo
- Move logic to determine the name/numbers to show in the Call card
from CallCardFragment to CallCardPresenter.
- CallCardPresenter now tells CallCardFragment if the primary call is
a conference call.
- Updated the primary/secondary call order do that Active Calls are
primary instead of Disconnected calls when both exist.
- Cleaned up some excessive logging.
- The CallCard code uses a whitelist to know which callcard to show.
The change in services/Telephony to add CONFERENCED state is what
causes the new child calls to now show since that is not added to
the whitelist in this CL (by design).

bug: 10334739
Change-Id: Iaeab3f8bc9bda7693fa4a27bb8d3fe5de4dc9dfc
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
0e27ca6253114be60b85f912a1af62dbf35c1b9e 13-Aug-2013 Santos Cordon <santoscordon@google.com> Use shared contact info cache to get data for the notification.

Move around where ContactInfoCache is created so that StatusBarNotifier
and CallCardPresenter will use the same shared instance.

Change-Id: I6e0a7c48aa7a35a0f1a52b399eb127d69f41a879
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
73e8dc0225c601f7203dd4d12e4f7653a1f9a9b0 10-Aug-2013 Santos Cordon <santoscordon@google.com> Add basic call information to the notification.

Change-Id: I33bc1445e9fc515b68205a12d7297a8f3013fecd
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
de7685bd2f489bd0a7c74721f73a37c69eeba367 10-Aug-2013 Santos Cordon <santoscordon@google.com> Adding suppression behavior for in-call notification.

This suppresses the notificaiton if the call isn't active of outgoing.
We also suppress the notification if the user is currently in the
in-call screen.

...except during incoming (ringing) calls...we always show it for ringing calls.

Change-Id: Ib75545339376c62c975c390298ef9567d733b8e3
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
0866ac1055b4e505339a94b4f5177b862d6301aa 09-Aug-2013 Santos Cordon <santoscordon@google.com> Adding hangup capability to in-call notification.

Change-Id: I7ba4dd0824f41d9989e36bff10fbfca68596134e
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
9de3d7c5188c02cabf03799f87d494ee7dc702cb 09-Aug-2013 Santos Cordon <santoscordon@google.com> Singletons are hard, lets go chopping...them out of the code.

After this change, there remains only one singleton (InCallPresenter).
The whole system needs to be reworked in a better manner in terms of
build up and tear down.

Change-Id: I393ec648526bc28a3ae709004aed6d4627670549
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
91d578df9ba4fb77832cf5f20cf5143b67ff2581 09-Aug-2013 Christine Chen <christinech@google.com> Remove STARTED and START_UP states

Change-Id: I963f0ce7c695349854b738ae57b39f2c6718e570
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
b6ec8a55702f69c1bcb7b3eb1646c363ad9b4d10 08-Aug-2013 Santos Cordon <santoscordon@google.com> Improve outgoing call sequence

Changes:
- When we get a new outgoing call, fire up the UI (without the
notification) by sending it an ACTION_MAIN intent.
- Fix up the InCallState-setting code in InCallPresenter to be a
little cleaner and accomodate new OUTGOING code.
- Add missing call to set HOLD Ui button
- Fix an occassional NullPointerException in CallCardPresenter.java

Change-Id: I557a777287d9ab25ef1447be63b5da080f1b2532
(cherry picked from commit 4d5c29af103c13e78568dc772d26eb56a3e6d3e1)
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
a12f2589f424e26c63c8ee5b6fad89e30b69d7fb 07-Aug-2013 Santos Cordon <santoscordon@google.com> Add UI to show when the Call disconnects.

When the call disconnects, we need to show UI for a short time before
existing the UI.

Change-Id: Iee648b8c54ee4b5ea09cfaec508e1bf8fb8f1643
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
e7be13fb0556e62b07bc271b130412d82d7f7521 07-Aug-2013 Santos Cordon <santoscordon@google.com> Supports for outgoing calls starting up the UI.

- Added the OUTGOING InCallState
- Added support for OUTGOING into InCallState, InCallPresenter, and
StatusBarNotifier.

Change-Id: I49d5a56a4394d05e948b16a82f23e3eb925fd0a0
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
efd4282ec4221ec5eefd4155a4ad915adcedca70 05-Aug-2013 Santos Cordon <santoscordon@google.com> Notifications in Phone (part 1)

- Added StatusBarNotification class to handle notifications
- StatusBarNotification has tons of copied comments from
NotificationMgr.java. Also has minimal code to make the notification
pop up (without call-specific data).
- Moved the UI start-up code from InCallPresenter to
StatusBarNotification. Incoming phone calls need to display an alert
above immersive (fullscreen) foreground activities and the way to do
that is through notifications. The old phone app did the same
thing...finally bringing over that functionality.

Change-Id: I3324503e0d7bb1de00d8e7fab72d4b40519491dd
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
9f22c7496af167f2eada26aa998364d4cf03a619 05-Aug-2013 Santos Cordon <santoscordon@google.com> Adding a central logging class.

Change-Id: I24f68d5ebcfed2740f9645736c35edf17efb4769
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
671b221ccadea34fb9327ef5342b26419eb5ca99 05-Aug-2013 Santos Cordon <santoscordon@google.com> Improve InCall State management

CL Contains the following changes:
- InCallPresenter now manages an overall in-call state
- Other presenters now listen to in-call state changes instead of
getting updates from CallList directly.
- Changes AnswerPresenter to a static fragment instead of dynamically
loading it. It makes code easier and more aligned with other fragments
used in the class.
- Presenters now save the appropriate call and use callId() for commands
sent to the telephony layer.
- Extra logging in CallList
- cleaned up the startup sequence in InCallActivity and moved everything
to onCreate instead of onCreate & onResume

Change-Id: I4ce4182eefcc134bfa16c33be8fe4aefc041f563
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java
4d5c70b96ed0b49d737a7a60d02488681f023450 03-Aug-2013 Santos Cordon <santoscordon@google.com> Fixing incoming call sequence, adding InCallPresenter

Moved handling of AnswerWidget from AnswerPresenter and into the new
InCallPresenter class.

InCallPresenter now also manages a high-level in-call UI state to be
expanded in subsequent CLs.

Change-Id: Ia4fee84db68f7eaedea307b25329dadb8cf754e5
/packages/apps/InCallUI/src/com/android/incallui/InCallPresenter.java