History log of /packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
871698737d5d9fdd878ead5399da465f0d887924 10-Oct-2013 Christine Chen <christinech@google.com> Removes stopPing from onSaveInstanceState()

- I don't think it makes sense to do any processing in
onSaveInstanceState() as we are already stopping the ping in
onWindowVisibilityChanged.

- onSaveInstanceState() should solely deal with saving app states
anyway.

Bug: 11156202
Change-Id: If2b17bd10b455899703aa2c8f9d15f04a9bea22f
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
647462d7ca1cfaf28c76d573bd9a4e11d493a623 08-Oct-2013 Christine Chen <christinech@google.com> Adds support for texting after phone disconnects.

Bug: 11111553
Change-Id: I8abcae4439e7b9697d7b4a4335e093d7ad13a1b3
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
ef1b5e0afd8e824979d1acda015eda314e61955b 06-Oct-2013 David Braun <dabraun@google.com> Add custom message dialog for Respond via Message.

We don't want to require SMS applications to implement activities that show
over lock just to handle the "respond via custom message" scenario for
rejecting phone calls. This change adds an entry dialog into the phone call
UI. A separate change removes the code in the Telephony service that would
have asked the default SMS app to show UI.

Bug: 11084719 Provide UI for "quick response" messages built into Phone app
Change-Id: I7fcf20280fd3b741aa941cc6a24f5c262db1899b
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.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/AnswerPresenter.java
22c678c74fa38e921ea22b09962062fce6148047 11-Sep-2013 Christine Chen <christinech@google.com> Adds onUiReady and onUiUnready to the presenter

- ConferenceManagerPresenter needs these two functions to listen to
CallList changes.
- Moves super.onUiUnready() to the top of the onUiUnready methods for
both the AnswerPresenter and ConferenceManagerPresenter classes.

Bug: 10696097
Change-Id: I050071f10ebe5112d9d41192ea8c78593189bd9b
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
b0899adba59d1c5cdd2db1363f49803a24546883 10-Sep-2013 Christine Chen <christinech@google.com> Makes glowpad scalable.

Bug: 10634748
Change-Id: Iac3d424e7d6be94230da12f3058214b7ca3d8a84
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
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/AnswerPresenter.java
54601f653bb8cc6b37b56b8de6515a2d6aa9fbb1 06-Sep-2013 Christine Chen <christinech@google.com> Adds UI null check.

- Fixes NullPointerException that happens sometimes when the UI is asked
to bring up the reject with text message popup.

Bug: 10608694
Change-Id: I32b8d9f0e1c115dd07ec6000275a882a4b9e1316
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
4db0c3bf23788940a26dd21842cda093b1f68c33 04-Sep-2013 Chiao Cheng <chiaocheng@google.com> Merge "Clean up listeners when view is destroyed." into klp-dev
c9e5af452871582679bceae82948e2aa2a26292d 31-Aug-2013 Yorke Lee <yorkelee@google.com> Enable reject via text

Toggle reject via text option in glowpad based on the
call's capability.

Bug: 10424370

Change-Id: I5c36e83bc36923b093021c2a5cfd0c6aad3eb0b2
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
0b03b7a58d1e1432a8380c2bfc72b3a425fd6646 30-Aug-2013 Chiao Cheng <chiaocheng@google.com> Clean up listeners when view is destroyed.

When the answer screen is shown and destroyed with a back button and then
re-shown via notifications, a new AnswerPresenter is created. But the old
presenter has not been removed as a listener.

Bug: 10566547
Change-Id: I68c621fee81017fa5d0e3e9dde56fabedc3b1d8d
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
bcceccb84a73f1fa045180b8e61ad6595211f721 30-Aug-2013 Santos Cordon <santoscordon@google.com> Show glowpad for call waiting calls

Two things were happening:
1. AnswerPresenter stopped listening to call event after the first
incoming call
2. It was not checking for CALL_WAITING && INCOMING as valid incoming
call states.

fix both.

bug: 10538445
Change-Id: I491f2381c33c431f0cbfcc0000f50efdc107cce9
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
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/AnswerPresenter.java
8a5b6da7d3d6d0487a00a7989bab2a86ffd2f486 23-Aug-2013 Chiao Cheng <chiaocheng@google.com> Disabling quick response since it's not done yet.

Feature is incomplete. Ui needs to handle case where there are no text
responses and switch to 2 targets.

Bug: 10424370
Change-Id: Iae59ec0adeea6131374a61abe05031eb29da9ca4
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.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/AnswerPresenter.java
e286f91abd12dee037de19c3836d8002e450a9c9 08-Aug-2013 Santos Cordon <santoscordon@google.com> Fix race-condition case.

Hitting a button when the call just disconnected can cause mCall = null.
Protect against it instead of throwing exception.

Change-Id: I529579b43746c7611bad1209fe4d19a355ae6203
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
10196fd2f7cc922693e2a7c6c932725a52157943 07-Aug-2013 Christine Chen <christinech@google.com> Adds support for text messages

Change-Id: Ibdb279a7dff0db710bcc1d6a313b486f6816ea65
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
0746bb90ef10685562e95ebf55f8ad1acf6ce816 05-Aug-2013 Santos Cordon <santoscordon@google.com> Use rejectCall() for rejecting call.

Was previously using non-functional disconnectCall().

Change-Id: I14f17290f74434dfb85a7671374d1b6070595394
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.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/AnswerPresenter.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/AnswerPresenter.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/AnswerPresenter.java
150a5c58c67f230c8fd7293b180bbf50aa761480 01-Aug-2013 Santos Cordon <santoscordon@google.com> Adding multi-call support.

Before this change, the UI came up when we were notified that a new call
came in, but we did not actually look at the call state, etc. This
seemingly worked while we only supported single calls but did not scale.

This change does two main things:
a) Plugs in CallList into the presenters so that they can perform their
logic based on the actual state of the calls (necessary for multi-call
support)
b) Adds Secondary CallInfo UI to the Call Card so that we can display
information foreground and background calls.

As a result of (a) from above, a lot of changes you see will be to
Presenters, which now take their cues from CallList and update their
Ui's accordingly. A problem with this approach is that the presenters
(callcard/buttons/answer-widget) perform their changes independently.
A subsequent change will consolidate interactions with CallList to a
Presenter-Manager class and away from the presenters.

Change-Id: I89d1926fa1eef6f10d897d2ce360f666c8f341f8
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
3552ee4b7111b995735d330b2e89bfabc2fd9b61 25-Jul-2013 Chiao Cheng <chiaocheng@google.com> Renaming client side stub of ICallCommandService.

Since the server side already has a class named CallCommandService, renaming
client side to be CallCommandClient to avoid confusion.

Change-Id: If8aa1741e45a97b11e6699746a3561227900f792
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
241d50d5f523eb0b644d8a9c1cf7fd2eb418ab88 23-Jul-2013 Chiao Cheng <chiaocheng@google.com> Integrating mute and speaker buttons.

* Adding base classes for presenter, ui and fragments.
* Moved common presenter integration logic into base fragment.
* Adding presenter to handle button logic.
* Integrated disconnect and text from glowpad to presenter.
* Changed in-call buttons to be invisible so they do not show under transparent
glowpad.

Change-Id: I446db149769b5cf1abce960ecede01effeabfe1e
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
4747d3bfd809847c1a1b83d3e558e3091d6e995c 23-Jul-2013 Chiao Cheng <chiaocheng@google.com> Adding singleton wrapper for ICallCommandService.

Change-Id: I1ab36019f4d754ba9bca5a4d24f6292b91f60d18
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
ed6adb062b06a0ad4d7bd2c1d3ea5d04c3370a0f 20-Jul-2013 Santos Cordon <santoscordon@google.com> Renaming CallMonitorService to CallHandlerService

Change-Id: I936341bbad768cc718e27faaef20b498479f0e28
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
7df3ac3f95c9d23396e1319beb6ca34435d965f5 19-Jul-2013 Chiao Cheng <chiaocheng@google.com> Connecting answer call action in UI to service.

Also starting pinging animation for glow pad.

Change-Id: Ifac94582b8448c288a07577db02633bf9452ee56
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java
dba5a7df121b4904b94e14439cca8996d843c1c9 18-Jul-2013 Chiao Cheng <chiaocheng@google.com> Adding fragment and listener for answering calls.

Created mvp pattern for answer fragment.

Change-Id: Ibe0c3b5ce2b61a098c2237aab549238fd4518e9b
/packages/apps/InCallUI/src/com/android/incallui/AnswerPresenter.java