Commit Graph

5980 Commits

Author SHA1 Message Date
Ying Xu
812319dc7d Merge "Add more comments for the isConfigForIdentifiedCarrier()" into pi-dev 2018-03-22 21:14:32 +00:00
yinxu
349b644db3 Add more comments for the isConfigForIdentifiedCarrier()
This is a clean cherry-pick from:
https://android-review.git.corp.google.com/c/platform/frameworks/base/+/642231

Bug:74945742
Test: Compile
Change-Id: Ife3fdf797ca8877ec495d61a8aeed56fa20282a7
Merged-in: Ife3fdf797ca8877ec495d61a8aeed56fa20282a7
(cherry picked from commit cea0d8d488)
2018-03-22 12:08:51 -07:00
Brad Ebinger
025cb0c392 Merge "Define phone process as a constant" into pi-dev 2018-03-21 20:38:00 +00:00
Brad Ebinger
fb241e2250 Merge "Added Locking for MmTelFeature" into pi-dev 2018-03-21 18:56:00 +00:00
Brad Ebinger
1078b3a36b Define phone process as a constant
Test: Manual
Bug: 72645729
Merged-In: I8086e4efa15d74bd61c55b72c7b14be4705fcd58
Change-Id: If07728ea2cc0128113ebe947a154f80ff45a7d9d
2018-03-21 09:59:05 -07:00
TreeHugger Robot
9b50f67fff Merge "Use AsyncTask.SERIAL_EXECUTOR as the default executor for scan" into pi-dev 2018-03-21 02:05:12 +00:00
TreeHugger Robot
5d5d6aa28a Merge "Better javadoc and rename several methods in ApnSetting." into pi-dev 2018-03-20 23:38:10 +00:00
Nathan Harold
7eec8e9635 Merge "Add alpha Strings to CellIdentityTdscdma" into pi-dev 2018-03-20 23:35:58 +00:00
Jiuyu Sun
b8651f6fba Merge "Mark eraseSubscriptions as @SystemApi." into pi-dev 2018-03-20 22:53:31 +00:00
Nathan Harold
0acd7eeed4 Add alpha Strings to CellIdentityTdscdma
Add equivalent alphaLong and alphaShort to
TD-SCDMA so that it's equivalent to LTE, WCDMA,
GSM, etc.

Bug: 75980473
Test: compilation
Change-Id: Ibaa8a7daafb44f7fc94f0fd6aaa193b67793eea4
2018-03-20 22:37:45 +00:00
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
yuemingw
7e1298f1a4 Better javadoc and rename several methods in ApnSetting.
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
run cts --module CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testOverrideApn

Bug: 73087996
Change-Id: I5232c92a44ab505946956f81965a205f170aa52b
2018-03-20 18:15:25 +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
yinxu
0d9e55773d Use AsyncTask.SERIAL_EXECUTOR as the default executor for scan
Because there will be multiple callbacks for each scan and they must be
invoked with the same order as they are received by the platform, we
should use AsyncTask.SERIAL_EXECUTOR instead of
AsyncTask.THREAD_POOL_EXECUTOR as the default executor.

This is a clean cherry-pick from:
https://android-review.googlesource.com/#/c/platform/frameworks/base/+/640804/

Bug:74840070
Test: Unit Test, CTS Test
Change-Id: I7333940dad38f7e400a4124486bdb21cea0d5220
Merged-in: I7333940dad38f7e400a4124486bdb21cea0d5220
(cherry picked from commit 2e8d5ed776)
2018-03-20 10:27:37 -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
c14ab64a4a 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
Merged-In: I347c5afb39326e3177667b94db593e76a1c766f9
Change-Id: I794d5f7ea6f091ca83aa71a438c204ac97fad7a1
2018-03-19 11:04:01 -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
Holly Jiuyu Sun
d60a07f022 Mark eraseSubscriptions as @SystemApi.
This is a blocker for P.

Bug: 74621500
Test: test on phone
Change-Id: I9455a0b7594cbd2acbdbba99a725c9866c448a07
2018-03-16 10:43:30 -07: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