Commit Graph

3891 Commits

Author SHA1 Message Date
Brad Ebinger
991f8b0c34 Merge "Remove unneeded notify AIDL API" 2018-03-13 16:31:35 +00:00
Brad Ebinger
4b10333c26 Merge "Remove IMS Emergency Calling availability API" 2018-03-13 16:30:45 +00:00
fionaxu
2a09217315 Carrier id api rename
Rename getAndroidCarrierIdForSubscription to getSimCarrierId.
Drop prefix "Android" as Android is implicit everywhere.

Rename carrierName to CarrierIdName to imply correlation between
these two APIs. This also helps to differentiate from another API
getSimOperatorName.

Bug: 71584605
Test: build
Change-Id: Iba4b1c21522741b8c11836a4c39004064736b4c6
(cherry picked from commit c8d483e488)
Merged-in: Iba4b1c21522741b8c11836a4c39004064736b4c6
2018-03-13 04:43:15 +00:00
Jeff Davidson
da308b62ca Merge "Allow carrier privileged apps to access Telephony/Subscription APIs." into pi-dev
am: bccb356c70

Change-Id: I08f434646119a02ec4a37f71a9484fa561c327bd
2018-03-13 02:03:22 +00:00
Jeff Davidson
e652cb1736 Allow carrier privileged apps to access Telephony/Subscription APIs.
-All public APIs in TelephonyManager which require READ_PHONE_STATE
will now also be documented to accept carrier privileged callers as
well. (One exception is the change callbacks in each, which will be
addressed in a separate CL).

-For SubscriptionManager, callers without READ_PHONE_STATE will now be
able to access the subscription list; however, the resulting list will
be filtered to only include subscriptions for which the caller has
carrier privileges.

-All @see references to hasCarrierPrivileges have been removed in
favor of an inline {@link}. The @see section is set apart from the
rest of the Javadoc and thus appears out of context of where it's
actually relevant; moreover, it is often placed in the middle of a
line which makes it invalid. Using {@link} inlines the reference where
it's actually relevant.

-@SuppressAutodoc is added to any public method which has a
@RequiresPermission declaration that isn't a sufficient description of
the allowed callers, i.e. for APIs which accept carrier-privileged
callers, or the default dialer app or other exceptional cases. This
ensures redundant (but incorrect) requires permission declarations
aren't autogenerated.

Bug: 70041899
Test: TreeHugger, unit tests in topic
Change-Id: Ia5cc145c19d99fe2b87e3425bb95281980edef6f
Merged-In: Ia5cc145c19d99fe2b87e3425bb95281980edef6f
(cherry picked from commit bc10ce1efe)
2018-03-12 18:48:03 -07:00
TreeHugger Robot
bccb356c70 Merge "Allow carrier privileged apps to access Telephony/Subscription APIs." into pi-dev 2018-03-13 01:41:35 +00:00
Brad Ebinger
b4c270331a Merge "Support Dynamic ImsService Querying" am: 6fc1a2f0d4
am: 5984254b27

Change-Id: I4d7e9ba630739ade83e3242488f330ea6e73bbd7
2018-03-13 01:08:18 +00:00
Chen Xu
d877fdb2b1 Merge "Carrier id api rename" into pi-dev
am: f78767d2f9

Change-Id: If619579e7c3bba865754b07909bc8864efd6c78b
2018-03-13 00:20:17 +00:00
yinxu
7ea1a49c0a Catch the RuntimeException for stopScan()
Some RuntimeExceptions will be thrown across the binder so we need to
catch RuntimeException even we already catch the RemoteException.

Bug:73750871
Test: Unit Test
Change-Id: Ib72e5ce0f20fbbe913b054314ed3942862c0ab95
2018-03-12 15:55:28 -07:00
Brad Ebinger
6fc1a2f0d4 Merge "Support Dynamic ImsService Querying" 2018-03-12 22:53:47 +00:00
Chen Xu
f78767d2f9 Merge "Carrier id api rename" into pi-dev 2018-03-12 22:49:21 +00:00
Mohamed Abdalkader
9bef850ad9 Merge "Unhide ImsCallProfileConstructor." into pi-dev
am: 7333793eaa

Change-Id: I9133d9a2bca538fd3b099ff5132b8e7460e50074
2018-03-12 21:38:00 +00:00
yinxu
db18cdae66 Fix a bug when calling onError(int)
The lambda expression is executed on executor, so it is possible that
the message has been updated. The correct way is to fetch the
message.arg1 and use that value in the lamda expression.

Bug:73750871
Test: Unit Test
Change-Id: Id13f5fabf7eaad6970ab66a83a17aba7f1eebfce
2018-03-12 14:07:49 -07:00
Mohamed Abdalkader
7333793eaa Merge "Unhide ImsCallProfileConstructor." into pi-dev 2018-03-12 19:54:40 +00:00
Brad Ebinger
05de38f298 Remove unneeded notify AIDL API
Removes the notifyImsFeatureReady
API AIDL, it is called when the callback
is set on the specific ImsFeature
interface.

Bug: 74391574
Test: Manual
Change-Id: I8c9cc39fa73861d7a9792709e1517d391230abfa
2018-03-12 11:13:26 -07:00
Gil O'Neil
d82b356685 Merge "Make TelephonyManager#{set/get}{Voice/Date}ActivationState SystemApis" 2018-03-12 17:28:47 +00:00
Jordan Liu
d865bde7f2 Merge "Fix mLteSignalStrength range check" am: fbf9d61bb2
am: 9b11677ae8

Change-Id: Ia64b3c13a22bf66557db26ae42f162c989abb5af
2018-03-10 02:38:10 +00:00
Treehugger Robot
fbf9d61bb2 Merge "Fix mLteSignalStrength range check" 2018-03-10 00:40:19 +00:00
Eric Schwarzenbach
2fcbbd11e3 Merge "Add Duplex mode to ServiceState." am: 908bf936a5
am: 3bb160af29

Change-Id: I3b61a8c452989e7f80fc59f2c126b8b4abf2ad22
2018-03-10 00:17:06 +00:00
Jordan Liu
32e6d464f1 Fix mLteSignalStrength range check
The previous check is wrong based on the spec, and does not match the
HAL definition either.

Change-Id: Idb1c209f11a76421d477f8a1d270e23d86d621b1
Fixes: 74026897
Test: manual
2018-03-09 14:35:08 -08:00
Eric Schwarzenbach
2c1a177902 Add Duplex mode to ServiceState.
Adds getChannelNumber() to CellIdentity.
Creates a static utility class to calculate the duplex mode from an
EARFCN.

Bug: 73728783
Test: runtest frameworks-telephony
Change-Id: I5b5c4efa7e17594ce9397cf65e129147affe96bd
Merged-In: I5b5c4efa7e17594ce9397cf65e129147affe96bd
(cherry picked from commit a483ce3bfd)
2018-03-09 13:22:30 -08:00
Eric Schwarzenbach
908bf936a5 Merge "Add Duplex mode to ServiceState." 2018-03-09 21:19:10 +00:00
Tyler Gunn
48c570b09f Support enhanced call blocking function
- Add new carrier config to determine whether to enable
enhanced call blocking feature.
- Add new I/F to get/set the call blocking enabled status.
- Add new API to support checking whether a number is
block number with specific extras.

Bug: 28189985
Test: Manual
Merged-In: Ic89223cd31a4a8f3552360565b772315ec271902
Change-Id: Ic89223cd31a4a8f3552360565b772315ec271902
(cherry picked from commit 72e05c0382)
2018-03-09 20:44:44 +00:00
Jeff Davidson
3c0415aeb8 Allow carrier privileged apps to access Telephony/Subscription APIs.
-All public APIs in TelephonyManager which require READ_PHONE_STATE
will now also be documented to accept carrier privileged callers as
well. (One exception is the change callbacks in each, which will be
addressed in a separate CL).

-For SubscriptionManager, callers without READ_PHONE_STATE will now be
able to access the subscription list; however, the resulting list will
be filtered to only include subscriptions for which the caller has
carrier privileges.

-All @see references to hasCarrierPrivileges have been removed in
favor of an inline {@link}. The @see section is set apart from the
rest of the Javadoc and thus appears out of context of where it's
actually relevant; moreover, it is often placed in the middle of a
line which makes it invalid. Using {@link} inlines the reference where
it's actually relevant.

-@SuppressAutodoc is added to any public method which has a
@RequiresPermission declaration that isn't a sufficient description of
the allowed callers, i.e. for APIs which accept carrier-privileged
callers, or the default dialer app or other exceptional cases. This
ensures redundant (but incorrect) requires permission declarations
aren't autogenerated.

Bug: 70041899
Test: TreeHugger, unit tests in topic
Change-Id: Ia5cc145c19d99fe2b87e3425bb95281980edef6f
Merged-In: Ia5cc145c19d99fe2b87e3425bb95281980edef6f
(cherry picked from commit bc10ce1efe)
2018-03-09 20:27:43 +00:00
Chen Xu
6ccb19234e Merge "Remove RuntimeException throws from TelephonyManager" into pi-dev
am: 85c0e8787d

Change-Id: I1be18e332e93e84b9502aa26e4057662070d562d
2018-03-09 18:26:46 +00:00
Ying Xu
3cec8d5336 Merge changes I64009362,I8ebb617c into pi-dev
* changes:
  Do not throw RuntimeException from stopScan().
  Address the API review comments.
2018-03-09 17:44:09 +00:00
Chen Xu
85c0e8787d Merge "Remove RuntimeException throws from TelephonyManager" into pi-dev 2018-03-09 17:02:41 +00:00
Hall Liu
427e43eba1 Add additional logging for EMBMS edge cases
Add logging when failing to delete temp files or write download
tokens.

Test: logging only
Change-Id: Id7836f3660d37d8cd94580d221c95b2c15c2cb68
2018-03-08 17:45:12 -08:00
Tyler Gunn
d66b8cf06c Merge "Support enhanced call blocking function" am: fdcdaee2d1
am: b70f2a1886

Change-Id: I70820d0d46a6c54de10b03e129a4b4df97e84a1e
2018-03-09 01:27:39 +00:00
yinxu
9921cf9fe1 Merge "Do not throw RuntimeException from stopScan()." am: 7ac5deaf38
am: 9846b53926

Change-Id: I09c905f0a7f54e3b24b94793d14f46ad9c56cf3c
2018-03-09 00:54:47 +00:00
Brad Ebinger
2e665a98b3 Remove IMS Emergency Calling availability API
Moving to an async update model for updating
IMS emergency calling availability, so this
API is unneeded.

Bug: 74389647
Test: Telephony ImsService testapp
Change-Id: Ib7b7dc5b1438f038b370ae9faf152fb15ed4acd5
2018-03-08 16:21:42 -08:00
fionaxu
c8d483e488 Carrier id api rename
Rename getAndroidCarrierIdForSubscription to getSimCarrierId.
Drop prefix "Android" as Android is implicit everywhere.

Rename carrierName to CarrierIdName to imply correlation between
these two APIs. This also helps to differentiate from another API
getSimOperatorName.

Bug: 71584605
Test: build
Change-Id: Iba4b1c21522741b8c11836a4c39004064736b4c6
2018-03-08 15:43:28 -08:00
Tyler Gunn
fdcdaee2d1 Merge "Support enhanced call blocking function" 2018-03-08 23:21:16 +00:00
Mohamed Abdalkader
4afdae952e Unhide ImsCallProfileConstructor.
- Unhide ImsCallProfileConstructor.
- instead of unhiding mMediaProfile added a setter simillar to other
fields.
- Unhide ImsMediaProfile constructor to be able to use it in
ImsCallProfileConstructor.

Test: manual
Bug:74391594
Change-Id: I591e357040d254c3f7225748dc53b66aa820f9c4
2018-03-08 21:55:33 +00:00
Brad Ebinger
cb533c5885 Added Locking for MmTelFeature
oneway binder methods were not locked, causing the
possible condition where the method was called again
before the previous call to that method completed.

Bug: 74119196
Test: Manual, Telephony Unit Testing
Change-Id: I794d5f7ea6f091ca83aa71a438c204ac97fad7a1
2018-03-08 13:48:05 -08:00
fionaxu
f5c0da3dec Remove RuntimeException throws from TelephonyManager
scrub exceptions from remote or due to phone service not ready.
This is in consistent with other APIs in TelephonyManager.

TODO: investigate appropriate way to handle exceptions in synchronous
APIs e.g. checked exception for those internal service failure.
tracked by b/74401420

Bug: 74016743
Test: Build
Change-Id: Ie1a07f57c2e3a70e5ac6c3ffa238c2209b34f2b8
2018-03-08 13:40:19 -08:00
yinxu
70c5286f98 Do not throw RuntimeException from stopScan().
This is a clean cherry-pick from
https://android-review.googlesource.com/#/c/platform/frameworks/base/+/635589/

Bug:73750871
Test: Unit Test
Change-Id: I640093627c103fe1d2fe5707e6854ba748789919
Merged-in: I640093627c103fe1d2fe5707e6854ba748789919
(cherry picked from commit 5e366e31ae)
2018-03-08 13:32:25 -08:00
Treehugger Robot
7ac5deaf38 Merge "Do not throw RuntimeException from stopScan()." 2018-03-08 19:41:20 +00:00
Brad Ebinger
a33eddcdd3 Support Dynamic ImsService Querying
1) Provide a "default" impl for MmTelFeature
instead of returning null.

2) Introduce a FeatureSlotPair, which maps a SIM
slot ID to a ImsFeature. This allows the ImsService
to provide which features it supports for multi-SIM
phones.

3) Pipe through ImsResolver state to help prevent IMS
operation when the ImsResolver is in the process of
figuring out feature capabilities.

Test: Telephony ImsService test app, telephony unit tests
Bug: 72642524

Change-Id: Idb95f7651af200026d62e8b29eaed30bc0ebc9d3
2018-03-08 10:14:03 -08:00
Eric Schwarzenbach
a483ce3bfd Add Duplex mode to ServiceState.
Adds getChannelNumber() to CellIdentity.
Creates a static utility class to calculate the duplex mode from an
EARFCN.

Bug: 73728783
Test: runtest frameworks-telephony
Change-Id: I5b5c4efa7e17594ce9397cf65e129147affe96bd
2018-03-08 07:39:32 -08:00
Ruijie Bai
99ca124212 Support enhanced call blocking function
- Add new carrier config to determine whether to enable
enhanced call blocking feature.
- Add new I/F to get/set the call blocking enabled status.
- Add new API to support checking whether a number is
block number with specific extras.

Bug: 28189985
Test: Manual
Change-Id: I7e2fdaecf4c93f3513d756e65bab8e2c2c0b7440
2018-03-08 07:29:20 -08:00
Jordan Liu
f66deb6c37 Merge "Initialize mWcdmaRscpAsu and fix invalid value for asu" am: 36886b6f15
am: 0c345309bf

Change-Id: Ieed1d385da08c5e06ea2cafe076d84522af5cf8d
2018-03-08 01:20:27 +00:00
takeshi tanigawa
67bbf70022 Initialize mWcdmaRscpAsu and fix invalid value for asu
Initialize mWcdmaRscpAsu in the constructor.
Update an invalid value of asu from -1 to 255.

Test: auto - Passed SignalStrengthTest
Bug: 71329173
Change-Id: Ic6c03fa3c405377b23159038a1e23a45ba87239c
Merged-In: Ic6c03fa3c405377b23159038a1e23a45ba87239c
2018-03-07 16:21:40 -08:00
Jordan Liu
36886b6f15 Merge "Initialize mWcdmaRscpAsu and fix invalid value for asu" 2018-03-07 23:41:41 +00:00
yinxu
5e366e31ae Do not throw RuntimeException from stopScan().
Bug:73750871
Test: Unit Test
Change-Id: I640093627c103fe1d2fe5707e6854ba748789919
2018-03-07 13:49:51 -08:00
Nathan Harold
1a1dc60ff5 Merge changes from topics "pick-tdscdma", "wcdma-rscp" into pi-dev
* changes:
  Update SignalStrength to use ASU for TD-SDCMA
  Customize the WCDMA signal strength based on RSCP
2018-03-07 19:22:32 +00:00
yinxu
cd56112962 Merge "Address the API review comments." am: 322ff16301
am: 904826d293

Change-Id: I4de5c601e23004c934684d995bb916b654a42247
2018-03-07 19:15:01 +00:00
yinxu
8aac40520b Address the API review comments.
This is a clean cherry-pick from:
https://android-review.git.corp.google.com/c/platform/frameworks/base/+/632313

Bug:73750871
Test: Unit Test
Change-Id: I8ebb617c819c7604957b3c086098ef5074d70f78
Merged-in: I8ebb617c819c7604957b3c086098ef5074d70f78
(cherry picked from commit 1abe9b187c)
2018-03-07 09:50:55 -08:00
Treehugger Robot
322ff16301 Merge "Address the API review comments." 2018-03-07 17:40:20 +00:00
takeshi tanigawa
3803a24547 Initialize mWcdmaRscpAsu and fix invalid value for asu
Initialize mWcdmaRscpAsu in the constructor.
Update an invalid value of asu from -1 to 255.

Test: auto - Passed SignalStrengthTest
Bug: 71329173
Change-Id: Ic6c03fa3c405377b23159038a1e23a45ba87239c
2018-03-07 16:54:12 +09:00