Commit Graph

1179 Commits

Author SHA1 Message Date
Hall Liu
7fe985fa28 Merge "Make RttTextStream's read interruptible" into pi-dev am: 21ef4b3acb
am: 6574cac322

Change-Id: I5a3946a2555ed2ac3cbe5a4f1a2ef6f664554667
2018-06-26 15:39:56 -07:00
Hall Liu
6574cac322 Merge "Make RttTextStream's read interruptible" into pi-dev
am: 21ef4b3acb

Change-Id: Ifc793a3b59e7e9cc5c09cffa8d147feeb5a6e900
2018-06-26 15:17:12 -07:00
Hall Liu
730a25995e Make RttTextStream's read interruptible
Wrap the FileInputStream in a java.nio.Channel so that sending a
Thread.interrupt() to the thread blocked on the read will actually do
something.

Change-Id: Icc11ba69167f448e2b33d9a1a13a1dfa5e5d0d58
Fixes: 110570772
Test: manual (follow repro steps in bug, but type really fast),treehugger
2018-06-25 19:48:33 -07:00
Tyler Gunn
3193b1537c Merge "Merge "Ensure self-managed calls use voip audio mode." am: b62aa315d1 am: fd3e10b1bc" into pi-dev-plus-aosp
am: 6823c8a822

Change-Id: I1352a44cbb55fdeeb79771b27055a70b83a3cbb8
2018-06-06 18:08:05 -07:00
Tyler Gunn
2c556faf3d Merge "Ensure self-managed calls use voip audio mode." am: b62aa315d1
am: fd3e10b1bc

Change-Id: I8f7842fa84fcce91a292b32189cd827b4a125fb0
2018-06-06 16:33:19 -07:00
Tyler Gunn
b62aa315d1 Merge "Ensure self-managed calls use voip audio mode." 2018-06-06 21:19:04 +00:00
Sean Kelley
ad51ddba78 Add EXTRA_SKIP_CALL_FILTERING PhoneAccount extra
This adds a new @hide extra to PhoneAccount which will allow
TelecomService to skip call filtering on PhoneAccounts which set it to
true. This will be useful to allow devices like Wear which receive
bridged calls that have already undergone call filtering to avoid doing
it again.

Bug: 65223222
Change-Id: I5b9992735a8cc29c70282daf5c6e285bfc8a4217
2018-06-04 18:38:50 +00:00
Hall Liu
378f1f4972 Add CallAudioState ctor as TestApi
Needed for CTS testing

Bug: 79528185
Test: CTS
Change-Id: Iad154257a93cc776d5800527e46e777fd6c88220
Merged-In: Iad154257a93cc776d5800527e46e777fd6c88220
2018-05-25 15:22:16 -07:00
Tyler Gunn
f2e08b4c2c Ensure self-managed calls use voip audio mode.
Although Telecom ensures that new calls use voip audio mode, the default
value from a Connection would override the Telecom default.

Bug: 76362663
Test: Modify test app to ensure it does not set voip audio mode, ensure
Telecom uses voip audio mode for new calls.

Change-Id: Ie6477659cf6dabd08f371d4958ece1d258cd3106
2018-05-24 10:44:44 -07:00
Hall Liu
f2a443dbac Merge "Add CallAudioState ctor as TestApi" into pi-dev am: 785a93f61a
am: b5e999f3fd

Change-Id: I65395b8dc270ce503271bf7800f6d1ed46a2c9f2
2018-05-14 14:40:45 -07:00
Hall Liu
b5e999f3fd Merge "Add CallAudioState ctor as TestApi" into pi-dev
am: 785a93f61a

Change-Id: If94faceaaa98479c7406d2f6f0374d97ca4e706b
2018-05-14 14:27:34 -07:00
Hall Liu
c1d95aad1a Add CallAudioState ctor as TestApi
Needed for CTS testing

Bug: 79528185
Test: CTS
Change-Id: Iad154257a93cc776d5800527e46e777fd6c88220
2018-05-11 17:14:58 -07:00
Tyler Gunn
f858a0e8d2 Make TelecomManager#endCall a public API.
A broad category of apps such as wearable companion apps and call blocking
apps rely on the ability to reject a ringing call.
Previously this was achieved using a broken TelephonyManager API which
lacked permission checks.
To support these applications, removing the @hide attribute on the existing
TelecomManager#endCall API so that apps with the existing
ANSWER_PHONE_CALLS permission can reject ringing calls and end ongoing
calls.  Logically if an app has permission to answer a call, it should be
able to end it.

Test: Created test app to verify API permission checks.
Test: Added new CTS tests to cover this API.
Bug: 78290258
Merged-In: Ic6527969793ebe05eb9c5fa8205558ae788ea572
Change-Id: Ic6527969793ebe05eb9c5fa8205558ae788ea572
2018-05-08 11:19:18 -07:00
Tyler Gunn
4d2e130fdf Merge "Make TelecomManager#endCall a public API." into pi-dev am: 872a039ab3
am: aae778c669

Change-Id: I9deb321220ca1a058c88ac1dd36cfddd07b25152
2018-05-07 21:38:04 -07:00
Tyler Gunn
aae778c669 Merge "Make TelecomManager#endCall a public API." into pi-dev
am: 872a039ab3

Change-Id: Ic52e1705ce497b0a46bb4107ad854a8b939b38b0
2018-05-07 21:11:14 -07:00
Tyler Gunn
e1aa26c744 Make TelecomManager#endCall a public API.
A broad category of apps such as wearable companion apps and call blocking
apps rely on the ability to reject a ringing call.
Previously this was achieved using a broken TelephonyManager API which
lacked permission checks.
To support these applications, removing the @hide attribute on the existing
TelecomManager#endCall API so that apps with the existing
ANSWER_PHONE_CALLS permission can reject ringing calls and end ongoing
calls.  Logically if an app has permission to answer a call, it should be
able to end it.

Test: Created test app to verify API permission checks.
Test: Added new CTS tests to cover this API.
Bug: 78290258
Change-Id: Ic6527969793ebe05eb9c5fa8205558ae788ea572
2018-05-02 13:23:48 -07:00
Tyler Gunn
3b366a9ccd Merge "Add ability to log last 2 digits of dialed numbers in userdebug builds." am: a355552bfe am: cc9acb51c5
am: 2e8b22cdbf

Change-Id: I3c2dd44ac20685951617889f0b9ad785d8046685
2018-04-24 10:14:09 -07:00
Tyler Gunn
2e8b22cdbf Merge "Add ability to log last 2 digits of dialed numbers in userdebug builds." am: a355552bfe
am: cc9acb51c5

Change-Id: Ie6d937b3a6a09e358945a5453af43b6096d8d9b6
2018-04-24 10:02:17 -07:00
Tyler Gunn
9bc35116e3 Add ability to log last 2 digits of dialed numbers in userdebug builds.
Filers of bugs often refer to specific phone numbers.  Bug reports by
default obscure dialed phone numbers from the Telecom logs.  This makes it
difficult to relate events in the bug report to what the bug filer refers
to.

To ease this, in userdebug builds we will now leave the last 2 digits of
dialed phone numbers un-obfuscated.  User builds will remain obfuscated.

Test: Added unit tests to cover this case.
Bug: 78457192
Change-Id: I52704cf57ed11b1fa53a55bc883d7d090af661f4
2018-04-23 09:52:25 -07:00
Pankaj Kanwar
68fcd8ead7 Merge "Update Javadoc to clarify which calls are logged." into pi-dev am: 55399733a5
am: 2aa29debaa

Change-Id: I55b972599d6917a26b3aaa0a679bb52b84acdbc4
2018-04-06 09:12:18 -07:00
Pankaj Kanwar
2aa29debaa Merge "Update Javadoc to clarify which calls are logged." into pi-dev
am: 55399733a5

Change-Id: I2238231bfc1fb471982cdcc111e57b60b77424ab
2018-04-06 08:54:32 -07:00
Tyler Gunn
2155c4c897 Update Javadoc to clarify which calls are logged.
Update javadoc to make it more clear tha tonly SIP or TEL scheme calls
are logged at this time for self-managed CS.

Test: Build - docs only change.
Bug: 77581565
Change-Id: I1c5ef507077bc557f7af302a5b44c06bc90eef83
2018-04-05 09:43:41 -07:00
Hall Liu
f219fcf847 Merge "Change signature of requestBluetoothAudio" am: 545e20389d am: 442575f4f1
am: 2a74e5798d

Change-Id: Ia7fdee058a22521ec3e93ebb461d0197285bda5e
2018-04-02 21:06:14 -07:00
Hall Liu
2a74e5798d Merge "Change signature of requestBluetoothAudio" am: 545e20389d
am: 442575f4f1

Change-Id: Ic10b762e04d74635663fa97f5879072ebe00eca9
2018-04-02 18:46:50 -07:00
Hall Liu
2b6a6a30d5 Change signature of requestBluetoothAudio
requestBluetoothAudio now takes a BluetoothDevice instead of a string.

Bug: 74408978
Test: unable to CTS -- can't emulate bluetooth devices
Change-Id: Id21e32b911da234f69a248e9937f9df0cf12a9a9
2018-04-02 13:56:05 -07:00
Hall Liu
1539283965 Change signature of requestBluetoothAudio
requestBluetoothAudio now takes a BluetoothDevice instead of a string.

Bug: 74408978
Test: unable to CTS -- can't emulate bluetooth devices
Change-Id: Id21e32b911da234f69a248e9937f9df0cf12a9a9
2018-04-02 13:52:57 -07:00
Tyler Gunn
0ab380166d Rename handover failure constant per API review comments.
Expanding EMERG to EMERGENCY.

Test: Build code
Bug: 74831393
Merged-In: Ic0555b20dc508d022c0165a5d9dc3b40b33db70e
Change-Id: Ic0555b20dc508d022c0165a5d9dc3b40b33db70e
(cherry picked from commit a4ef504bdc)
2018-03-22 15:34:32 +00:00
Tyler Gunn
a4ef504bdc Merge "Rename handover failure constant per API review comments." am: 7c8a877231 am: ffe1c22271
am: e4330eaaf0

Change-Id: Ic0555b20dc508d022c0165a5d9dc3b40b33db70e
2018-03-19 20:14:10 +00:00
Tyler Gunn
e4330eaaf0 Merge "Rename handover failure constant per API review comments." am: 7c8a877231
am: ffe1c22271

Change-Id: Icae03afa86e7b660e9f52df252d2e3c961762be8
2018-03-19 19:40:01 +00:00
Tyler Gunn
5c60d71efb Rename handover failure constant per API review comments.
Expanding EMERG to EMERGENCY.

Test: Build code
Bug: 74831393
Change-Id: Ib7e6bea84e25b1e1a2ddb154c7ed62f1084a7596
2018-03-16 12:38:43 -07:00
Tyler Gunn
d9c9471ac9 Merge "Update API docs for Telephony call state reporting." am: c2493ee1ee am: 1ba28fec3f
am: ac55e9dd01

Change-Id: Iaba79cf9691172232c235650f357b2e9c2a6d54a
2018-03-14 17:37:50 +00:00
Tyler Gunn
ac55e9dd01 Merge "Update API docs for Telephony call state reporting." am: c2493ee1ee
am: 1ba28fec3f

Change-Id: I60014a59db60610746841840278adead80963db8
2018-03-14 17:22:06 +00:00
Tyler Gunn
5f7265ec9c Update API docs for Telephony call state reporting.
Update TelephonyManager#getCallState,
PhoneStateListener#onCallStateChanged to make it clear which calls each
method considers in determining call state.
Added intdef for call state (allows auto doc generation of valid
values for parameters).

Test: make docs
Bug: 73245376
Change-Id: I70ebd0f00ae3f0e1370ae275be8f8ef6f008523d
2018-03-13 15:56:37 -07:00
Tyler Gunn
eda2ebd206 Merge "Ensure start of call properties are propagated to RemoteConnection." into pi-dev 2018-03-08 20:24:36 +00:00
Tyler Gunn
38f1b7d112 Ensure start of call properties are propagated to RemoteConnection.
Some properties were not being propagated to a RemoteConnection when
a Connection is first created.  This can cause problems where the
Connection Manager is not aware of these property changes, especially if
they never change again during the lifetime of a call.

The extras set when a Connection is first created using the
RemoteConnectionService API would not be propagated to the
RemoteConnection.  This means that Telephony RAT reporting would never
happen if the radio technology never changes during a call.

Bug: 72811636
Test: Manual
Change-Id: Ia523cee477a39c221953cda68c29579cb5f6ed76
Merged-In: 06a96eab13
(cherry picked from commit 06a96eab13)
2018-03-08 17:21:47 +00:00
Tyler Gunn
3a09dc185b API Documentation and Constant cleanup.
1. Update handover API docs for clarity.
2. Added an unknown value per API review comments.
3. Renamed HANDOVER_FAILURE_DEST_USER_REJECTED to
HANDOVER_FAILURE_USER_REJECTED
3. Removed the HANDOVER_FAILURE_DEST_INVALID_PERM constant since it isn't
used (methods which deal with permissions throw security exceptions).

Test: Make doc and verify documentation.
Fixes: 73751004
Fixes: 73750515
Fixes: 73750817
Merged-In: I7860fcd813f25adaaccf632f2c61dd4138a0a889
Change-Id: I7860fcd813f25adaaccf632f2c61dd4138a0a889
(cherry picked from commit c7a86b14a8)
2018-03-07 23:17:54 +00:00
Tyler Gunn
c7a86b14a8 Merge "API Documentation and Constant cleanup." am: 8882c55b21 am: 8917fc21cc
am: 168a77237f

Change-Id: I7860fcd813f25adaaccf632f2c61dd4138a0a889
2018-03-07 21:09:48 +00:00
Tyler Gunn
168a77237f Merge "API Documentation and Constant cleanup." am: 8882c55b21
am: 8917fc21cc

Change-Id: Ic4a159b838c952594b0860ded69fc07c74180961
2018-03-07 20:56:29 +00:00
Pengquan Meng
573051e9a3 Merge "Update ConnectionService API comment" 2018-03-07 19:57:00 +00:00
Treehugger Robot
8882c55b21 Merge "API Documentation and Constant cleanup." 2018-03-07 19:33:52 +00:00
Tyler Gunn
d8879a2925 Merge "Ensure start of call properties are propagated to RemoteConnection." am: ecb46b610c
am: e8cb4f4046

Change-Id: I63af850b4bea2a8cfeada3cb7bf4d16762604524
2018-03-07 18:06:52 +00:00
Tyler Gunn
ecb46b610c Merge "Ensure start of call properties are propagated to RemoteConnection." 2018-03-07 15:22:58 +00:00
Hall Liu
7ef07b58b5 Merge "Fix Telecom dumpsys timestamps" am: c364ff38cb
am: d6d07385a5

Change-Id: Id973365c31e66c2afe885093495c6fc981bcd282
2018-03-07 02:07:11 +00:00
Hall Liu
074d2338fa Fix Telecom dumpsys timestamps
Change the dumpsys timestamps to use java.time for processing and always
log events with local timezone that was in effect at the time the event
happened.

Bug: 74250969
Test: manual, run dumpsys
Change-Id: Ie53cff4400be1528b3224bd556536a689ef22c8c
2018-03-06 16:26:32 -08:00
Hall Liu
8c8d7babf1 Fix Telecom dumpsys timestamps
Change the dumpsys timestamps to use java.time for processing and always
log events with local timezone that was in effect at the time the event
happened.

Bug: 74250969
Test: manual, run dumpsys
Change-Id: Ie53cff4400be1528b3224bd556536a689ef22c8c
2018-03-06 14:20:37 -08:00
Pengquan Meng
e3bf7e2b75 Update ConnectionService API comment
Bug: 73750116
Test: current telecom test
Change-Id: I74e9636c305b164bf01c3136c53e9a432101945b
2018-03-05 11:26:18 -08:00
Tyler Gunn
9d12773b51 API Documentation and Constant cleanup.
1. Update handover API docs for clarity.
2. Added an unknown value per API review comments.
3. Renamed HANDOVER_FAILURE_DEST_USER_REJECTED to
HANDOVER_FAILURE_USER_REJECTED
3. Removed the HANDOVER_FAILURE_DEST_INVALID_PERM constant since it isn't
used (methods which deal with permissions throw security exceptions).

Test: Make doc and verify documentation.
Change-Id: Id21d6b4c83d5c773ab38d78eb6b1886a1ac4dadf
Fixes: 73751004
Fixes: 73750515
Fixes: 73750817
2018-03-02 15:45:51 -08:00
TreeHugger Robot
4993e55242 Merge "Revert "Add deep link to the assisted dialing settings."" 2018-02-26 16:02:34 +00:00
TreeHugger Robot
c73f954cc7 Merge "Revert "Add the assisted dialing carrier config."" 2018-02-26 16:02:34 +00:00
Hall Liu
e9041241de RTT bugfixes, part 5
* Add a new API to allow Telecom to inform ConnectionServices when the
RTT text stream changes
* No longer set the RTT property from ConnectionService. Client apps
should be setting properties themselves.
* Add Dialer-side RTT property in order to remove the dependence on
checking the RTT streams, which have a complex lifecycle

Bug: 72951201
Bug: 72648661
Test: manual, with real RTT calls and Dialer's SimulatorConnection, also
cts
Change-Id: Ic4c7d883d2dc6baf8e8c0eaa4df58d7de8762b9e
Merged-In: Ic4c7d883d2dc6baf8e8c0eaa4df58d7de8762b9e
2018-02-22 03:19:19 +00:00