Commit Graph

40696 Commits

Author SHA1 Message Date
Fabian Kozynski
c8fc56e3bf Merge "Start brightness dialog in same task" 2022-01-06 14:18:52 +00:00
TreeHugger Robot
cdeb1595cf Merge "Fix WifiDialogActivityTest broken" 2022-01-06 13:56:09 +00:00
Weng Su
9bd8f046a9 Fix WifiDialogActivityTest broken
- The ShadowWifiManager class is not working as expected

- Use Mockito class instead of Shadow class

Bug: 175369329
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDialogActivityTest

Change-Id: Idbc851c4d9702be23561c2c48c9d7d077e5f452e
2022-01-06 08:45:40 +00:00
Chen Xu
a1127f5996 Merge "[MEP] Use switchToSub API with pending intent" 2022-01-06 06:18:12 +00:00
TreeHugger Robot
72f9e8eaf0 Merge "Add caller check to com.android.credentials.RESET" 2022-01-06 03:07:42 +00:00
Alex Johnston
4c1272a921 Add caller check to com.android.credentials.RESET
* Only the Settings app can reset credentials
  via com.android.credentials.RESET.
* com.android.credentials.INSTALL should still be
  callable by CertInstaller.

Manual testing steps:
* Install certificate via Settings
* Verify unable to reset certificates via test app
  provided in the bug (app-debug.apk)
* Verify able to reset certificates via Settings
* Verify com.android.credentials.INSTALL isn't changed

Bug: 200164168
Test: manual
Change-Id: I9dfde586616d004befbee529f2ae842d22795065
2022-01-06 01:21:41 +00:00
TreeHugger Robot
1cbb603d60 Merge "FRP bypass defense in the settings app" 2022-01-05 05:37:51 +00:00
Tsung-Mao Fang
07dd833a6a FRP bypass defense in the settings app
Over the last few years, there have been a number of
Factory Reset Protection bypass bugs in the SUW flow.
It's unlikely to defense all points from individual apps.

Therefore, we decide to block some critical pages when
user doesn't complete the SUW flow.

Test: Can't open the certain pages in the suw flow.
Fix: 200746457
Bug: 202975040
Fix: 213091525
Fix: 213090835
Fix: 201561699
Fix: 213090827
Fix: 213090875
Change-Id: Ia18f367109df5af7da0a5acad7702898a459d32e
2022-01-05 12:10:00 +08:00
Stanley Wang
c35cab1c7b Merge "Fix the problem that some items can't be searched in Privacy category." 2022-01-05 01:52:31 +00:00
Michael Groover
d1f76eea72 Merge "Add unaudited exported flag to exposed runtime receivers" 2022-01-03 17:35:02 +00:00
SongFerng Wang
4b906d564d Merge "Refine the mobile data selection UI" 2022-01-03 08:43:57 +00:00
TreeHugger Robot
1ee60270df Merge "Fix overlapping issue for Add a language page" 2021-12-30 12:05:07 +00:00
Mill Chen
28195f52a6 Fix overlapping issue for Add a language page
As the Add a language page changed its parent class, the collapsing
toolbar did not work smoothly. Also the nested scrolling feature of the
locale list is disabled, that caused the overlapping problem.

This change is to make the locale list enable the nested scrolling
feature.

Fixes: 207318265
Test: manual test
Change-Id: I95929cd569c94d392c325e4e5b2a35e78185d0b8
2021-12-30 16:23:18 +08:00
Betty Chang
fe76826c73 Merge "To disable Wi-Fi Direct when user restriction is set" 2021-12-29 09:55:00 +00:00
Weng Su
03f3d9cbe5 Merge "Check WiFi restrictions for WiFi QR code intent" 2021-12-29 09:19:50 +00:00
changbetty
a639d26660 To disable Wi-Fi Direct when user restriction is set
- Remove the Location check for Wi-Fi Direct
 - Add user restriction check for Wi-Fi Direct

Bug: 204288318
Bug: 203170358
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiP2PPreferenceControllerTest
Change-Id: I64dab964b485665dd42c933d8974aeda47f178fe
2021-12-29 07:20:15 +00:00
SongFerngWang
43ebe68063 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
2021-12-29 14:31:13 +08:00
TreeHugger Robot
b74a9a3429 Merge "Fix WiFi toggle issue of Internet Settings" 2021-12-28 22:11:20 +00:00
SongFerng Wang
9e1da95036 Merge "The carrier name is wrong in the dialog" 2021-12-28 14:33:38 +00:00
Fabian Kozynski
cbe9bebb8e Start brightness dialog in same task
That way, enter and exit animations can be overriden

Test: manual
Fixes: 210177675
Change-Id: I77c33a77e3128597bfe09d427ba0c06e7c78136e
2021-12-28 14:16:33 +00:00
Weng Su
0219dc1378 Fix WiFi toggle issue of Internet Settings
- Because b/209906859 needs to add WiFi service check for WiFi-less
pixel project.

- But mWifiManager has not been initialized before the
addWifiSwitchPreferenceController() function, which will cause the
controller to not handle the WiFi switching UI.

- Add a hasWifiManager() function to initialize the WiFi manager and
handle related functions.

Bug: 212211915
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Change-Id: Idc0d4cdc31403f0ab9a4eb787e4c70be605f7ddb
2021-12-28 21:29:45 +08:00
Bonian Chen
779488b1ca Merge "[Settings] Add metrics for supporting performance measurement" 2021-12-28 10:37:44 +00:00
SongFerngWang
b5766e4422 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
2021-12-28 16:39:11 +08:00
Bonian Chen
5306f9674c [Settings] Add metrics for supporting performance measurement
Add metrics log.

Bug: 212360005
Test: local
Change-Id: Ia51831d97f9193343de2da26d932ef9462f54e81
2021-12-28 15:54:44 +08:00
Tom Hsu
8551b0d7c5 Merge "[Panlingual] Remove getCallingPackage and use Uri instead." 2021-12-27 08:32:29 +00:00
Stanley Wang
ff36bcce18 Merge "Fix the problem that the "Default USB configuration" item can not be searched." 2021-12-27 07:07:30 +00:00
Treehugger Robot
00b405cd59 Merge "Clear non bonded device when device picker start" am: 0d0eaad0e3 am: fb9b219b9a am: 4df15611f8 am: adfd4a0dea
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1931647

Change-Id: Ida1c15efbec1b5cfd9fecf4f9abc97c7f2c0b3a2
2021-12-27 06:59:18 +00:00
Treehugger Robot
adfd4a0dea Merge "Clear non bonded device when device picker start" am: 0d0eaad0e3 am: fb9b219b9a am: 4df15611f8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1931647

Change-Id: Ie2f98508e42dd6018744d8de169f7ea49a892ca7
2021-12-27 06:39:59 +00:00
Treehugger Robot
4df15611f8 Merge "Clear non bonded device when device picker start" am: 0d0eaad0e3 am: fb9b219b9a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1931647

Change-Id: Ibba50c2ae901afde68ac7828a10dab3ea9daeac0
2021-12-27 06:29:51 +00:00
TreeHugger Robot
7f04708f44 Merge "Fix potential OOM problem" 2021-12-27 02:49:05 +00:00
Stanley Wang
ff1f09cacd Fix the problem that the "Default USB configuration" item can not
be searched.

The source of problem is that the controller does not extends the
PreferenceControllerMixin.

Fix: 211831988
Test: robo test and see the search result
Change-Id: I8bdc61bd567812ee484a959f2b058f315df9a3b3
2021-12-24 18:52:17 +08:00
Yuri Ufimtsev
b67f0974f2 Merge "Group some Security settings to a separate "Advanced settings" screen" 2021-12-24 10:18:37 +00:00
Stanley Wang
a0146d3fb7 Fix the problem that some items can't be searched in Privacy category.
The source of problem is that the controller returns the wrong
availability status value and the searchable attribut of the preference
is false.

Fix: 200249682
Test: manual test and see the search result
Change-Id: I2265514c49303f6a0910f1be84b281fccb9abb45
2021-12-24 18:09:58 +08:00
TreeHugger Robot
17f15d1213 Merge "Delete useless parameters of string" 2021-12-24 09:50:01 +00:00
Chienyuan
c5b8ae80ea Clear non bonded device when device picker start
Bug: 205258325
Test: manual
Change-Id: I3de46ef79bcf1f643e5cd762b95ad8056237e2c6
2021-12-24 17:42:54 +08:00
Hugh Chen
a08897bcb3 Delete useless parameters of string
Bug: 211766972
Test: build pass
Change-Id: I83969753a5d2f632182e0dd241905474899f1c6d
2021-12-24 03:58:46 +00:00
Zoey Chen
0642a652b7 Merge "[Settings] Should back to previous page when removing the SIM (subinfo is null)" 2021-12-24 03:18:49 +00:00
Tsung-Mao Fang
72f823ba9e Fix potential OOM problem
Prior to this cl, there's a potential vulnerability to
cache huge logging data in the memory.
We send the log out when user didn't trigger any event
in 1 min. However, if user keep triggering any log
event in 1 min, then there's a change to preserve a huge
number logs in the device memory. Then, it causes the OOM.

The solution is to set a logging threshold, once the current
logging number is larger than 150, then we simply send it
out immediately and clean the device memory.

Test: Log can be sent out after meeting the threshold.
Fix: 211323528
Change-Id: I9d507e8d55d6b7f7e682369edf3b5334eb2856ae
2021-12-24 11:01:30 +08:00
Weng Su
26a0fdb4f6 Check WiFi restrictions for WiFi QR code intent
- If WiFi configuration is not allowed, the WiFi QR code intent is
ignored.

- Add SafetyNet Logging to b/202017876.

Bug: 202017876
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDppEnrolleeActivityTest

Change-Id: I147d2f4f4fabe2e24d5d3eaaad701b81059e8eee
2021-12-24 09:44:38 +08:00
Tomasz Wasilczyk
ef9718c922 Merge "Don't crash Network settings if Wi-Fi is not supported." 2021-12-23 19:50:41 +00:00
Yomna Nasser
c17bef1711 Merge "Update "Allow 2G" toggle summary wording." 2021-12-23 15:43:05 +00:00
Zoey Chen
8349ee6a7b [Settings] Should back to previous page when removing the SIM (subinfo is null)
Test: atest
Bug: 211843783
Change-Id: I5fc2ecdf26848af246baab42a11c239a7aa82ee1
2021-12-23 13:29:37 +00:00
tom hsu
4da192d732 [Panlingual] Remove getCallingPackage and use Uri instead.
- Use uri to pass the package name.
 - Allow adb command to start this function

Bug: 211856852
Test: see b/211856852#2

Change-Id: I3d73d32d7546bf0e3db25d952b2caee934f523dc
2021-12-23 13:00:28 +00:00
TreeHugger Robot
11070ba729 Merge "[Settings] Can not launch SIMs page correctly" 2021-12-23 11:07:24 +00:00
Yuri Ufimtsev
4eea126959 Group some Security settings to a separate "Advanced settings" screen
Test: adb shell am start -a android.settings.SECURITY_SETTINGS opens Advanced
Security Settings screen
Test: atest SettingsUnitTests:SecurityAdvancedSettingsTest
Test: atest SettingsUnitTests:SecurityAdvancedSettingsControllerTest

Bug: 204416998

Change-Id: If9c6da812ffb7c046b3b00a084007950801e1d4f
2021-12-23 10:26:46 +00:00
Zoey Chen
0d89c09b3f [Settings] Can not launch SIMs page correctly
The subId should be set from argument when launching MobileNetworkSettings by new SubSettings

Test: atest
Bug: 211843783
Change-Id: Ie2b675af278795930971c61d8b1c1c28b96bf0ee
2021-12-23 09:30:11 +00:00
SongFerng Wang
dcc1ee42c3 Merge "[MEP] disable enabled esim profile before set simSlotMapping" 2021-12-23 09:20:02 +00:00
Betty Chang
8bf6efba9e Merge "To disable Wi-Fi tethering when user restriction is set" 2021-12-23 07:58:48 +00:00
Yomna Nasser
91036f8945 Update "Allow 2G" toggle summary wording.
Update "Allow 2G" toggle summary wording to be more clear regarding
the purpose of the toggle and why it may be disabled.

Bug: b/193693810
Bug: b/196183458
Test: manual & atest -c Enable2gPreferenceControllerTest
Change-Id: Iffef8f4f44105de30392c30ffd44c1d62cd066b8
2021-12-23 07:11:36 +00:00
changbetty
efd5d04ab1 To disable Wi-Fi tethering when user restriction is set
Bug: 203168953
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherPreferenceControllerTest
Change-Id: I749de121c3918382bf03e437e683477bac23cae1
2021-12-23 02:08:44 +00:00