Commit Graph

5966 Commits

Author SHA1 Message Date
Brad Ebinger
22159e86d3 Merge "Add empty CdmaSmsSubaddress to CDMA PDU parsing" into pi-dev 2018-03-20 21:16:31 +00:00
Xi Han
cd6bb7242c Merge "Add @Nullable annotations to getOperatorAlphaLong and getOperatorAlphaShort to CellIdentity." into pi-dev 2018-03-20 20:49:13 +00:00
Amit Mahajan
cfa8591779 Merge "Revert "TelephonyManager System APIs process"" into pi-dev 2018-03-20 19:27:10 +00:00
Cassie
9ba450d805 Add @Nullable annotations to getOperatorAlphaLong and
getOperatorAlphaShort to CellIdentity.

Bug: 75984192
Test: Unit test
Change-Id: I71feb20075559c7b28d4aa346a603f0d11ca69da
2018-03-20 10:47:26 -07:00
Amit Mahajan
71e4c9bfad Revert "TelephonyManager System APIs process"
This reverts commit 2f39856753.

Reason for revert: b/75998747

Bug: 75998747
Merged-in: I4a98388c732249ce2aaf05a57c3a98c15f4bd4b3
Change-Id: I35569102bc311162c3d3550fadb6b4307dbe3af1
2018-03-20 16:21:39 +00:00
TreeHugger Robot
2ca77fe976 Merge "Expose remaining READ_PHONE_STATE and SEND_SMS APIs to carrier apps." into pi-dev 2018-03-20 02:47:50 +00:00
Brad Ebinger
89661faa1b Add empty CdmaSmsSubaddress to CDMA PDU parsing
We were not providing an empty subaddress when
parsing CDMA PDU, which caused an NPE when receiving
CDMA IMS SMS.

Bug: 73994015
Test: Manual, MT/MO SMS
Merged-In: Ic8e24c73cbb9a22236bb153ba290338184504cc3
Change-Id: I07be3ac64341eb9235f6da1b6870ac746188f73a
2018-03-19 15:52:42 -07:00
Brad Ebinger
4f59dce0f8 Merge "Remove IMS Emergency Calling availability API" into pi-dev 2018-03-19 21:12:43 +00:00
TreeHugger Robot
f0aeb0578e Merge "TelephonyManager System APIs process" into pi-dev 2018-03-19 20:55:18 +00:00
sqian
2f39856753 TelephonyManager System APIs process
- lock down some TelephonyManager APIs with system permission
- deprecate some TelephonyManager APIs due to its equivalents
- introduce an aidl interface that handles the current
getPhoneType() functions

The doc: https://docs.google.com/spreadsheets/d/1OJ6EXJ-Zys21mZ1BHgJeWkcfLq0pPxBR765r46ck80U/edit#gid=0

Bug: 62346128
Test: Compile
Change-Id: I5367372f3304e5ad368d0d4775f6e96168243aa3
Merged-In: I5367372f3304e5ad368d0d4775f6e96168243aa3
(cherry picked from commit 3b991aee47)
2018-03-19 11:35:36 -07:00
Brad Ebinger
d4854f11b7 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
Merged-In: I6b8ba0608c540113ce7303907ec632989c6422bc
Change-Id: Ib7b7dc5b1438f038b370ae9faf152fb15ed4acd5
2018-03-19 11:04:00 -07:00
Tej Singh
eee317b7b6 Atoms: Mobile Connection
Atom definitions for MobileConnectionStateChanged and
MobileRadioTechnologyChanged

Also cleans up batterystats.

Bug: b/72320589
Test: verified logs appear in adb logcat -b stats
Change-Id: I9feb258cf6dd4a8c8bf1cffc9566b5d0a851a9fa
2018-03-19 09:48:22 -07:00
Jeff Davidson
03c07f859d Merge "Allow carrier-privileged apps to register telephony listeners." into pi-dev 2018-03-16 23:48:51 +00:00
Jeff Davidson
a4a4c8aea7 Expose remaining READ_PHONE_STATE and SEND_SMS APIs to carrier apps.
Bug: 70177947
Bug: 70041899
Test: Flash / boot; TreeHugger; Unit/CTS tests in topic
Change-Id: I4061becb1d7ceaa58d84e4e3568c1b6e63cfc8d1
2018-03-16 23:27:10 +00:00
Jack Yu
6b4e6a17e9 Merge "Renamed getNetworkId and getSystemId" into pi-dev 2018-03-16 17:39:54 +00:00
Jack Yu
2661fac133 Renamed getNetworkId and getSystemId
1. Renamed getNetworkId() to getCdmaNetworkId()
2. Renamed getSystemId() to getCdmaSystemId()

Test: Build
Bug: 74976831
Change-Id: I2a5fb50a59c3239bd3dca5568991a9dff08839fc
2018-03-15 16:39:19 -07:00
Jeff Davidson
29da89ffbf 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
Merged-In: I84a56ad3972b9edcfdefcbb43ef174c54cdcac00
(cherry pick from commit 62b994b3cf)
2018-03-15 09:59:26 -07:00
sqian
5b65aea4f2 Check AppOps bit for TelephonyManager#getForbiddenPlmns
Bug: 73884967
Test: Telephony Sanity and Compile
Merged-In: I0cf7920e138892fbcab71fae0eed1293f0b2e404
(cherry picked from commit 52102d2868)

Change-Id: I9e3456e5f1e479b0e2b102f6c90db57cd0e977fe
2018-03-14 19:32:23 -07:00
Pengquan Meng
c6556e7cb6 Merge "Telephony(MSIM): Default NW mode property for each slot" into pi-dev 2018-03-15 01:01:15 +00:00
Eric Schwarzenbach
8062b76f21 Merge "Add Duplex mode to ServiceState." into pi-dev 2018-03-14 21:05:43 +00:00
Sandeep Gutta
2a7c0d377d Telephony(MSIM): Default NW mode property for each slot
For dual SIM devices, add provision to configure different default
Network modes for each slot, using the existing system property to
configure this default network modes.

Bug: 28384694
Test: manual - Checked different default NW mode can be set
for each slot.
Merged-Id: I72b11522cb51a425e28ddc407014387a20cb2cd7
Change-Id: I72b11522cb51a425e28ddc407014387a20cb2cd7
2018-03-14 11:53:04 -07:00
Hall Liu
acecfc5858 Merge "Add IntDef for MBMS download result" into pi-dev 2018-03-14 00:37:37 +00:00
Qingxi Li
d78e0451ea Merge "Add API to check extended APDU Supported" into pi-dev 2018-03-13 23:00:10 +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
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
86636fc1d8 Add IntDef for MBMS download result
Change-Id: Idd8434e65691fc5d08f5427add6aec1870b76619
Fixes: 74409057
Test: compiles, no functionality change
2018-03-13 11:31:37 -07: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
TreeHugger Robot
bccb356c70 Merge "Allow carrier privileged apps to access Telephony/Subscription APIs." into pi-dev 2018-03-13 01:41:35 +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
Chen Xu
f78767d2f9 Merge "Carrier id api rename" into pi-dev 2018-03-12 22:49:21 +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
Tyler Gunn
dd72cb529f Merge "Support enhanced call blocking function" into pi-dev 2018-03-12 15:16:04 +00:00
Pengquan Meng
847734cc67 Merge changes from topic "am-59911b1f-fa0c-400c-a3f8-812ac0a8762b" into oc-dev am: fe6a5c4675 am: 5eb85f01d2
am: 037206683b

Change-Id: If981740986af74936a82d496eab591d8009e3613
2018-03-10 01:14:11 +00:00
Pengquan Meng
037206683b Merge changes from topic "am-59911b1f-fa0c-400c-a3f8-812ac0a8762b" into oc-dev am: fe6a5c4675
am: 5eb85f01d2

Change-Id: Iaf8ea26f3739a5c62ce6bb402ae8161ef99b5f80
2018-03-10 00:44:41 +00:00
Pengquan Meng
5eb85f01d2 Merge changes from topic "am-59911b1f-fa0c-400c-a3f8-812ac0a8762b" into oc-dev
am: fe6a5c4675

Change-Id: I4440e9b50e975ea3a20ecd216b83deb83afe2780
2018-03-10 00:20:21 +00: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
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
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
Android Build Merger (Role)
90000baf89 [automerger] Fixed Security Vulnerability of DcParamObject am: 8c55a70728 am: 61f84448eb am: a007cb0734 am: 3b356d5111 am: a61fe8f6c0 am: 3276de21ea am: bd60a681bf am: 5d5e5ca7cb am: f64ab1e93d
Change-Id: I8fc1082b7c6c64cf105246fe374260f72e83a7a8
2018-03-09 04:19:32 +00:00
Android Build Merger (Role)
f64ab1e93d [automerger] Fixed Security Vulnerability of DcParamObject am: 8c55a70728 am: 61f84448eb am: a007cb0734 am: 3b356d5111 am: a61fe8f6c0 am: 3276de21ea am: bd60a681bf am: 5d5e5ca7cb
Change-Id: I3bd9d6f3d290ae125d57a4650b41b8ff6cbb5591
2018-03-09 04:19:26 +00:00
Android Build Merger (Role)
bd60a681bf [automerger] Fixed Security Vulnerability of DcParamObject am: 8c55a70728 am: 61f84448eb am: a007cb0734 am: 3b356d5111 am: a61fe8f6c0 am: 3276de21ea
Change-Id: Ic702e9da64dc5aa8e66db22d72f070140c40bdf6
2018-03-09 04:19:16 +00:00
Android Build Merger (Role)
3276de21ea [automerger] Fixed Security Vulnerability of DcParamObject am: 8c55a70728 am: 61f84448eb am: a007cb0734 am: 3b356d5111 am: a61fe8f6c0
Change-Id: I9206a21355732e408430ceae77d3095793a04072
2018-03-09 04:19:11 +00:00
Android Build Merger (Role)
a61fe8f6c0 [automerger] Fixed Security Vulnerability of DcParamObject am: 8c55a70728 am: 61f84448eb am: a007cb0734 am: 3b356d5111
Change-Id: I96567f3adabce5207b07f71ac3b8fe60944a83f2
2018-03-09 04:19:00 +00:00