Commit Graph

91640 Commits

Author SHA1 Message Date
SongFerng Wang
d3a7c75487 Merge changes Ic2ac6a5c,I47dc068e
* changes:
  [MEP] The removale slot can read the esim card
  Changing the condition since the esim may be removable
2022-05-27 14:59:48 +00:00
Betty Chang
e5a21d345d Merge "Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT" 2022-05-27 14:30:02 +00:00
SongFerngWang
7d71d3f451 [MEP] The removale slot can read the esim card
Revert the wrong logic for removale slot part at ag/18579901,
the removable slot can read the esim card.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: Ic2ac6a5cc4d5846b8b1e2ca766348f239bb1b719
Merged-In: Ic2ac6a5cc4d5846b8b1e2ca766348f239bb1b719
2022-05-27 08:54:09 +00:00
SongFerngWang
82bf2a66b7 Changing the condition since the esim may be removable
The condition whether the slot is esim slot should use getIsEuicc
api since the esim may be removable.

Bug: 233338345
Test: atest UiccSlotUtilTest
Change-Id: I47dc068e57a0faa7f7ce85af7933a48caa2c93e4
Merged-In: I47dc068e57a0faa7f7ce85af7933a48caa2c93e4
2022-05-27 07:10:28 +00:00
SongFerng Wang
ed0f3c60ec Merge "Settings: Change array resource sim_color_light to an integer array" 2022-05-27 05:12:32 +00:00
changbetty
012527b81c Move the QrCodeGenerator from Settings to SettingsLib for Wifi and BT
Bug: 214338905
Test: Manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=QrCameraTest
Change-Id: I1ca3e9e0b2cdc9fd3f32da8c5329c0e887ee3427
Merged-In: I1ca3e9e0b2cdc9fd3f32da8c5329c0e887ee3427
2022-05-27 04:05:44 +00:00
Xupei Li
05301c7d1a Settings: Change array resource sim_color_light to an integer array
* It should be an integer array because its items are all color reference, and I found that the translations of this resource can lead to not show SIM color in languages other than English.

Change-Id: I6264abdfd0a49119e0170ae5c4bec437ad4c9e8f
2022-05-26 07:17:58 +00:00
Victor Chang
ba69fd0d3f Merge "Reland "Don't use framework strings for formatting file sizes"" 2022-05-24 10:04:46 +00:00
Treehugger Robot
97b4621c68 Merge "Call CardDatabaseHelper.getInstance() when used and not in onCreate" 2022-05-23 10:21:02 +00:00
Håkan Kvist
6f1b6e3693 Call CardDatabaseHelper.getInstance() when used and not in onCreate
Providers can be created before onCreate is called on the application.
Calling CardDatabaseHelper.getInstance() too early will cause
ContextualCardLoader to call getAppllicationContext before application
has been fully started.

Postpone calling CardDatabaseHelper.getInstance() until database is
accessed.

Test: Start device with sim card inserted and Pin enabled on sim.
  Wait some time before entering sim pin. After entering pin, open
  settings. Verify that settings does not crash.
  Verify that there is no contentProvider exceptions from settings in log.
Bug: 154076590
Change-Id: Id0b6294ca2aeebdc71076299928c4dea5145ba33
2022-05-23 09:08:30 +02:00
SongFerng Wang
27b4578002 Merge "[LE unicast] Disable the "phone calls" when LE is enabled" 2022-05-19 23:56:08 +00:00
SongFerngWang
5350643e7a [LE unicast] Disable the "phone calls" when LE is enabled
The "phone calls" uses the Headset profile, not HFP profile. The ui
uses the wrong profile. It causes the "phone calls" is always enabled
when LE is enabled.

Bug: 231511825
Test: build pass
Change-Id: Ib507352107c0d825b8c7a9605713bc9083259fbd
2022-05-19 15:14:01 +08:00
Roozbeh Pournader
ad389346c8 Reland "Don't use framework strings for formatting file sizes"
Reland http://ag/2529020 because the over-translation issue should be
resolved now.

Modify various formatters to avoid using framework strings for
formatting file sizes.

Also update README instructions for running unit tests.

Bug: 36994779
Bug: 71580745
Bug: 217592956
Test: no new test failures from RunSettingsRoboTests
Test: manual opening the settings page.
Change-Id: Ic4689ab1b76622028004d05e69858228bdc441cf
2022-05-17 16:06:55 +01:00
Treehugger Robot
1143a4e8dc Merge "Settings: Optimize the selected WFD route preference summary" 2022-05-16 11:32:24 +00:00
Jack He
33a080ad7a Merge "Only cancel bonding if pair button is not pressed" 2022-05-10 21:47:29 +00:00
Qasim Javed
419b7fa289 Only cancel bonding if pair button is not pressed
aosp/2093046 cancels bonding unconditionally in onDestroy(), this
results in the user not being able to pair when the pair button is
pressed because onDestroy() is also called in that case.

Only cancel bonding if the user did not press the pair button.

Bug: 231554812
Test: Changed settings app is able to scan after dismissing the dialog
and is also able to pair when the pair button is pressed

Change-Id: I868af9b795f1bb0766656e4619bd06dc8028008a
2022-05-10 11:29:28 -07:00
Treehugger Robot
ab8bdb2bdb Merge "Disable "SIM card lock" when the SIM card is PUK-blocked" 2022-05-10 17:16:13 +00:00
Mattias Nilsson
36c71e9d47 Disable "SIM card lock" when the SIM card is PUK-blocked
For an inserted PUK-blocked SIM card we should not allow
to open lock settings. Add a check for SIM_STATE_PERM_DISABLED
and disable "SIM card lock".

Test: Insert a PUK blocked card and check SIM card lock
Bug: 230370597
Change-Id: I8b468cefe95fb8bd66ab91d6c4569ddb01473fbe
2022-05-10 10:46:56 +02:00
Jack He
3671fb8438 Merge "Cancel bonding upon back gesture." 2022-05-10 00:09:48 +00:00
Qasim Javed
0521856683 Cancel bonding upon back gesture.
When pairing dialog is dismissed using the back gesture, we do not call
cancelBondProcess() for the remote device. Since bonding is not
cancelled and the dialog is dismissed, when the user tries to pair again
and scans for devices, nothing shows up. This is because in case of a
pending bond or pending SDP, the request to search for new devices is
queued.

The correct behavior is to cancel bonding if the pairing dialog is
dismissed using the back gesture. This is similar to what
happens when the pairing dialog is dismissed using the cancel button.

Bug: 231554812
Test: Changed settings app is able to scan after dismissing the dialog

Change-Id: Ia790e345be811be1b60762ff819544d03c5a18fd
2022-05-09 13:11:13 -07:00
Treehugger Robot
2da70f6385 Merge "[Settings] Avoid from crash UI when querying data usage" 2022-05-09 15:46:46 +00:00
Bonian Chen
2c6d8d536e [Settings] Avoid from crash UI when querying data usage
Screen update been requested while querying data usage and response not
yet available.
This change tried to avoid from updating the UI in this case.

Bug: 210664126
Test: local
Merged-In: Id055fbd441936a9842b4acc978a894a855165bb7
Change-Id: Ia57f831d78b12754d60f920a9dbe057400dc4ce2
2022-05-09 16:28:14 +08:00
hoffc
0304a0e88b Settings: Optimize the selected WFD route preference summary
RouteInfo has several status values, such as unavailable status. But according to current logic, unavailable status will be displayed as connnected. it is not reasonable.

Update and optimize the route preference summary with the real WFD status value.

Change-Id: Iacd10e0133d06ef0b86da38cf763fe7def6ed7de
Buganizer: 231656030
2022-05-09 09:22:57 +08:00
Xin Li
8adb561455 Merge "Merge SP2A.220505.002" 2022-05-04 20:30:21 +00:00
Xin Li
c3a9ea7443 Merge SP2A.220505.002
Bug: 231319788
Merged-In: I1def7b37184d6d81f29a5e6e4793b92012dacd9b
Change-Id: I225d05e638e099971b596b8ceeb8bf7bcd8778bd
2022-05-03 20:53:03 +00:00
Neil Fuller
6a44151bc1 Merge "Capitalize TZ display name strings" 2022-05-03 19:22:03 +00:00
Victor Chang
1d6e9cfdf2 Merge "Titlecasing time zone summary" 2022-05-03 11:10:20 +00:00
Victor Chang
20e9b76818 Titlecasing time zone summary
Additional fix:
1. Fixed the SpannableUtil.getResourcesText to actually
preserve Spannable (TtsSpan in this use case)  during formatting.

Bug: 185453652
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.datetime.timezone
Change-Id: Iae5e1d4261ec0a34222ae1d042c7f3f027f2e512
2022-04-29 17:06:46 +01:00
Treehugger Robot
0edc7fb3cb Merge "Update OWNERS file for enterprise modules in Settings" 2022-04-23 18:55:44 +00:00
SongFerng Wang
48967e6466 Merge "[LE unicast] Change the default value for LeContactSharingEnabled" 2022-04-15 07:23:39 +00:00
SongFerngWang
b50430e09d [LE unicast] Change the default value for LeContactSharingEnabled
Bug: 229322144
Test: build pass.
Change-Id: I7673397b9f04df8acb551bdad42dea1f3ece72ff
2022-04-15 15:19:17 +08:00
SongFerng Wang
3e9e489c0c Merge changes I6871db6c,Ia261e3b4,I1588bd4a,I1b81faf0,I9a596440, ...
* changes:
  [MEP] sort the simSlotMapping by logcal slot id
  In E+E, the user can't enable the PSIM
  [MEP] psim's logical slot index is 0
  [MEP] The condition of "null point check" is wrong
  Fix the settings crash when SimDialogActivity is null
  [MEP] The subscriptionInfo's getSimSlotIndex is logical slotId
  [MEP] the port id is wrong
  [MEP] Inserting a pSIM while user has 2 esims, showing the MEP dialog
  [MEP] Refactor SlotSidecar API for all of sim page.
  [MEP]The Esim's PhysicalSlotIndex is wrong
  Lost code for setting the list as visible
  The list does not follow the UX dialog design doc in alert dialog.
  The carrier name is wrong in the dialog
  Refine the mobile data selection UI
2022-04-14 07:08:41 +00:00
SongFerng Wang
3f830cc646 Merge "Hide the Contact sharing toggle for LE audio mode" 2022-04-14 07:07:24 +00:00
Xiao Ma
73d83b69d3 Merge "Remove the legacy config_ethernet_iface_regex from Settings." 2022-04-14 00:50:31 +00:00
SongFerngWang
ef80331fb0 [MEP] sort the simSlotMapping by logcal slot id
The modem assign the simSlotMapping like UiccSlotMapping[
(mPortIndex=0, mPhysicalSlotIndex=0, mLogicalSlotIndex=1),
UiccSlotMapping (mPortIndex=1, mPhysicalSlotIndex=0,
mLogicalSlotIndex=0)]. The settings replace the first one
UiccSlotMapping when user insert psim and the both of esim
profile are not enabled. It is not correct. The root cause is that
the settings did not sort the simSlotMapping by logcal slot id.

Bug: 223662007
Test: atest UiccSlotUtilTest  (PASS)
Change-Id: I6871db6c2d8d7b9f3cb334bb5cd2c7978b5b3b85
Merged-In: I6871db6c2d8d7b9f3cb334bb5cd2c7978b5b3b85
2022-04-14 03:47:20 +08:00
SongFerngWang
ccd55cc5c9 In E+E, the user can't enable the PSIM
In the E+E and there is the empty slot, the user can't enable PSIM.
Since the settings can't set the correct simSlotMapping.

Bug: 222231991
Test: atest UiccSlotUtilTest (All passes) and Build pass
Change-Id: Ia261e3b41c6c4a43a5429815d93ae9f6ff16f0ec
Merged-In: Ia261e3b41c6c4a43a5429815d93ae9f6ff16f0ec
2022-04-14 03:46:28 +08:00
SongFerngWang
2479c9f7bd [MEP] psim's logical slot index is 0
psim's logical slot index is 0, so changing the API and adding test
cases.

Bug: 221839363
Test: atest UiccSlotUtilTest
Change-Id: I1588bd4a2f552a6b41844883b6ad50f1bfec95de
(cherry picked from commit b162438b5d)
Merged-In: I1588bd4a2f552a6b41844883b6ad50f1bfec95de
2022-04-14 03:45:55 +08:00
SongFerngWang
5c0df6913b [MEP] The condition of "null point check" is wrong
The condition of "null point check" is wrong at the
SimSlotChangeHandler.

Bug: 222035986
Test: Build pass. maunal test.
Change-Id: I1b81faf082163643c1d17eae2f66d75b450288fe
(cherry picked from commit f64b2c09c0)
Merged-In: I1b81faf082163643c1d17eae2f66d75b450288fe
2022-04-14 03:41:38 +08:00
SongFerngWang
d786b64ff6 Fix the settings crash when SimDialogActivity is null
The PreferredSimDialogFragment did updateDialog after SimDialogActivity
was finished. It caused the settings crash. This is similar to b/184899699

Bug: 220803944
Test: build pass
Change-Id: I9a5964400a63053e362632944b9e7aa8ec1bbea8
(cherry picked from commit 70bf76a436)
Merged-In: I9a5964400a63053e362632944b9e7aa8ec1bbea8
2022-04-14 03:38:21 +08:00
SongFerngWang
7ab547f1b8 [MEP] The subscriptionInfo's getSimSlotIndex is logical slotId
1. The subscriptionInfo's getSimSlotIndex is logical slotId. The code
   should compare it with uiccSlotMapping.getLogicalSlotIndex()
2. Rename the parameters for the readability.
3. The mobile network selection dialog did not be closed after user clicked.

Bug: 219951253
Test: manual test.
Change-Id: I7fef78547f4e6283791cd15a03275eaefeb50e3c
Merged-In: I7fef78547f4e6283791cd15a03275eaefeb50e3c
2022-04-14 03:37:16 +08:00
SongFerngWang
9ee91da8e1 [MEP] the port id is wrong
The function uses wrong information to get the portId.

Bug: 218907001
Test: manual test.
Change-Id: I70a02299c40ada4c2a700fc035034e8db24b6f03
Merged-In: I70a02299c40ada4c2a700fc035034e8db24b6f03
2022-04-14 03:35:40 +08:00
SongFerngWang
650b048749 [MEP] Inserting a pSIM while user has 2 esims, showing the MEP dialog
Inserting a pSIM while user has 2 esims already active,
the UI shows MEP dialog

Bug: 218451733
Test: manual test. To fake the MEP condition, and then checking the UI
Change-Id: I48fa3d483873315d7e05b39369085c48af779522
Merged-In: I48fa3d483873315d7e05b39369085c48af779522
2022-04-14 03:35:01 +08:00
SongFerngWang
3597302ae1 [MEP] Refactor SlotSidecar API for all of sim page.
remove the SlotSidecar's run() and using new run() with port id
information.

Bug: 218439715
Test: manual test for UI
Change-Id: I81479a0c514f2b8f58b9167b31d357f017732482
Merged-In: I81479a0c514f2b8f58b9167b31d357f017732482
2022-04-14 03:34:17 +08:00
SongFerngWang
d3f3730721 [MEP]The Esim's PhysicalSlotIndex is wrong
Using the getUiccSlotInfo API to get the PhysicalSlotIndex of esim

Bug: 215302360
Test: atest UiccSlotUtilTest
Change-Id: Ic43d6c4a3209d24673769b71b9a148e780ee81ab
Merged-In: Ic43d6c4a3209d24673769b71b9a148e780ee81ab
2022-04-14 03:33:42 +08:00
SongFerngWang
130b739ed1 Lost code for setting the list as visible
the ag/16710087 lost the code.

Bug: 216233391
Test: manual test: check the UI
make RunSettingsRoboTests ROBOTEST_FILTER=SimListDialogFragmentTest (PASS)

Change-Id: If6ad5422a820627873e58b144e7b65a8b0130def
Merged-In: If6ad5422a820627873e58b144e7b65a8b0130def
2022-04-14 03:33:08 +08:00
SongFerngWang
f88ffb09fd The list does not follow the UX dialog design doc in alert dialog.
Please refer the comment#1 at bug and there are change below
- the divider is 4dp
- the item's radius is different in the list.

Bug: 216233391
Test: manual test: check the UI
make RunSettingsRoboTests ROBOTEST_FILTER=SimListDialogFragmentTest (PASS)

Change-Id: I758d60202fcf477aeb49014e60b949e7ad08c082
Merged-In: I758d60202fcf477aeb49014e60b949e7ad08c082
2022-04-14 03:32:16 +08:00
SongFerngWang
f513452d4b The carrier name is wrong in the dialog
The condition is wrong, should use the subId.

Bug: 212195309
Test: build pass. manual test the dialog.
Change-Id: I894c78fccab511f26bf779638cac1f18a07a86c4
Merged-In: I894c78fccab511f26bf779638cac1f18a07a86c4
2022-04-14 03:31:34 +08:00
SongFerngWang
964c7d5eaf Refine the mobile data selection UI
-Adding the margin for bottom at dialog
-Modify the text color of summay in the list at dialog when device is
dark mode.

Bug: 212396431
Test: build pass and check the dialog UI.
Change-Id: I1ec587fd9d64ad67bbf3479c7931c0a901f572cf
Merged-In: I1ec587fd9d64ad67bbf3479c7931c0a901f572cf
2022-04-14 03:30:50 +08:00
arangelov
e4d544ad40 Update OWNERS file for enterprise modules in Settings
Bug: 229101349
Test: none
Change-Id: I4f10d85e0a49c96a1c2fec8199aadfb60b3e19af
2022-04-13 17:08:07 +01:00
SongFerngWang
11b337178a Hide the Contact sharing toggle for LE audio mode
1. Add the device config key
2. Hide the Contact sharing toggle for LE audio mode
Bug: 228415214
Test: manual test and take the screenshots at bug.

Change-Id: I07674d0edbcd642814ed61ccd13cb4e1e42caec3
2022-04-13 22:11:49 +08:00