Commit Graph

3415 Commits

Author SHA1 Message Date
Hall Liu
226c905c08 Merge "Modify LocationAccessPolicy to use LocationManager" 2018-03-16 01:20:54 +00:00
Hall Liu
d7a1c9dd76 Modify LocationAccessPolicy to use LocationManager
Remove the direct settings lookup since it's been deprecated.

Bug: 72886046
Test: run CTS
Change-Id: I00f11f46f20f86e91147b1232263b6c9a5d8c6b4
2018-03-15 13:49:46 -07:00
TreeHugger Robot
5baeeefe93 Merge "Allow carrier-privileged apps to register telephony listeners." 2018-03-15 02:35:45 +00:00
Shuo Qian
9e4b300e60 Merge "Check AppOps bit for TelephonyManager#getForbiddenPlmns" 2018-03-15 01:18:15 +00:00
Jeff Davidson
62b994b3cf Allow carrier-privileged apps to register telephony listeners.
For TelephonyManager#listen, we check carrier privileges if
READ_PHONE_STATE is missing for any calls which enforce the
permission. For calls which check it and behave differently (by
redacting sensitive info), we defer the permission check until the
actual event occurs, at which point it is checked based on the current
state of the device.

For SubscriptionManager#addOnSubscriptionsChangedListener, we remove
the existing permission check for READ_PHONE_STATE altogether. The
event itself contains no information, and reading subscriptions still
requires either READ_PHONE_STATE or carrier privileges on the
subscription in question.

Also updates incorrect Javadoc on
PhoneStateListener#LISTEN_SIGNAL_STRENGTH, which does not actually
check any permissions by design.

Bug: 70041899
Fixes: 74034127
Test: TreeHugger + E2E test w/ a carrier-privileged app
Change-Id: I84a56ad3972b9edcfdefcbb43ef174c54cdcac00
2018-03-14 14:15:35 -07:00
Vasu Nori
84db0f558a Add constants for the new table: sms-changes.
This table is used by Auto code to keep track of changes to locally
stored SMS messages. These changes are propagated to the phone.

Bug: 71633682

Test: tested manually with messaging app.
Change-Id: I8bd8f5f375a9229de2b9de5ef09e5e1e9a97a4ca
2018-03-14 21:02:48 +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
c2493ee1ee Merge "Update API docs for Telephony call state reporting." 2018-03-14 14:59:52 +00:00
Qingxi Li
94b00b6b16 Merge "Add API to check extended APDU Supported" into pi-dev
am: d78e0451ea

Change-Id: I57edccff74fd6ab03ccc25566938f7e782a6f3f2
2018-03-14 00:10:29 +00:00
Treehugger Robot
985b17957a Merge "Allow carrier privileged apps to access Telephony/Subscription APIs." 2018-03-14 00:10:12 +00:00
Qingxi Li
d78e0451ea Merge "Add API to check extended APDU Supported" into pi-dev 2018-03-13 23:00:10 +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
Hall Liu
884f46e154 Merge "Add IntDef for MBMS download result" am: 54b8ab7333
am: 711c5c7415

Change-Id: I92bc2b40b4f08c9123a1b97f1532d8b5e4ecedb0
2018-03-13 21:54:35 +00:00
Brad Ebinger
feb9daffff Merge "Remove unneeded notify AIDL API" into pi-dev 2018-03-13 21:26:36 +00:00
Brad Ebinger
fc1ac6c9a8 Merge "Support Dynamic ImsService Querying" into pi-dev 2018-03-13 20:53:53 +00:00
Qingxi Li
346bddee19 Add API to check extended APDU Supported
Add API UiccSlotInfo#getIsExtendedApduSupported

Bug: 68999147
Test: TreeHugger & E2E
Change-Id: Ia400a23c35332356deaa214861f6f5ffe47c8092
2018-03-13 13:41:50 -07:00
Hall Liu
54b8ab7333 Merge "Add IntDef for MBMS download result" 2018-03-13 20:10:38 +00:00
yinxu
e6be615ca4 Merge "Catch the RuntimeException for stopScan()" into pi-dev
am: ed9ee780a4

Change-Id: I6815cbc5e896d6e24ea3abc5a258e8e6ecac0135
2018-03-13 19:47:30 +00:00
yinxu
40273bc5b2 Merge "Fix a bug when calling onError(int)" into pi-dev
am: f7e6b29718

Change-Id: I51b497c085a7e3ef16b77d1039459b04c28d8f7d
2018-03-13 19:38:10 +00:00
TreeHugger Robot
ed9ee780a4 Merge "Catch the RuntimeException for stopScan()" into pi-dev 2018-03-13 19:18:42 +00:00
TreeHugger Robot
f7e6b29718 Merge "Fix a bug when calling onError(int)" into pi-dev 2018-03-13 18:47:28 +00:00
Brad Ebinger
6dbe7997c2 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
Merged-In: I4762bdef59a8adec8ce41972489c65f2d180a3d4
Change-Id: I8c9cc39fa73861d7a9792709e1517d391230abfa
2018-03-13 11:33:52 -07:00
Hall Liu
26440f7fa6 Add IntDef for MBMS download result
Change-Id: Idd8434e65691fc5d08f5427add6aec1870b76619
Fixes: 74409057
Test: compiles, no functionality change
2018-03-13 11:29:33 -07:00
Treehugger Robot
57479b64b7 Merge "Carrier id api rename" 2018-03-13 18:28:50 +00:00
Brad Ebinger
8ad000953e Merge "Remove unneeded notify AIDL API" am: 991f8b0c34
am: b54c058bb6

Change-Id: I4762bdef59a8adec8ce41972489c65f2d180a3d4
2018-03-13 18:26:17 +00:00
Brad Ebinger
70d93053dc Merge "Remove IMS Emergency Calling availability API" am: 4b10333c26
am: 56b387aaf1

Change-Id: I6b8ba0608c540113ce7303907ec632989c6422bc
2018-03-13 18:10:13 +00:00
Brad Ebinger
9c750fe77f 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

Merged-In: I4d7e9ba630739ade83e3242488f330ea6e73bbd7
Change-Id: Idb95f7651af200026d62e8b29eaed30bc0ebc9d3
2018-03-13 11:06:38 -07:00
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
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