Commit Graph

9319 Commits

Author SHA1 Message Date
SongFerng Wang
9ebf723235 Merge "[security] SubscriptionGroup is exposed to unprivileged callers" into qt-dev am: d66da66133
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14440224

Change-Id: Ie22ef595d11fafb5e7751bb1bb3b8be8133239ac
2021-06-08 06:23:01 +00:00
SongFerngWang
873d4bffb2 [security] SubscriptionGroup is exposed to unprivileged callers
SubscriptionInfo.mGroupUUID is not cleared in
conditionallyRemoveIdentifiers if the caller only has READ_PHONE_STATE
(based on a check to checkReadPhoneState) and not READ_DEVICE_IDENTIFIERS.
Bug: 181053462
Test: atest SubscriptionManagerTest

Change-Id: Ic2b62523330dc6e2169ad851715c4ab3da3b29cf
Merged-In: Ic2b62523330dc6e2169ad851715c4ab3da3b29cf
2021-05-06 03:43:49 +00:00
Michael Groover
8750762ce0 resolve merge conflicts of 540b50bbe7 to qt-qpr1-dev
Bug: 173421434
Change-Id: Ie3b327c2ab900616b2137d8347d5e8560484ec40
Merged-In: I9b8786a321b1ba79d81b74c3041589f30df8e9c8
2021-02-08 20:23:21 +00:00
Michael Groover
9b85c6411e resolve merge conflicts of a13fc7f314 to qt-qpr1-dev
Bug: 173421434

Change-Id: Ia5912645861a88e819189321861ffd81240c34d6
Merged-In: I03072c65e1c7101538a7a20541d2ac59a2d213e3
2021-02-05 23:57:15 +00:00
Michael Groover
5aba70130d Add method to clear out SubscriptionInfo#getCardString
In Androird 10 access to device identifiers was limited to apps with
the READ_PRIVILEGED_PHONE_STATE permission, carrier privileges, the
READ_DEVICE_IDENTIFIERS appop set to allow, or those that pass a
device / profile owner check. TelephonyManager#getSimSerialNumber
was guarded behind these new access requirements, but the same value
is still accessible as the cardString from the SubscriptionInfo.
While getCardString is a hidden API SubscriptionInfo#toString can
be used to obtain this value.

Bug: 152057778
Bug: 173421434
Test: atest SubscriptionControllerTest
Change-Id: I9b8786a321b1ba79d81b74c3041589f30df8e9c8
Merged-In: I9b8786a321b1ba79d81b74c3041589f30df8e9c8
2021-01-11 19:46:51 +00:00
Michael Groover
a13fc7f314 Update the getIccId docs to reflect access requirements
In Android 10 access to device identifiers was limited to apps with
the READ_PRIVILEGED_PHONE_STATE permission, carrier privileges, the
READ_DEVICE_IDENTIFIERS appop set to allow, or those that pass a
device / profile owner check. TelephonyManager#getSimSerialNumber
was guarded behind these new access requirements, but the same value
is still accessible via SubscriptionInfo#getIccId. This change
updates the documentation to reflect that the getIccId will no
longer be accessible if the caller does not meet the new access
requirements.

Bug: 131909991
Bug: 173421434
Test: Builds
Change-Id: I03072c65e1c7101538a7a20541d2ac59a2d213e3
Merged-In: I03072c65e1c7101538a7a20541d2ac59a2d213e3
2021-01-11 19:46:18 +00:00
Hall Liu
2994fd8537 Merge "Fix order of uid/pid in LocationAccessPolicy" into qt-dev am: a2b7cd539e
Change-Id: Ibe111442fec745063b27e9804c7125feee1fffc2
2020-04-07 20:19:14 +00:00
Hall Liu
4bf1986a32 Fix order of uid/pid in LocationAccessPolicy
Fix the order in which uid and pid are passed into the permission check.

Test: atest LocationAccessPolicyTest
Fixes: 151330809
Change-Id: I479c8fc123d5a994e8cbe6489aa00bea4abca1c7
Merged-In: I479c8fc123d5a994e8cbe6489aa00bea4abca1c7
2020-04-02 01:06:00 +00:00
Hall Liu
491fbcaeaf Merge "DO NOT MERGE Institute limit on PhoneStateListener" into qt-qpr1-dev 2020-03-20 20:37:51 +00:00
Hall Liu
fa3034f2af DO NOT MERGE Institute limit on PhoneStateListener
Limit apps to 50 concurrently registered instances of PhoneStateListener
via TelephonyManager#listen

Test: atest CtsTelephonyTestCases:PhoneStateListenerTest#testListenerLimit
Bug: 151835251
Change-Id: I8486d86773a1e28b4018620c48003855dae75b9d
2020-03-19 17:19:04 -07:00
Sarah Chin
937136e521 Fix broken link
Test: build
Bug: 151971639
Change-Id: Id77387d41cd4d19661dada0755ab2acd09135447
2020-03-19 14:34:23 -07:00
Sarah Chin
452b3d0550 5G Q backport
Meteredness (SubscriptionPlan, CarrierConfig)
Bandwidth estimates

Bug: 151630253
Test: DcTrackerTest, DataConnectionTest, SubscriptionManagerTest
Test: manual testing with cmd phone cc set-value that unmetered values
      result in NET_CAPABILITY_NOT_METERED
Test: manual testing with TestServiceState that NR_NSA and NR_NSA_MMWAVE
      bandwidths are updated when ServiceState changes
Change-Id: I718fb1540892bd3630439a06955d82f6c35dcdfc
Merged-In: Idb67fb7676adf9e1158113e7b8b08e655f470920
2020-03-19 02:15:02 +00:00
Malcolm Chen
9859e1724b Fix carrier config string typo.
Bug: 148611362
Test: build
Change-Id: Idf0c82a9920c62ecdc595973565656ed9ceedff6
2020-02-27 17:11:43 -08:00
Malcolm Chen
0d3a5aa2aa Add carrier config to skip validation if recently validate.
Bug: 148611362
Test: unittest
Change-Id: I4f4e1f698bf883e6eaf80959f3592562015c70f5
Merged-In: I4f4e1f698bf883e6eaf80959f3592562015c70f5
2020-02-18 16:10:02 -08:00
SongFerngWang
9dfd9a5f33 Supplementary Services(SS) gray out when airplane mode on in Call Settings menu.
add carrier config "KEY_SS_DISABLE_WHEN_AIRPLANE_MODE_BOOL".

Bug: 141284019
Test: when airplane mode on, all of SS UIs are gray out.
Change-Id: I869a267fa5aaebf3b48f20bc70d21d612cd84586
(cherry picked from commit 08972c5b2b)
Merged-In: I869a267fa5aaebf3b48f20bc70d21d612cd84586
2020-01-08 22:05:46 +08:00
Jayachandran C
b9da911011 Remove READ_SMS permission for ACTION_SMS_MMS_DB_CREATED
Bug: 144739528
Test: Build
Change-Id: I27341bf7c1f6fc640ba51360f8a6035cdb86052b
Merged-In: I27341bf7c1f6fc640ba51360f8a6035cdb86052b
2019-12-13 13:55:14 -08:00
Brad Ebinger
9fd5576e60 Add CarrierConfig for roaming PLMNS that will need emer DDS switch
When roaming, we assume that the roaming operator will support
control plane fallback for emergency SUPL. For roaming operators
that we know do not support control plane fallback, we must perform
a DDS switch before dialing an emergency number on that operator.

Bug: 144383368
Test: atest TeleServiceTests; manual
Merged-In: I4a033f89610fd409ea81c40230938720ca76541c
Change-Id: I4a033f89610fd409ea81c40230938720ca76541c
2019-12-12 05:08:45 +00:00
Jack Yu
9d95aff922 When SPN is empty, use PNN in mobile network settings
Added one more name source 'PNN', which has priority
higher than carrier id but lower than EF_SPN.

Bug: 143493866
Test: Manual

Change-Id: I2ef14204d0db018e7f67578a57e56fdbea8b698c
2019-12-06 15:28:30 -08:00
Sooraj Sasindran
74891f2730 Add back off timer configs as carrier config
Add time to determine as ping pong as a carrier config
Add max back off hysteresis time as a carrier config

Test: build
Bug: 143578171
Change-Id: I599aa88c4a8f29ca62aaa2948cc5c7f292b6a827
2019-11-19 12:00:47 -08:00
Xiangyu/Malcolm Chen
d11b16f756 Merge "Don't allow reading IMSI of one active sub if only has carrier privilege on the other." into qt-qpr1-dev 2019-11-09 01:07:49 +00:00
Malcolm Chen
4bff428285 Don't allow reading IMSI of one active sub if only has carrier privilege
on the other.

Bug: 136123413
Test: unittest
Change-Id: I67a0121d3e965f193be9e827533646423502fe70
2019-11-08 13:41:24 -08:00
TreeHugger Robot
fa35152703 Merge "Fixed incorrect WAC decoding" into qt-qpr1-dev 2019-11-07 21:45:06 +00:00
TreeHugger Robot
725dff26a5 Merge "Add comment in getSubscriptionsInGroup about throwing IllegalStateException" into qt-qpr1-dev 2019-11-07 20:50:32 +00:00
Jack Yu
6586ad9e80 Fixed incorrect WAC decoding
Fixed the incorrect warning area coordinate decoding
when data length is greater than 127 bytes.

Bug: 143762197
Test: unit test
Change-Id: I498ccd0933f31898d531dcea307e160ae94653e8
2019-11-07 11:13:31 -08:00
Malcolm Chen
ebc4cff912 Add comment in getSubscriptionsInGroup about throwing IllegalStateException
Bug: 142250528
Test: build
Change-Id: I57b87755f6ddf962721e620f869ff48370e3f2d6
2019-11-06 14:02:46 -08:00
Sooraj Sasindran
04f5ac1af5 Carrier config to switch data if primary is OOS
Carrier config to switch data to primary from cbrs
if primary is OOS
Carrier config to specify back off time from cbrs
to primary

Bug: 143578171
Test: make
Merged-In: I2fbec74b7f00dcb751e38b0f5a336fea8370cbee
Change-Id: I2fbec74b7f00dcb751e38b0f5a336fea8370cbee
2019-11-06 02:06:15 +00:00
Malcolm Chen
f1239756b5 Add a carrier config to specify validation timeout for data switch.
Bug: 142884903
Test: manual test
Change-Id: Id8dc2da05efdf4dd53d03b133cc9f47efd196e02
Merged-In: Id8dc2da05efdf4dd53d03b133cc9f47efd196e02
2019-11-04 18:50:49 +00:00
Nathan Harold
b09250e794 [DO NOT MERGE] Check CellInfoCallback Detail for Null
In cases where the source of the CellInfo fails
but does not generate a Throwable, the detail info
will not be provided and should be null. Inside the
user process, we need to check for null before
dereferencing the detail object. Oops. :-(

Bug: 142706765
Bug: 142421696
Test: manual
Merged-In: I1307d1d7aacef0bbd33bfc73700ee774e12e64c1
Change-Id: I1307d1d7aacef0bbd33bfc73700ee774e12e64c1
(cherry picked from commit fff052067c)
2019-10-28 13:08:48 -07:00
Hall Liu
6652a265c7 Add ImsReasonInfo constant for retrying without RTT
Add CODE_RETRY_ON_IMS_WITHOUT_RTT for the IMS stack to indicate to
Telephony that a call should be retried without RTT enabled.

Bug: 141963475
Test: manual

Change-Id: Ic3aa8856e98d8c34fd98462d71834e69b857eda4
2019-10-12 01:04:42 +00:00
Hall Liu
8718323a76 Fix race in TelephonyScanManager
TelephonyScanManager may sometimes encounter a race condition where
Telephony sends it the first scan result before it has saved the
returned scan ID. This causes a crash in the app that's requesting the
scan.

To fix this, synchronize on mScanInfo while requesting the network scan
so that the handler in TelephonyScanManager will wait for the scan ID to
be saved before processing the first message from Telephony.

Bug: 142068098
Test: manual
Change-Id: I0b2b4c6dc749e21641843818293941704ed870a6
2019-10-09 13:41:51 -07:00
Sarah Chin
06b97e2a38 Add NETWORK_TYPE_NR to Telephony framework
Add NETWORK_CLASS_5_G to TelephonyManager
Add NR to ServiceState

Bug: 135421985
Test: atest FrameworksTelephonyTests
Change-Id: Iaed46354400c7a1ce410eebc246892d7edf448dc
Merged-In: Iaed46354400c7a1ce410eebc246892d7edf448dc
2019-10-07 14:07:51 -07:00
Cheonho Park
8c0b496c97 Merge "Allow signing key rotation" into qt-qpr1-dev 2019-09-18 05:04:12 +00:00
Sooraj Sasindran
12638b96ae Add a carrier config to disable ping test
Add a carrier config to disable ping test before data
switch to opportunistic network.

Bug: 141003010
Test: make
Merged-In: I56835e5b416685fbcf2ab2729aa6a039c7f11806
Change-Id: I56835e5b416685fbcf2ab2729aa6a039c7f11806
2019-09-14 01:39:05 +00:00
Pengquan Meng
c12bf8a9e0 Merge "Support maximum wait time for Cell broadcast" into qt-qpr1-dev 2019-09-06 23:07:37 +00:00
Pengquan Meng
1e1099a123 Support maximum wait time for Cell broadcast
Geo-Fencing Maximum Wait Time a device shall allow to determines it
location meeting operator policy. If the device is unable to determine
its position meeting operator policy within the GeoFencing Maximum Wait Time,
it shall present the alert to the user and discontinue further positioning
determination for the alert.

Bug: 139022202
Test: manual
Merged-In: If3d8d7915f2d86da20c63e99bee01f30e3ea89c0
Change-Id: I5b5c79257706e8606ca6952c5396e4abf2aaf28d
2019-09-05 14:06:14 -07:00
Nazanin Bakhshi
293ecad827 Fix crashes seen when checking for carrierConfig certificates
1. Do not throw exception when packageName is not found
2. Fix NPE caused by null SubscriptionInfo

Bug: 140122832
Test: Utest and manual test
Change-Id: I686647419896a1780f0697b3ed5d319363675f5f
2019-08-30 18:36:27 +00:00
Pengquan Meng
1f64582bdf Support WAC decoding in UMTS format
This add a decoder for WAC information. WAC is appended to the UMTS
cell broadcast message. The encoding is defined in ATIS-0700041.

Bug: 123096618
Test: build & manual test
Merged-In: I73dc22c27c2cfd47000ae65448fbc857ed9aa42f
Change-Id: I73dc22c27c2cfd47000ae65448fbc857ed9aa42f
(cherry picked from commit 14df7e3845369e7254e6aae13160c7e1caa1d28a)
2019-08-23 09:36:46 +00:00
Pengquan Meng
455fc80450 Merge "Add fields to Cellbroadcast" into qt-qpr1-dev 2019-08-22 18:31:05 +00:00
Pengquan Meng
02cfb3bdc8 Add fields to Cellbroadcast
This add some fields to CellBroadcasts in order to support the WEA 3.0
geo-fencing.

Bug: 123096618
Test: atest TelephonyProviderTests
Merged-In: Ied0780cb1b9993e6d8cdb80131ba2f8b8affcb54
Change-Id: Ied0780cb1b9993e6d8cdb80131ba2f8b8affcb54
(cherry picked from commit 5c6e975ce4a973619f20167644475b04e663ee4e)
2019-08-22 18:24:38 +00:00
Pengquan Meng
e20726a2eb Merge "Add geo targeting implementation" into qt-qpr1-dev 2019-08-22 17:13:14 +00:00
SongFerng Wang
c1a2db2320 Merge "Create carrier config to define specific default value of APN types." into qt-qpr1-dev 2019-08-22 09:49:27 +00:00
Nazanin Bakhshi
65371b27c8 add checking for carrierConfigs certificates for psim
Test: utests
Bug: 139133814
Change-Id: I2d5cf7ee4e516ff16a67a5fbef6674a380095888
2019-08-21 21:45:23 +00:00
Nazanin Bakhshi
e6e214e227 Merge "add certs to carrier configs and store them as UiccAccessRules" into qt-qpr1-dev 2019-08-21 21:42:24 +00:00
Pengquan Meng
5429676131 Add geo targeting implementation
This CL adds support for geo targeting, including determining whether a
point is inside a simple polygon and circle.

For the judgment of the point in the polygon, the algorithm implemented
here simply considers the spherical polygon as a 2d plane polygon, which
may be not precisely. However, according to the test of real geographical
coordinates data i.e state/city/stree boundary data, this error is less than
10 meters that within 160 meters requires by the spec.

Bug: 123096618
Test: atest GeoUtils
Merged-In: I51e1fad3b48c1a58fa0510f97d9f5f9335779c30
Change-Id: I51e1fad3b48c1a58fa0510f97d9f5f9335779c30
(cherry picked from commit 7fbc74b66b58dd57deedb7336c5c1e2f0f9e2064)
2019-08-21 14:34:58 -07:00
Sarah Chin
cb97705a1c Merge "Changed regex matching for MCC and MNC" into qt-qpr1-dev 2019-08-21 21:26:53 +00:00
Sarah Chin
e3228ca3fd Changed regex matching for MCC and MNC
Bug: 137942727
Test: atest CellIdentityTest
Change-Id: Iaeb9ff9e2a5a82be66855378831cd52ee49e3c5c
(cherry picked from commit cb76b14fdf)
Merged-In: Iaeb9ff9e2a5a82be66855378831cd52ee49e3c5c
2019-08-21 18:37:51 +00:00
Hall Liu
562a3f81c6 Merge "Add carrier config for ignoring user RTT setting" into qt-r1-dev
am: 5ca4cef9b5

Change-Id: I15a0dc85d3a2c9be599deed826696e4a1c542fce
2019-08-21 11:37:35 -07:00
Hall Liu
5ca4cef9b5 Merge "Add carrier config for ignoring user RTT setting" into qt-r1-dev 2019-08-21 18:28:20 +00:00
Nazanin Bakhshi
6a3a71cb2b add certs to carrier configs and store them as UiccAccessRules
Bug: 138388637
Test: tested with local override and made sure they are read and parsed
Change-Id: I50fb11444f0da33ae48683b834e6ca50941ad1b7
Merged-In: I50fb11444f0da33ae48683b834e6ca50941ad1b7
2019-08-21 18:00:27 +00:00
SongFerng Wang
712fc079a0 Merge "To modify 5G icon carrier config's comment: 5GPlus to 5G_Plus" into qt-qpr1-dev 2019-08-21 03:16:52 +00:00