Commit Graph

3405 Commits

Author SHA1 Message Date
Xiangyu/Malcolm Chen
2fc8197b4d Merge "Clean new TelephonyManager API." into pi-dev 2018-03-27 22:42:58 +00:00
Meng Wang
d5e1af54e3 Revert "Unhide enable_apps carrier config key."
This reverts commit 4793b28d3f.

Reason for revert: This is not intended as a public API.

Bug: 62907095
Test: make
Change-Id: Id79f91c72eac3929fa5ee7ac1cdd9df8671a1eb1
(cherry picked from commit f47a426206)
2018-03-27 17:28:19 +00:00
TreeHugger Robot
c2bdecb8c8 Merge "Move alpha long/short to the base CellIdentity according API Review." into pi-dev 2018-03-27 06:40:37 +00:00
Chen Xu
17aa751907 Merge "throw runtimeException for applicable TM APIs" into pi-dev 2018-03-26 23:39:56 +00:00
Hall Liu
8404d082c4 Merge "Modify LocationAccessPolicy to use LocationManager" into pi-dev 2018-03-26 20:59:58 +00:00
Malcolm Chen
636fdbccce Clean new TelephonyManager API.
This is to apply API council's review opinion on a previous commit.

We are reverting previous change, which renamed isDataEnabled and
setDataEnabled to isUserMobileDataEnabled and setUserMobileDataEnabled.
So this commit will remove the new APIs isUserMobileDataEnabled and
setUserMobileDataEnabled, and also rename hidden API isMobileDataEnabled
to isDataCapable.

Bug: 71584593
Test: unittest
Change-Id: I84d65776874e7a7f6e3a9af9ff7ec7dcbd715c2c
2018-03-23 18:51:29 -07:00
TreeHugger Robot
4f2e53fe48 Merge "Unhide ImsReasonInfo Constructor" into pi-dev 2018-03-24 01:12:49 +00:00
Brad Ebinger
2d108c3747 Merge "Parse SMS locally upon error to get message ref" into pi-dev 2018-03-23 23:19:26 +00:00
Hall Liu
ecd4709573 Merge "Split the DownloadStateCallback class into two" into pi-dev 2018-03-23 23:11:46 +00:00
fionaxu
f20f0d916f throw runtimeException for applicable TM APIs
1. This CL revert some API change from ag/3710629.
2. throw runtime exception when running in a non-1000 UID.
3. throw for methods that persist some sort of state and readers could continue to
return placeholder values.
4. for rest of TelephonyManager API cleanup b/74401420.

Bug: 74016743
Test: Build
Change-Id: I2846efc11eebce4a923762f56f09daaf37c44763
2018-03-23 12:04:22 -07:00
Hall Liu
5e35b2d00b Modify LocationAccessPolicy to use LocationManager
Remove the direct settings lookup since it's been deprecated.

Bug: 72886046
Test: run CTS
Change-Id: I00f11f46f20f86e91147b1232263b6c9a5d8c6b4
(cherry picked from commit d7a1c9dd76)
2018-03-23 18:37:07 +00:00
Eric Schwarzenbach
9b29e5caa0 Merge "Change null behavior of getCellBandwidths" into pi-dev 2018-03-23 18:31:43 +00:00
Cassie
21ed3c58e8 Move alpha long/short to the base CellIdentity according API Review.
Bug: 74831568
Test: Telephony sanity
Change-Id: I0ef69e3f18fca111191e1c6329ae13c0860869ba
2018-03-23 11:07:18 -07:00
Brad Ebinger
d4285ad123 Parse SMS locally upon error to get message ref
Parse the SMS locally to get the message ref when
onSmsReceived fails due to the platform being
unavailable. This allows the correct message ref
to be sent back via acknowledgeSms, instead of
the incorrect "0" value.

Bug: 74551838
Test: Manual
Change-Id: I2f8128d8ff4e07bb3720a344cee70fa5fd5d7535
2018-03-23 09:58:27 -07:00
Eric Schwarzenbach
c119a86350 Change null behavior of getCellBandwidths
Returns empty array instead of null when there are
no cell bandwidths.

Bug: 73751023
Test: make, runtest
Change-Id: Idc3f034bbea8f6c3f11dcd125f760b121d2c91d9
2018-03-22 16:51:19 -07:00
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
Mohamed Abdalkader
ca0c1ac304 Unhide ImsReasonInfo Constructor
Test: builds
Bug: 76033384
Change-Id: If1101b82f92e45cd417f34356545363f6f9bf322
2018-03-22 00:40:01 +00:00
Hall Liu
7953997160 Split the DownloadStateCallback class into two
Use individually-registered DownloadStatusListener and
DownloadProgressListener instead to listen for download status and
progress, respectively.

Bug: 74409377
Test: cts
Change-Id: Ifd5289038ffd66eef8bd7916f5256205b49be5f9
2018-03-21 23:39:07 +00: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
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
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
Eric Schwarzenbach
8062b76f21 Merge "Add Duplex mode to ServiceState." into pi-dev 2018-03-14 21:05:43 +00: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