Commit Graph

2100 Commits

Author SHA1 Message Date
Edgar Arriaga García
ad96102725 Merge "Expose telecom API for retrieving photo uri" 2022-11-22 22:06:00 +00:00
Edgar Arriaga García
b101eeb82b Merge "Improve display name to avoid callback when it did not change" 2022-11-22 22:05:00 +00:00
Edgar Arriaga
2db19d26c9 Improve display name to avoid callback when it did not change
Update the caller display name only if the name actually changed.
This avoids excessive computations on the receiver end as apps such
as dialer listen to these changes and rebuild UI models when they
change.

Defer-CP-To-TM: 240341306
Bug: 240341306
Test: Manual logs to verify callback triggers only when changed.
Test: atest CallDetailsTest

Change-Id: I1c81049240042232ca5c3efa9a75ce2ef2de1829
2022-11-21 20:44:46 +00:00
Edgar Arriaga
e5bec82e3a Expose telecom API for retrieving photo uri
This API is queried when the async contact query for telecom
is performed, however, it is not currently exposed to users.
However, dialer apps sometimes need this information so they
resort to doing the exact same query that telecom does on their
own, adding significant latency to their incoming/outgoing call
latencies.

Bug: 240341306
Test: Manual, verified the data is sent with logs.

Change-Id: I029077ac587fad9651efa0c786ee0119ea500424
2022-11-21 20:07:54 +00:00
Thomas Stuart
de1f1f22b0 change getCallState from getPackageName to getOpPackageName
GetCallStateUsingPackage was reporting unusual packageNames in certain
cases. This looks to be a result of Telecom passing in the
context.getPackageName instead of context.getOpPackageName.

bug: 258729003
Test: manual
Change-Id: I075848e8732fc884f4247c8ba840b404c2af71a2
2022-11-16 22:17:42 +00:00
Thomas Stuart
6c82da4184 Merge "telecom-bluetooth DND bug" 2022-11-14 17:43:44 +00:00
Chinmay Dhodapkar
d3630ac9be Merge "update OWNERS file" am: 4e6ce5ed24 am: 192233dad0 am: 98801e7c4a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2299077

Change-Id: Ief5607cd1b8eba184c82753fde6315b3a6088bfc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-11 01:17:18 +00:00
Chinmay Dhodapkar
43a36d31d1 update OWNERS file
Change-Id: I8855f6ed8fc09b52b642c1fa80ef5b4e5b3dff3e
2022-11-10 22:11:22 +00:00
Thomas Stuart
5ca875ebcf telecom-bluetooth DND bug
Bugs came in about Do Not Disturb being on but still
interrupting users of incoming calls.  Turns out, this was a
result of BluetoothInCallService putting the headset into ring
mode before Telecom informed the InCallService to not ring.

Fix is to add a new EXTRA called EXTRA_IS_SUPPRESSED_BY_DO_NOT_DISTURB.
The extra is intended for InCallServices that may interrupt the user of
an incoming call.

Bug:   208652088

Test: maual + unit tests,
         3 DndCallFilter tests,
         2 RingerTests,
         1 CallTests
Change-Id: If8abec19dfc90999b2fc2ef3e4f5584c55d6fc2a
2022-11-10 19:40:06 +00:00
Bill Yi
0de01a9871 Merge TP1A.221105.002 to aosp-master - DO NOT MERGE
Merged-In: I7caa2e966bae2ec146ca77b36d2a467d746e2531
Merged-In: I361e8838571ab7b3f19778833b820f0b1b584d94
Merged-In: I361e8838571ab7b3f19778833b820f0b1b584d94

Change-Id: Ic9224a1948b26c8703a272aa3b26337e0586f3e3
2022-11-09 06:33:42 +00:00
Tyler Gunn
455fbf69c3 Revert "telecom-bluetooth DND bug"
Revert submission 19521928-telecomBluetoothDndBug

Reason for revert: Causes crash on call reported in b/258128736
Reverted Changes:
If275c2370:telecom-bluetooth DND bug
I873823def:telecom-bluetooth DND bug

Change-Id: Ib876bf0a82c2657a14080b77ff6c49b177f67637
2022-11-08 15:40:26 +00:00
Thomas Stuart
76769dc120 switch TelecomManager List getters to ParceledListSlice
It was shown that given a large phoneAccountHandles that are
over 1 mb, a TransactionTooLarge exception can be silently thrown
causing an empty list to be returned.

In order to prevent this behavior, all Lists that return a
PhoneAccountHandle or PhoneAccount have been switched to
ParceledListSlice.

bug: 236263294

Test: manual #1 - bug exists without fix,
      manual #2 - bug is fixed with patch,
      4 new CTS tests in
      android.telecom.cts.PhoneAccountRegistrarTest

Change-Id: I025245b2a6f8cfaca86f268851a9d8f0817e07dd
Merged-In: I025245b2a6f8cfaca86f268851a9d8f0817e07dd
(cherry picked from commit 76c4d2d0b1)
Merged-In: I025245b2a6f8cfaca86f268851a9d8f0817e07dd
2022-09-14 17:52:13 +00:00
Thomas Stuart
cc1188aed0 telecom-bluetooth DND bug
Bugs came in about Do Not Disturb being on but still
interrupting users of incoming calls.  Turns out, this was a
result of BluetoothInCallService putting the headset into ring
mode before Telecom informed the InCallService to not ring.

Fix is to add a new EXTRA called EXTRA_IS_SUPPRESSED_BY_DO_NOT_DISTURB.
The extra is intended for InCallServices that may interrupt the user of
an incoming call.

Bug:   208652088

Test:  maual + unit tests,
         3 DndCallFilter tests,
         2 RingerTests,
         1 CallTests

Change-Id: If275c237040c2336ad80b38e84409b2893058cdc
2022-09-08 16:00:49 -07:00
TreeHugger Robot
02e1eb7bd0 Merge "prohibit toggling setAudioModeIsVoip(false) for SM connection" 2022-09-01 21:13:46 +00:00
Treehugger Robot
f437c2c252 Merge "Remove VT specific mentions in IMS_ACCESS_BLOCKED" am: 9c27ef40d3 am: e593ec5a6d am: dae7b3698a am: 637fa1357f am: c2ab75704c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2199855

Change-Id: If5e6e8acfc0b43fe8d85ab6b67ac40e70b51eb5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 22:06:06 +00:00
Treehugger Robot
dae7b3698a Merge "Remove VT specific mentions in IMS_ACCESS_BLOCKED" am: 9c27ef40d3 am: e593ec5a6d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2199855

Change-Id: I10a6a834a983902ac1c28bbca45bb49e8cf28e07
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 20:24:32 +00:00
Treehugger Robot
9c27ef40d3 Merge "Remove VT specific mentions in IMS_ACCESS_BLOCKED" 2022-08-31 18:36:09 +00:00
Brad Ebinger
153af0123a Remove VT specific mentions in IMS_ACCESS_BLOCKED
Bug: 79919053
Test: docs only
Change-Id: I2883f8eb3383b13395635f03aa8fe665bedc8c41
2022-08-26 15:11:25 -07:00
Nan Wu
c51fd76dd5 Mark framework created intent as safe
Flag intent created by framework as LOCAL_FLAG_FROM_PROTECTED_COMPONENT by
calling intent.prepareToEnterProcess(true...). This is to fix false positives
of StrictMode.unsafeIntentLaunchViolation.

Bug: 181132616
Test: Manually verified a violation was not reported when a test app launched
      Intents returned from TelecomManager.createManageBlockedNumbersIntent.
      Methods marked as systemApi are not tested.
Change-Id: I7b00008dd894f1c637ab2f0a23e6cafb58bb73e5
2022-08-23 12:03:46 +00:00
Thomas Stuart
b83cc19fc0 prohibit toggling setAudioModeIsVoip(false) for SM connection
For context, there was a report of a VoIP app experiencing audio
issues in call when switching between a self-managed and PSTN call.
The root cause was from calling setAudioModeIsVoip(false)
on a self-managed connection.

To prevent misuse of the API, prevent toggling of
setAudioModeIsVoIP(false) on a self-managed connection.

Additionally, 2 CTS tests and 1 CtsVerifier test are put in place to
assert there isnt manipulation of this API.

Test: 2 cts,
      1 CtsVerifier called "Telecom Call Audio test"

bug: 236018173

Change-Id: I9161f9369f7bb37c1c2e3f9342e63693cb4f10cc
2022-08-22 16:25:34 -07:00
Thomas Stuart
76c4d2d0b1 switch TelecomManager List getters to ParceledListSlice
It was shown that given a large phoneAccountHandles that are
over 1 mb, a TransactionTooLarge exception can be silently thrown
causing an empty list to be returned.

In order to prevent this behavior, all Lists that return a
PhoneAccountHandle or PhoneAccount have been switched to
ParceledListSlice.

bug: 236263294

Test: manual #1 - bug exists without fix,
      manual #2 - bug is fixed with patch,
      4 new CTS tests in
      android.telecom.cts.PhoneAccountRegistrarTest

Change-Id: I025245b2a6f8cfaca86f268851a9d8f0817e07dd
Merged-In: I025245b2a6f8cfaca86f268851a9d8f0817e07dd
2022-07-26 18:31:18 +00:00
Thomas Stuart
6ff1ff9e20 cleanupOrphanPA's feature framework (2/2)*
Bug: 210134615
Test: Unit + manual
Change-Id: Ic350e4e45c0d1597c6f61e3e3e717b3a2c1bb099
Merged-In: Ic350e4e45c0d1597c6f61e3e3e717b3a2c1bb099
2022-07-21 00:43:36 +00:00
Thomas Stuart
7756b138f9 Merge "switch TelecomManager List getters to ParceledListSlice" 2022-07-15 15:21:52 +00:00
TreeHugger Robot
fa6099a60a Merge "update CallScreeningService#setSkipCallLog to address 3rd pty apps" 2022-07-15 02:00:53 +00:00
Thomas Stuart
e192879719 update CallScreeningService#setSkipCallLog to address 3rd pty apps
A 3rd party developer reported
CallScreeningService.CallResponse#setSkipCallLog(true) was still
logging the blocked call to Dialer.  This turned out to be true.

Turns out we do not allow 3rd party devs from toggling the
setSkipCallLog function.  Only carriers are allowed to toggle
the function.

To make this clear, the docs are being updated.

bug: 238892157
     130213778 (original)

Test: not required; docs only change.
Change-Id: I6b796421f7f178808eab301e12a4367b67ceaa71
2022-07-14 22:55:59 +00:00
Thomas Stuart
81fe8f31d5 switch TelecomManager List getters to ParceledListSlice
It was shown that given a large phoneAccountHandles that are
over 1 mb, a TransactionTooLarge exception can be silently thrown
causing an empty list to be returned.

In order to prevent this behavior, all Lists that return a
PhoneAccountHandle or PhoneAccount have been switched to
ParceledListSlice.

bug: 236263294
Test: atest android.telecom.cts.PhoneAccountRegistrarTest
             #testRegisterPhoneAccountHandleWithFieldOverLimit
Change-Id: I025245b2a6f8cfaca86f268851a9d8f0817e07dd
2022-07-11 12:11:43 -07:00
Hani Kazmi
4f221e5c51 Migrate Bundle/Intent APIs to new, type checked, variants
Part of go/safer-parcel. Follow up to ag/16639043. Migrates the following unsafe APIs:

* Parcel.readArray()
* Parcel.readParcelableArray()
* Bundle.getSerializable()
* Bundle.getParcelable()
* Bundle.getParcelableArrayList()
* Bundle.getParcelableArray()
* Bundle.getSparseParcelableArray()
* Intent.getSerializableExtra()
* Intent.getParcelableExtra()
* Intent.getParcelableArrayExtra()
* Intent.getParcelableArrayListExtra

Bug: 227458983
Test: m and presubmit pass
Change-Id: I72f206cb18eb5c669a7fff07a6845bed1c433fdb
2022-07-01 10:53:53 +00:00
Tyler Gunn
ecde42fb88 Merge "Update InCallService API documentation to clarify role and binding req." into tm-dev am: 9f268ea186 am: 0e261366ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19037817

Change-Id: I25134be674f7e1174879ae9aca06d654efc0860b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 17:13:14 +00:00
Tyler Gunn
9f268ea186 Merge "Update InCallService API documentation to clarify role and binding req." into tm-dev 2022-06-23 16:29:54 +00:00
Tyler Gunn
8f360d8a18 Update InCallService API documentation to clarify role and binding req.
Update InCallService API docs to clarify what happens if an app no longer
fulfils the requirement of the dialer role.  Also update documentation to
clearly indicate when the platform may show a warning to the user due to
a null binding.

Test: Docs only change.
Fixes: 236864749
Change-Id: Ief6225513a7aefefa9c029a02cc1a3511b236d44
2022-06-22 13:37:53 -07:00
TreeHugger Robot
bab3b93824 Merge "Support comparison of byte array values in areBundlesEqual" into tm-dev am: 548c0800c2 am: bb5b8247d1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18357438

Change-Id: Id836c0cd45de37dfe140a246895afa04ce33bb5b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 18:24:33 +00:00
Treehugger Robot
aa21aea93e Merge "Add new Telephony feature flags and update API annotations" am: 3d7b4e4ded
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1910630

Change-Id: Iaef6cfaa107be10d533d3e63ddcafe27806a82e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 17:45:09 +00:00
Grace Jia
17005bdfb0 Support comparison of byte array values in areBundlesEqual
Currently, telecom framework will send tons of unnecessary
Call#onDetailsChanged to notify update between Call.Details
with same byte[] value. Since we didn't support the proper way to
compare these value, onDetailsChanged might be called multiple times
meaninglessly.

Bug: 232180843
Test: CallDetailsTest
Change-Id: I739412da62f303cb00dc84cb0a6d7773d0a0aeaa
2022-05-12 12:49:02 -07:00
Hui Wang
160a0832e7 Add new Telephony feature flags and update API annotations
Bug: 206437821
Test: make
Test: atest CtsTelephonyTestCases FrameworksTelephonyTests
Change-Id: I511afb5afc52b859a37f8ae27ab671c2b8037527
Merged-In: I511afb5afc52b859a37f8ae27ab671c2b8037527
2022-05-12 11:12:39 -07:00
TreeHugger Robot
ab903b581d Merge "Un-obscure the Telephony phone account ID." into tm-dev am: 3ff037cb6c am: ee318613ea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18203217

Change-Id: I7eac245bd5d20296e5239dec59a15fd547363b76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-07 05:11:05 +00:00
TreeHugger Robot
3ff037cb6c Merge "Un-obscure the Telephony phone account ID." into tm-dev 2022-05-07 04:31:04 +00:00
Tyler Gunn
8a97933149 Un-obscure the Telephony phone account ID.
With the upcoming changes in T to move telephony phone account handles to
use subid instead of ICCID, the id of telephony phone account handles
no longer needs to be Log.pii-ed.  These phone accounts have been hard to
diagnose in most bug reports due to the obfuscation.

Bug: 226972613
Test: Manual testing; place calls and verify Telephony account handles are now visible.
Change-Id: Icae7917e7063c753c8597c401ad7adc1d9052775
2022-05-06 12:31:17 -07:00
Thomas Stuart
19d6092cfd Merge "fix log spewing coming from Telecom#LogUtils" into tm-dev am: 424c6c1f13 am: 3b6e577c16
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18056443

Change-Id: I3c0717495116799ee3b0a665b5a322e92ef8ace6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 16:39:23 +00:00
Thomas Stuart
424c6c1f13 Merge "fix log spewing coming from Telecom#LogUtils" into tm-dev 2022-05-03 15:47:19 +00:00
Philip Quinn
efd164f0b9 Merge "Revert "Un-obscure the Telephony phone account ID."" into tm-dev am: ec77a90abc am: bf3a33538d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18130643

Change-Id: Ia776a9fb61b06ac00f3f298ac58d2d917650445c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 07:47:49 +00:00
Philip Quinn
8f0afb889c Revert "Un-obscure the Telephony phone account ID."
This reverts commit f601004255.

Reason for revert: b/231244396

Change-Id: Ibc922d80fd85c7a8060d9a8ec667345643dce614
2022-05-02 23:17:59 +00:00
TreeHugger Robot
47928b7d03 Merge "Un-obscure the Telephony phone account ID." into tm-dev am: fc9fdfe2a7 am: fbf761baea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17449715

Change-Id: I8f2e674a190eea952f0e56248e9303001c2714b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 20:56:35 +00:00
Thomas Stuart
a1ca66fe75 fix log spewing coming from Telecom#LogUtils
LogUtils was causing a ~7k line log spew in the
utomation tests.

new var created in Telecom Log Frameworks file that can
gate ceratin lines causing log spew.

bug: 224667124
Test: manual, looked through test logs and log spew lines removed
Change-Id: I5aac180832c0c26af201d1286727cc3e9c67d207
2022-04-30 16:32:29 -07:00
Tyler Gunn
f601004255 Un-obscure the Telephony phone account ID.
With the upcoming changes in T to move telephony phone account handles to
use subid instead of ICCID, the id of telephony phone account handles
no longer needs to be Log.pii-ed.  These phone accounts have been hard to
diagnose in most bug reports due to the obfuscation.

Bug: 226972613
Test: Manual testing; place calls and verify Telephony account handles are now visible.
Change-Id: I5ff66571658c2b81b83e3f7d1936e3e805598769
2022-04-26 20:05:19 +00:00
Xin Li
b2f021295c Merge sc-v2-dev-plus-aosp-without-vendor@8433047
Bug: 226662282
Merged-In: I6541f7d49cb932c85374bf9acf777038b888e873
Change-Id: I95df36a778a7fa9ea52fe0bba2332534d6288032
2022-04-18 21:01:07 +00:00
Tyler Gunn
d049b95370 Merge "Add telecom log marking shell command." am: 5b04c63c64 am: b984978ad7 am: 5f44a37baa am: e1edc97d38 am: 2d1b010c55
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2061586

Change-Id: I8a0c1569f1e23e9fdc8de86f96d8bdb40ee5d1d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 16:57:50 +00:00
Tyler Gunn
e1edc97d38 Merge "Add telecom log marking shell command." am: 5b04c63c64 am: b984978ad7 am: 5f44a37baa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2061586

Change-Id: I8b7c0ed95bb77dd0761eebafa2deb645ec728163
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 16:36:33 +00:00
Tyler Gunn
5f44a37baa Merge "Add telecom log marking shell command." am: 5b04c63c64 am: b984978ad7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2061586

Change-Id: Ie11aa20e65536009fab4663bcc362d62facde961
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 16:14:54 +00:00
Tyler Gunn
5b04c63c64 Merge "Add telecom log marking shell command." 2022-04-13 15:36:12 +00:00
Tyler Gunn
043bb30f98 Add telecom log marking shell command.
We often get bugs where testers have executed a LONG list of test steps.
It becomes extremely difficult to know where in the logs corresponds to
which test script step.

This adds a new telecom shell command:
adb shell telecom log-mark Testing 1 2 3

This command adds a USER_LOG_MARK event log item to all ongoing calls and
to the general telecom logs with the specified message.

Test: Tested using the new shell command to mark the telecom logs in and out of calls.
Fixes: 228895073
Change-Id: Ic11edc777e57a4fc8748a42c931379faf7cea671
2022-04-12 11:14:14 -07:00