History log of /packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0206f6201db40deaa9af1057179aaec85c809dce 14-May-2015 Yorke Lee <yorkelee@google.com> Rename AudioState to CallAudioState

Deprecate AudioState class and make methods @SystemApi where
necessary to minimize impact to SystemApi
Replace usages of AudioState inside Telecom sub-systems
Fire both onCallAudioStateChanged and onAudioStateChanged callbacks
for backward compatibility
Support both setAudioState and setCallAudioState for all classes

Bug: 21040387
Bug: 21088300
Change-Id: I3ec7b3afdaa344c6d639d1c421f1842d67f7d0f7
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
1210f78a2d58e920bcb2e5927b17c56e5851ed43 14-Apr-2015 Yorke Lee <yorkelee@google.com> Use proximity wake lock in InCallUI

Bug: 20160495
Change-Id: I821de3968e3dd825c2adc90a3339ee3ebec93e45
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
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/ProximitySensor.java
ab727c5adc7826c6d5bea4875a2bdf9f04438acd 03-Sep-2014 Santos Cordon <santoscordon@google.com> Do not request prox sensor ON without an ongoing call.

Bug: 17323179
Change-Id: I34afc5e42ba1d5b559626b7d52b41e96af95b4f9
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.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/ProximitySensor.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/ProximitySensor.java
4ed8d8d7d2c6766e3712a407551f79322e544aa8 06-Aug-2014 Santos Cordon <santoscordon@google.com> Remove hardcoded audio route in video provider.

The video provider always calls exitVideo() and as a result always sets
the audio mode to EARPIECE when any call starts, negating any automatic
setting done by telecomm (like bluetooth).

This change has three items:
1. Only set the audio mode if we are exiting a previously entered video
call.
2. When setting audio on exit, set it to the mode that was previously
saved when the video call was entered.
3. Convert usages of the private AudioMode to the public CallStateAudio.

Change-Id: I484ea8fadc9b7cf43692b517c97f906918fc49f8
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
3fff08fd457f84466984ea79ee05c838467bca51 28-Jul-2014 Yorke Lee <yorkelee@google.com> Add new proximity sensors in Telecomm (3/3)

Add the following two APIs in Telecomm and use them in InCallUI
setProximitySensorOn
setProximitySensorOff(boolean turnScreenOnImmediately)

Bug: 16573954
Change-Id: I8219e9c659f4ea4493f5cd5c8bcaa95a98d180e2
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
11e202f49d4382bbf6271e90421c5db333f3b346 21-Oct-2013 Christine Chen <christinech@google.com> Adds null check for proximity wakelock

Bug: 11319677
Change-Id: Ie62144dc5a738bb294a802230dce7847f734f39e
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
aa48f9e04c983eef57b90bd4c76af59cca37b569 08-Oct-2013 Santos Cordon <santoscordon@google.com> Merge "Turn screen on for call-waiting calls" into klp-dev
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/ProximitySensor.java
2bdeba1dae01d329c845da013751512fc97d19ae 07-Oct-2013 Santos Cordon <santoscordon@google.com> Add logging to dialer.

Two instances that need more logging:
1) Is UI showing for prox sensor.
2) Was the call hung up from notification?

bug:11050553
Change-Id: I9eb60621bc320fe466780e5d7df7502354dd3f1f
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
2d84705bf4c4f0588ccf4a6d64832e7f99b532cf 20-Sep-2013 Christine Chen <christinech@google.com> Addressing finished and postponed TODO(klp)

Bug: 10605909
Change-Id: Id7594b306d23d4bd5d7a6983f2dbe524591a0d69
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
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/ProximitySensor.java
25fcc508ef6a02a2cb32bf1970f537edf205da48 13-Sep-2013 Santos Cordon <santoscordon@google.com> Calls to binder safe after disconnection of service.

Calls to the binder can happen after onDestroy since the service methods
and the binder methods have no sequence guarantee. This change makes it
safe (no NPEs) for binder callbacks to happen after destruction.

bug:10682538
Change-Id: I1ca4fcee522a92ae9f86b087239077e4a447d3f7
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.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/ProximitySensor.java
3e69e4fe0e6dbce738cc6b3f9a71fc177e9fe1b6 29-Aug-2013 Santos Cordon <santoscordon@google.com> Support visual indication of mute from headset

This change uses new binder api changes to bring down mute status from
TeleService. mute state routed through AudioModeProvider.

bug:10395427
Change-Id: Ie15efcc780e99072363188de2a954a1888eec9dd
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
c8452ca1ed9c5bb79bb0cc7419bd8b791550bf69 28-Aug-2013 Santos Cordon <santoscordon@google.com> Add logging to proximity sensor.

prox sensor bugs often come randomly and it's good to have logs in
place.

bug:10516724
Change-Id: I453f2a6904fec48f2a4e6acac13da111c60b2e2a
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.java
978c86163edab1f389bcc8e627eedc98d785f0f2 21-Aug-2013 Santos Cordon <santoscordon@google.com> fix build break from merge

Change-Id: I0a0ae18bca3575d10e5b3d113b1e3d878e5c34e0
/packages/apps/InCallUI/src/com/android/incallui/ProximitySensor.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/ProximitySensor.java