Commit Graph

6067 Commits

Author SHA1 Message Date
yuemingw
e31dd1fe95 Merge "Better javadoc and rename several methods in ApnSetting." into pi-dev
am: 5d5d6aa28a

Change-Id: Ifaae67cd03bd979e3aeb40f3a077bdb36d5911e6
2018-03-21 02:51:18 +00:00
Nathan Harold
5b258f6d3e Merge "Add alpha Strings to CellIdentityTdscdma" into pi-dev
am: 7eec8e9635

Change-Id: I0343a43b014f5c09336dad2e108063dc48518269
2018-03-21 02:43:24 +00:00
Jiuyu Sun
eb73734b96 Merge "Mark eraseSubscriptions as @SystemApi." into pi-dev
am: b8651f6fba

Change-Id: I31b7c560e9e2c0c6163b2f4214d897ddc279f51a
2018-03-21 02:31:18 +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
Xi Han
987eb171b4 Merge "Add @Nullable annotations to getOperatorAlphaLong and getOperatorAlphaShort to CellIdentity." into pi-dev
am: cd6bb7242c

Change-Id: I92b19d3aa66088e65736e5562cb40881c9aa954d
2018-03-20 22:00:36 +00:00
Amit Mahajan
04c6962605 Merge "Revert "TelephonyManager System APIs process"" into pi-dev
am: cfa8591779

Change-Id: I9cea061688397e4d407167f8f7b680385c5592cf
2018-03-20 21:27:58 +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
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
Jeff Davidson
1bccf3e781 Merge "Expose remaining READ_PHONE_STATE and SEND_SMS APIs to carrier apps." into pi-dev
am: 2ca77fe976

Change-Id: Ifd1a1fee79b101c566de5fac12a083fdc267da5d
2018-03-20 04:43:16 +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
sqian
4628a8cddd Merge "TelephonyManager System APIs process" into pi-dev
am: f0aeb0578e

Change-Id: If80a92c24d11ab0b48dfdda32a9521f1f7ec4993
2018-03-19 23:07:38 +00:00
Android Build Merger (Role)
0a4a9248b5 Merge "Merge "Atoms: Mobile Connection" into pi-dev am: dba47fcd09" into pi-dev-plus-aosp 2018-03-19 22:55:22 +00:00
Tej Singh
3e39b508f1 Merge "Atoms: Mobile Connection" into pi-dev
am: dba47fcd09

Change-Id: I3008bae7f5ecebbbb79fbe141479d25c6c5f5867
2018-03-19 22:54:01 +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
13b82db5c1 Merge "Add empty CdmaSmsSubaddress to CDMA PDU parsing" am: 78a7b5d44a
am: 4e1563e512

Change-Id: Ic8e24c73cbb9a22236bb153ba290338184504cc3
2018-03-19 22:45:28 +00:00
Brad Ebinger
4f59dce0f8 Merge "Remove IMS Emergency Calling availability API" into pi-dev 2018-03-19 21:12:43 +00:00
Treehugger Robot
78a7b5d44a Merge "Add empty CdmaSmsSubaddress to CDMA PDU parsing" 2018-03-19 21:04:56 +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
be3e094fe9 Merge "Allow carrier-privileged apps to register telephony listeners." into pi-dev-plus-aosp 2018-03-16 23:48:29 +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
5b7103ab97 Merge "Renamed getNetworkId and getSystemId" 2018-03-16 21:50:19 +00:00
Brad Ebinger
d3332bbc5e Merge "Define phone process as a constant" am: 465fdc2b25
am: 6c54d8509a

Change-Id: I8086e4efa15d74bd61c55b72c7b14be4705fcd58
2018-03-16 21:16:08 +00:00
Brad Ebinger
a77af22570 Merge "Added Locking for MmTelFeature" am: d273dea10b
am: 3a92430622

Change-Id: I347c5afb39326e3177667b94db593e76a1c766f9
2018-03-16 20:54:10 +00:00
yinxu
5195c1bb4e Merge "Use AsyncTask.SERIAL_EXECUTOR as the default executor for scan" am: cdbf930883
am: a93e4124b5

Change-Id: I0f67a737f418d105658763e21974dc60216aee1a
2018-03-16 19:52:11 +00:00
Brad Ebinger
465fdc2b25 Merge "Define phone process as a constant" 2018-03-16 18:38:30 +00:00
Brad Ebinger
22018a8ce7 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
Change-Id: I07be3ac64341eb9235f6da1b6870ac746188f73a
2018-03-16 11:34:20 -07:00
Brad Ebinger
d273dea10b Merge "Added Locking for MmTelFeature" 2018-03-16 18:21:07 +00:00
Jack Yu
a4bc10ab2c Merge "Renamed getNetworkId and getSystemId" into pi-dev
am: 6b4e6a17e9

Change-Id: I6abe048410da981bd0adfe9919ad4e7ea734b0c6
2018-03-16 18:17:39 +00:00
Jack Yu
46d2bc06d6 Renamed getNetworkId and getSystemId
1. Renamed getNetworkId() to getCdmaNetworkId()
2. Renamed getSystemId() to getCdmaSystemId()

Test: Build
Bug: 74976831
Merged-In: I2a5fb50a59c3239bd3dca5568991a9dff08839fc
Change-Id: I2a5fb50a59c3239bd3dca5568991a9dff08839fc
(cherry picked from commit 2661fac133)
2018-03-16 11:07:37 -07: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
Treehugger Robot
a9c0419010 Merge "Added CTS test cases for getNetworkId() and getSystemId()" 2018-03-16 17:39:38 +00:00
Jack Yu
260f2fa1fe Added CTS test cases for getNetworkId() and getSystemId()
Bug: 32718590
Test: atest CtsTelephonyTestCases:ServiceStateTest#testServiceState
Merged-In: I5826a59d85028f0350ee39c69553f4e488d6456b
Change-Id: I5826a59d85028f0350ee39c69553f4e488d6456b
(cherry picked from commit 1b8b38928b)
2018-03-16 00:26:33 -07: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
e173cbd343 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 13:47:34 -07:00
yinxu
2e8d5ed776 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.

Bug:74840070
Test: Unit Test, CTS Test
Change-Id: I7333940dad38f7e400a4124486bdb21cea0d5220
2018-03-15 13:28:05 -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
503768d07d Merge "Check AppOps bit for TelephonyManager#getForbiddenPlmns" into pi-dev
am: a97d430aad

Change-Id: I1dac4e925743f016f4fbb11919b4f326082a4db3
2018-03-15 04:55:20 +00: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