Commit Graph

291 Commits

Author SHA1 Message Date
Shuo Qian
a63d125010 Merge "Companion InCallService API review" am: b7cc3c6106
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1607479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib967a0256b39150a190dc4cb7b8b7f7a00d3fdd7
2021-03-01 18:57:21 +00:00
sqian
7a2b711b00 Companion InCallService API review
Test: atest; make docs
Bug: 179116441
Change-Id: Id75e727f6c3fc42132a80f7258bf790be79acf19
Merged-In: Id75e727f6c3fc42132a80f7258bf790be79acf19
(cherry picked from commit d30bd60beb)
2021-02-25 20:40:12 +00:00
Xin Li
be473bf819 Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I4bf82035631ccff6d5a6144d6d9b1d203b076851
Change-Id: I1b5f3a672a55eaabba0f5389bab110b395553559
2021-02-21 09:39:53 -08:00
Shuo Qian
850627f948 Add Call Composer API extras in TelecomManager
Test: cts
Bug: 173437870
Change-Id: I46cd9ee72de3d217fa23b368c0b88811cf8ce555
Merged-In: I46cd9ee72de3d217fa23b368c0b88811cf8ce555
(cherry picked from commit 3ed3883ff6)
2020-12-22 23:40:55 +00:00
Aurimas Liutikas
59d98a07a9 Merge "Remove legacy style metalava suppression" am: e1bb600fc7 am: 66574f225e am: 1c505e8cda
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1421698

Change-Id: Ib1b078a6e6c6e19391277d19c0f8d748eee6300b
2020-11-16 21:40:21 +00:00
Aurimas Liutikas
46a165215b Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Merged-In: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:30:12 -08:00
Shuo Qian
7779d92cee Merge "Introduce hasCompanionInCallServiceAccess API" am: 83cc1b62f0 am: 8a37624fe2 am: 94d349257b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495021

Change-Id: I172115cb9ec07a1020f9c635fff9ae2c3bf7cdc1
2020-11-12 23:21:44 +00:00
sqian
dfb7ca01a8 Introduce hasCompanionInCallServiceAccess API
It retruns whether the caller has InCallService access for the companion
 apps. A companion app is an app associated with a physical wearable
 device via the {@link android.companion.CompanionDeviceManager} API.

Test: cts
Bug: 169595473
Change-Id: Id659bfae8556e965d3c31613848bde808f28a858
Merged-In: Id659bfae8556e965d3c31613848bde808f28a858
(cherry picked from commit 4d0652699a)
2020-11-11 22:51:49 +00:00
Tyler Gunn
df4dfb23e0 Merge "Remove redundant permission requirements docs." am: ef2c66e72f am: 7e94f9e844 am: 6f4ea387c3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1490126

Change-Id: I0997f681c52485345cf9ee2c6004b53e74974630
2020-11-09 18:18:48 +00:00
TreeHugger Robot
f6bdb84e9a Merge "Add disconnect message constant Bug: b/171255813 Test: make Change-Id: Ia300b12ecf7d0c1d7d057b48a801b2928354315e" into rvc-qpr-dev am: 265a962d72
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12987248

Change-Id: Id8d13e2cd4b52a616b4e36331d43ba8084033151
2020-11-07 20:36:24 +00:00
Tyler Gunn
1a4f04068a Remove redundant permission requirements docs.
Methods use @RequiresPermission annotation to declare permissions.
This CL removes redundant javadoc which also state the permission reqs;
the @RequiresPermission annotation results in autogenerated permission
docs.
Let some references in the javadoc in where a permission OR a role is a
requirement to use an API, or where permissions had specific API levels
noted in the javadoc.

Test: make docs
Fixes: 137633265
Change-Id: Id1ab7090def6b1d0dbdc8d2cc8586b5341e2eb7e
2020-11-06 13:19:27 -08:00
radhika
0dd90655e1 Add disconnect message constant
Bug: b/171255813
Test: make
Change-Id: Ia300b12ecf7d0c1d7d057b48a801b2928354315e
2020-11-06 17:35:16 +00:00
Anton Hansson
dd7d52f963 Remove @TestApi from @SystemApi symbols
I ran these commands:
    cd frameworks/base
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'

Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
2020-10-19 16:41:01 +01:00
Hall Liu
2ef041183d Expose Telecom constants for use in Telephony
Expose Telecom constants that are used in Telephony in preparation for
mainline. Exposure is a combination of public/system -- those which made
sense for 3pty apps to access were made public.

Fixes: 168551099
Test: atest CtsTelecomTestCases
Change-Id: I688f04ba4ddf0498bad3463888fae71cdff2844a
2020-09-14 18:37:44 -07:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Tyler Gunn
893a602e61 Fix createLaunchEmergencyDialerIntent API behavior when Telecom unavailable.
The API contract for createLaunchEmergencyDialerIntent indicates that
the return value is @NonNull, however the code clearly can return a null
value if either:
1. Telecom is unavailable.
2. There is a remote exception.

Since the API just returns a new ACTION_EMERGENCY_DIAL intent with the
package name of the emergency dialer (from Telecom string resources), we
can provide a reasonable fallback behavior by just returning a new
ACTION_EMERGENCY_DIAL intent with no targeted package.  The system will
still launch the emergency dialer in this case, but if there is a scenario
where multiple emergency dialers are installed on a device, the AOSP one
may get launched instead.  This is, however, better than there being NO
emergency dialer launched.

Test: Comment out call to Telecom service and verify the AOSP emergency
dialer still launches.
Bug: 152187752
Fixes: 155097434
Merged-In: I1665d456dace8e41cc035e792f319d98dd07219c
Change-Id: I06f8a5bebace5b22822f7bb714e14915126b904f
2020-08-05 13:37:27 -07:00
Grace Jia
8587ee5cd5 Expose adhoc conference calling API as public.
Bug: 159944852
Test: make
Change-Id: I2cf39a6fd8a02ca4f2d0c83c484ab12bb13f74c3
2020-07-27 11:18:36 -07:00
Hall Liu
3293dd1e64 Merge "Mark TelecomManager#isRinging as a TestApi" am: 94091aceaa am: 1ab98f185e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1340753

Change-Id: Ic643ef7b31f62a6771c1f1ba5aa0e4c0a16e7e0c
2020-06-17 01:34:55 +00:00
Hall Liu
ae6a918ba9 Mark TelecomManager#isRinging as a TestApi
Bug: 150320750
Test: atest BackgroundCallAudioTest
Change-Id: I048960feb97cd6cf081056ee649e7ea8dacdc8e3
Merged-In: I048960feb97cd6cf081056ee649e7ea8dacdc8e3
2020-06-16 16:52:24 -07:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Andrew Sapperstein
1f6e22cbd8 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
2020-05-01 00:42:22 +00:00
Fan Zhang
f7c753bc16 Add @TestApi to createLaunchEmergencyDialerIntent
Test: build
Bug: 154867896
Change-Id: Id2eb94b233c6c00a81c51d17c5414b3cce5ebdf5
2020-04-28 03:34:17 +00:00
Tyler Gunn
753aa1063e Fix createLaunchEmergencyDialerIntent API behavior when Telecom unavailable.
The API contract for createLaunchEmergencyDialerIntent indicates that
the return value is @NonNull, however the code clearly can return a null
value if either:
1. Telecom is unavailable.
2. There is a remote exception.

Since the API just returns a new ACTION_EMERGENCY_DIAL intent with the
package name of the emergency dialer (from Telecom string resources), we
can provide a reasonable fallback behavior by just returning a new
ACTION_EMERGENCY_DIAL intent with no targeted package.  The system will
still launch the emergency dialer in this case, but if there is a scenario
where multiple emergency dialers are installed on a device, the AOSP one
may get launched instead.  This is, however, better than there being NO
emergency dialer launched.

Test: Comment out call to Telecom service and verify the AOSP emergency
dialer still launches.
Fixes: 152187752

Change-Id: I06f8a5bebace5b22822f7bb714e14915126b904f
2020-04-23 10:16:26 -07:00
Michael Groover
f4cd234bcb Merge "Update permission requirements for TelecomManager#getLine1Number" into rvc-dev 2020-04-09 17:21:42 +00:00
Tyler Gunn
7a665af1d8 Document that some Telecom broadcast and extra keys are dead-ends.
Too late to @deprecate, but we can still at least indicate that the
broadcasts are dead-ends and help the developer know the right way to
go.

Test: make -j offline-sdk-docs; confirm docs look good.
Bug: 148268693
Fixes: 152915447
Change-Id: I88b03a62c812232cf0d5bbeb693cdaf3c2eed3e1
2020-04-08 16:13:41 -07:00
Tyler Gunn
78f77f67eb Document that some Telecom broadcast and extra keys are dead-ends.
Too late to @deprecate, but we can still at least indicate that the
broadcasts are dead-ends and help the developer know the right way to
go.

Test: make -j offline-sdk-docs; confirm docs look good.
Fixes: 148268693
Change-Id: I88b03a62c812232cf0d5bbeb693cdaf3c2eed3e1
2020-03-27 12:55:58 -07:00
Michael Groover
08490f1dc7 Update permission requirements for TelecomManager#getLine1Number
To move READ_PHONE_STATE from a runtime permission to a normal
permission all sensitive APIs guarded by READ_PHONE_STATE must be
moved to another permission. This commit updates the TelecomManager
getLine1Number docs to reflect the new permission requirements;
these requirements are the same as TelephonyManager getLine1Number.

Bug: 136160623
Test: atest TelecomUnitTests:TelecomServiceImplTest
Change-Id: Ibb8e5d1cf16a05e95c2cc2fb68af35dc4bdb0f02
2020-03-25 16:44:55 -07:00
Hall Liu
e576fc4861 Expose various Telecom constants
Expose constants in Telecom that are being used in Telephony.
Note -- nothing is exposed here -- it's a modified cherry pick from
internal where all the APIs have been rehidden.

Bug: 146834818
Test: NA
Change-Id: Ib5cf76183edced3eeffbca87a7c980a85288f937
Merged-In: Ib5cf76183edced3eeffbca87a7c980a85288f937
2020-03-24 18:56:17 -07:00
Hall Liu
dd4859d17d Hide CALL_SOURCE constants in TelecomManager
Fixes: 151184696
Test: build
Change-Id: Ie1886d7cd1bac22da41c942b6507b24bc4238c10
(cherry picked from commit 1b78c5327d)
2020-03-20 22:49:28 +00:00
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Hall Liu
dbb17f1754 Hide APIs introduced in earlier commit
Fixes: 151184696
Test: NA
Change-Id: I5ad3229158a140c4d27cb3bd9b608e7dc165a044
2020-03-10 18:35:04 -07:00
Jack Yu
6bff33b1a8 Added missed incoming call SMS support
Provided a way for carrier to notify their users
about missed incoming call via special SMS.

Bug: 144068181
Test: MissedIncomingCallSmsFilterTest
Merged-In: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
Change-Id: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
2020-02-25 17:29:13 -08:00
Jack Yu
1e1ff94bdb Added missed incoming call SMS support
Provided a way for carrier to notify their users
about missed incoming call via special SMS.

Bug: 144068181
Test: MissedIncomingCallSmsFilterTest
Merged-In: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
Change-Id: Iacf1ce5b2a79761536e2b31a0ea5644622b4913c
(cherry picked from commit 0630b6c358)
2020-02-24 11:58:30 -08:00
Tyler Gunn
f2a5615087 Merge "API Review cleanups." 2020-02-13 18:16:25 +00:00
Tyler Gunn
c9503d6ea6 API Review cleanups.
- New @SystemApis on Conference and PhoneAccount were missing the required
permissions annotations.
- Rename PROPERTY_ASSISTED_DIALING_USED to PROPERTY_ASSISTED_DIALING
- Standardize get/setConnectionStartElapsedRealtimeMillis method naming
across Connection and Conference classes.
- Clarify Conference#sendConferenceEvent API documentation to match the
docs present for similar method in Connection; include some examples of
valid event/extras combinations.
- Update TelecomManager#getDefaultdialerPackage to use UserHandle instead
of userId.
- Move Conference#getConnectionStartElapsedRealtimeMillis to public API
since the setter is already part of the public API.

Test: Run Telecom and Telephony CTS tests.
Test: Run Telephony unit tests.
Test: Perform manual single-party-conference regression test to confirm
that conference behavior does not regress.

Bug: 147301297
Bug: 148286830
Bug: 148284863
Bug: 148284843
Bug: 148287068
Bug: 148285484
Bug: 148285560
Change-Id: I1f446d81859fa109d74af3661a42a0bd224de5aa
Merged-In: I1f446d81859fa109d74af3661a42a0bd224de5aa
2020-02-13 16:53:42 +00:00
Tyler Gunn
8d95abab29 Merge "API Review cleanups." 2020-02-13 16:05:53 +00:00
Tyler Gunn
754493b82f API Review cleanups.
- New @SystemApis on Conference and PhoneAccount were missing the required
permissions annotations.
- Rename PROPERTY_ASSISTED_DIALING_USED to PROPERTY_ASSISTED_DIALING
- Standardize get/setConnectionStartElapsedRealtimeMillis method naming
across Connection and Conference classes.
- Clarify Conference#sendConferenceEvent API documentation to match the
docs present for similar method in Connection; include some examples of
valid event/extras combinations.
- Update TelecomManager#getDefaultdialerPackage to use UserHandle instead
of userId.
- Move Conference#getConnectionStartElapsedRealtimeMillis to public API
since the setter is already part of the public API.

Test: Run Telecom and Telephony CTS tests.
Test: Run Telephony unit tests.
Test: Perform manual single-party-conference regression test to confirm
that conference behavior does not regress.

Bug: 147301297
Bug: 148286830
Bug: 148284863
Bug: 148284843
Bug: 148287068
Bug: 148285484
Bug: 148285560
Change-Id: I1f446d81859fa109d74af3661a42a0bd224de5aa
2020-02-12 20:44:27 -08:00
Automerger Merge Worker
d5a624df59 Merge "Hide Adhoc conference call API." am: 32c29d1ee6 am: 4ccffaef5f am: 042f26589d
Change-Id: Iaadaeb323f2299a0c544a282727e981353a7c9ab
2020-02-11 02:30:27 +00:00
Tyler Gunn
a967af5514 Hide Adhoc conference call API.
Marking the adhoc conference call API as @hide.

Test: make -j update-api
Bug: 148165780
Change-Id: I447ec317c66f0c1b4e7a828635b5dcf8b144e32a
2020-02-10 15:19:07 -08:00
Hall Liu
880983bc0a Merge "Expose various Telecom constants" 2020-01-24 22:46:43 +00:00
Hall Liu
ba820bda90 Expose various Telecom constants
Expose constants in Telecom that are being used in Telephony.

Bug: 146834818
Test: NA
Change-Id: Ib5cf76183edced3eeffbca87a7c980a85288f937
2020-01-24 06:10:35 +00:00
Automerger Merge Worker
cf66c12e8b Merge "Ims: Add support for Adhoc Conference calls" am: 0ab00030a2 am: cac198c770 am: a6d033fa37
Change-Id: I866deb01383fdc648822ef60304f4ca54c36b699
2020-01-22 21:49:47 +00:00
Treehugger Robot
0ab00030a2 Merge "Ims: Add support for Adhoc Conference calls" 2020-01-22 21:16:19 +00:00
Ravi Paluri
80aa2140e3 Ims: Add support for Adhoc Conference calls
Add support for Adhoc Conference calls

Test: Manual
Bug: 62151032
Change-Id: Id50d235595d2133f867848ffdebdfe11e2f1c896
2020-01-22 03:22:58 +00:00
Automerger Merge Worker
5070ebc9cf Merge changes from topic "phone-constants-telecom" am: d982f6c3bb am: f4fafdbd69 am: ce94e0b7da
Change-Id: Id00cd3fe7b7f63115de1332892fc5837ee990ca0
2020-01-17 23:34:49 +00:00
Hall Liu
4a9fde1770 Move PhoneConstants constants to TelecomManager
Move the video-call related constants to TelecomManager since Telecom is
the only consumer.

Bug: 147845600
Bug: 146834818
Test: manually make a video call and verify audio route
Change-Id: I32ddaf6a237460bcf9431fee8a3f31c88d3e9361
2020-01-16 17:38:46 -08:00
Artur Satayev
53ada2ab28 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
      git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'
Merged-In: I853372f3c6fef905553bb31be4f1bb48df735f7a
Change-Id: I853372f3c6fef905553bb31be4f1bb48df735f7a
2020-01-14 15:54:55 +00:00
Philip P. Moltmann
00cf9fbf5d Send featureId to Telecomm noteOps
Bug: 136595429
Test: built
Change-Id: I23a12cd4453096e39dfd22ba556e3f3bc9d19319
2020-01-09 07:03:09 -08:00
Artur Satayev
2ebb31c00c Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv \
      git diff HEAD^ HEAD | grep '^[+-][^+-]' | grep -v '.import'

Change-Id: I853372f3c6fef905553bb31be4f1bb48df735f7a
2020-01-08 16:06:00 +00:00
Fan Zhang
c55310438b Merge "Introduce telecom api to launch emeregency dialer." 2019-12-19 22:07:42 +00:00