Commit Graph

938 Commits

Author SHA1 Message Date
Kevin Han
3bc7e79eb3 Merge "Add tests for HibernatedAppsPreferenceControllerTest" into sc-dev am: 9351dde1e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14506400

Change-Id: If29857e76e7b659a6366ca9647a511249741aba0
2021-05-13 05:16:22 +00:00
Kevin Han
25ed73fa51 Add tests for HibernatedAppsPreferenceControllerTest
Add tests for getNumHibernated in HibernatedAppsPreferenceController
based off the major use cases.

Bug: 187745929
Test: atest HibernatedAppsPreferenceControllerTest
Change-Id: I7bee75075f12fc1661f1b12da82e6ccb16eaa06d
2021-05-12 13:09:09 -07:00
TreeHugger Robot
0f2524b6e3 Merge "[Provider Model] Show searching sub-title only when the Wi-Fi network is empty" into sc-dev am: a1bfc7daeb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14511218

Change-Id: I9b450f56fa4711a3578b216cb8a186daf5f56298
2021-05-12 07:09:15 +00:00
TreeHugger Robot
a1bfc7daeb Merge "[Provider Model] Show searching sub-title only when the Wi-Fi network is empty" into sc-dev 2021-05-12 06:54:02 +00:00
Weng Su
04ec0e0929 [Provider Model] Show searching sub-title only when the Wi-Fi network is empty
- Screenshot:
  https://screenshot.googleplex.com/7Z5r5AnpAZb6GfQ

Bug: 187886636
Test: manual test
atest -c InternetConnectivityPanelTest

Change-Id: Ib4769746819a5863e4a4981d0c73dda838ae3ae2
2021-05-12 04:09:49 +00:00
TreeHugger Robot
0d3bfddd5b Merge "Implements profile selection tab in Storage Settings" 2021-05-12 03:11:00 +00:00
Hai Zhang
1a50cec60a Merge "Don't add SettingsLib to static_libs in Settings unit test." into sc-dev am: 8a7f55246f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14491512

Change-Id: I3f4472878de17742fe6c5f2fb697cc5693b1af60
2021-05-11 22:55:07 +00:00
Hai Zhang
6bf47f6274 Don't add SettingsLib to static_libs in Settings unit test.
Adding them results in duplicate classes and causes conflict for the R
classes and resource loading.

Meanwhile, correctly removing the SettingsLibSettingsSpinner resulted
in the test failing to find the getSelectedItem() method which is
unused inside Settings app. This is an inherent issue when unit
testing an optimized (and shrunk) app, and since there's no other way
for the test to get the current selected item, this change simply
changes the Settings code to invoke getSelectedItem() as well. This
has exactly the same effect because SettingsSpinnerPreference updates
its mPosition right before calling the OnItemSelectedListener in its
implementation.

Bug: 183340630
Bug: 177638625
Bug: 183342958
Test: atest SettingsSliderPreferenceControllerTest
Test: atest PrivateVolumeForgetTest
Change-Id: Ia26ca923369b41291614fb9bd50dfbd2aac2f0fa
2021-05-11 03:33:08 -07:00
Julia Reynolds
044aeb767d Merge "Handle NLS metadata when provided as strings" into sc-dev am: 333b68d059
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14470497

Change-Id: I5451f21c6519f20050e981ab868f233adeefb393
2021-05-10 16:02:20 +00:00
Julia Reynolds
333b68d059 Merge "Handle NLS metadata when provided as strings" into sc-dev 2021-05-10 15:56:35 +00:00
Tom Hsu
3a5b0d10fe Merge "Show W+ when connected to Carrier Wi-Fi Network" into sc-dev am: fa024d6fc8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14456005

Change-Id: I116e5f2e4f02b620513fd5b6d08eaa131f438b55
2021-05-10 08:54:05 +00:00
Tom Hsu
fa024d6fc8 Merge "Show W+ when connected to Carrier Wi-Fi Network" into sc-dev 2021-05-10 08:35:36 +00:00
Arc Wang
fa6e82b879 Implements profile selection tab in Storage Settings
- StorageDashboardFragment and StorageItemPreferenceController works only
  for one profile per instance.
- StorageAsyncLoader loads for all users(profiles) and regards each user independent.
- SecondaryUserController will not load personal profile user in work profile tab.
- Cleanup some unused profile related files.

Bug: 174964885
Test: atest com.android.settings.deviceinfo
      atest com.android.settings.deviceinfo.storage
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo.storage
Change-Id: I8361c29bc240c519c7261b19522c41439479c1c2
2021-05-10 15:21:33 +08:00
tom hsu
2519077d97 Show W+ when connected to Carrier Wi-Fi Network
Internet picker
  - https://screenshot.googleplex.com/7k4ojF65a8Bis5R
 Internet panel
  - https://hsv.googleplex.com/6749112168873984
Bug: 185431894
Test: atest passed

Change-Id: Ic79686b47f033870ad8e7741f9baf3230dde7b7c
2021-05-10 14:08:05 +08:00
Weng Su
787edc7fd6 Merge "[Provider Model] Add progress bar to internet panel" into sc-dev am: 72c3debb0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14442219

Change-Id: If1522799983b816d12f6f8312d4aec158ca7a3fc
2021-05-10 05:42:37 +00:00
Weng Su
72c3debb0b Merge "[Provider Model] Add progress bar to internet panel" into sc-dev 2021-05-10 05:28:15 +00:00
Weng Su
c407a2d9f8 [Provider Model] Add progress bar to internet panel
- Show progress bar when Wi-Fi scanning

- Show "Searching for networks..." sub-title when Wi-Fi scanning

- Remove "Wi-Fi" from searching networks string

Bug: 178774497
Test: manual test
atest -c InternetConnectivityPanelTest
make RunSettingsRoboTests ROBOTEST_FILTER=PanelFragmentTest

Change-Id: Ic05b939bef3b106845fe90db41eb09f0e15756f4
2021-05-10 05:27:59 +00:00
Julia Reynolds
2fe3273f3a Handle NLS metadata when provided as strings
Test: atest
Bug: 181175697
Change-Id: I40d935ffb7c1fb9f978160d28297da84412501fb
2021-05-07 18:37:10 +00:00
Alex Stetson
b693c7949e Merge "Use shared model for non-system overlay toggle" into sc-dev am: 413893244d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14441754

Change-Id: I88f9322ad1b7d886bfbf597070232d6bf6002174
2021-05-07 14:13:07 +00:00
Alex Stetson
413893244d Merge "Use shared model for non-system overlay toggle" into sc-dev 2021-05-07 14:08:52 +00:00
Yanting Yang
eecd27406c Merge "Add summary back to the homepage" into sc-dev am: c37abc9edb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14442216

Change-Id: Ida5e3fec18839e4ba2ce266aa5b4d2424b65ef3a
2021-05-07 09:14:08 +00:00
Yanting Yang
c37abc9edb Merge "Add summary back to the homepage" into sc-dev 2021-05-07 09:00:32 +00:00
Alex Stetson
aff80d1e14 Use shared model for non-system overlay toggle
Allows settings applications on other platforms to re-use values by
migrating to Settings.secure and moving HideNonSystemOverlayMixin to
SettingsLib.

Bug: 184967544
Test: atest SettingsUnitTests
Change-Id: If9aaeca29ebb8b481d75622934503e368d7435d3
2021-05-06 08:28:19 -07:00
Les Lee
67b79fe9f5 Merge "wifi: Use new API for wifi data usage function" into sc-dev am: 0dc1ee01f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14419446

Change-Id: Id679cd941f052b587f3efb26c1e11787ee58d050
2021-05-06 03:52:02 +00:00
Les Lee
0dc1ee01f8 Merge "wifi: Use new API for wifi data usage function" into sc-dev 2021-05-06 03:17:20 +00:00
TreeHugger Robot
74ae8103aa Merge "[Provider Model] Fix settings crash issue" into sc-dev am: f396c0af28
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14439968

Change-Id: I960b95f216bbb3d8a5f1c94d128a8912be4a184d
2021-05-06 02:33:03 +00:00
TreeHugger Robot
f396c0af28 Merge "[Provider Model] Fix settings crash issue" into sc-dev 2021-05-06 01:52:53 +00:00
Jeremy Goldman
ae056efa5a Merge "Create unit test for the VpnInfoPreference" into sc-dev am: 0a6a6269e3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14436936

Change-Id: Ideedc7704c9e7497c3aaf641fa6450247becfd22
2021-05-06 01:28:30 +00:00
Jeremy Goldman
0a6a6269e3 Merge "Create unit test for the VpnInfoPreference" into sc-dev 2021-05-06 01:08:35 +00:00
Weng Su
88cafbaa24 [Provider Model] Fix settings crash issue
- The GlobalSettingsChangeListener needs to be closed after the life
cycle is destroyed

Bug: 185756174
Bug: 186404332
Bug: 186591527
Test: manual test
atest -c InternetUpdaterTest

Change-Id: I9fbad3b303055c6c7a61ccad8efe69cefef56c58
2021-05-06 05:53:41 +08:00
Yanting Yang
d1312e8e6e Add summary back to the homepage
Also update some summaries with new strings.

Bug: 183586663
Test: robotests & atest & visual

Change-Id: I692be9b34e8867501aaa8c8e40428870b99644f8
2021-05-06 00:27:37 +08:00
Yanting Yang
cd60664cc3 Merge "TopLevelStoragePreferenceControllerTest converted to JUnit" into sc-dev 2021-05-05 07:32:45 +00:00
Jeremy Goldman
8e712c1501 TopLevelStoragePreferenceControllerTest converted to JUnit
Helper function composed to return thread future, to guarantee
concurrent function finishes before test condition is checked.
Additionally a @VisibleForTesting helper function is used rather than
robolectric reflection helpers to set a class variable.

Fixes: 187249674
Test: atest -c TopLevelStoragePreferenceControllerTest
Change-Id: Ia22ebac4baec60f72b8516e9e79998cd788266ab
Merged-In: Ia22ebac4baec60f72b8516e9e79998cd788266ab
(cherry picked from commit 899eb7282d)
2021-05-05 07:31:35 +00:00
Jeremy Goldman
c5cf69b1cf Create unit test for the VpnInfoPreference
Currently the Settings VPN library doesn't including much testing
support, so this is intended as a start, in order to improve reliability
and stability of the area.

Test: atest -c VpnInfoPreferenceTest
Bug: 187245804
Change-Id: Id5acb699e0a68f479f3b0b6e6614c2e4e43b163b
2021-05-05 14:27:36 +08:00
Arc Wang
ddc9e22f72 Merge "Cleanup Storage Settings" into sc-dev am: 3576b10330
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14408668

Change-Id: I23fae74a9cf6b2e0ceeefdf91707b0f5c250271e
2021-05-05 03:38:04 +00:00
Arc Wang
3576b10330 Merge "Cleanup Storage Settings" into sc-dev 2021-05-05 03:13:37 +00:00
lesl
26128e8722 wifi: Use new API for wifi data usage function
For wifi, a old API: buildTemplateWifiWildcard will includes the merged
wifi which is included to mobile usage. It should not double count
again. Call new API: buildTemplateWifi with
NetworkId: NetworkTemplate.WIFI_NETWORKID_ALL
and null subscriberId to get non-merged wifi usage.

Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppDataUsageTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppDataUsagePreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageUtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SettingsDumpServiceTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettingsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=DataUsageInfoControllerTest
Test: Manual Test, wifi data usage count correctly.
Bug: 176396812
Change-Id: Ia4d8fa67ea3cb75c2d35be9ab60e5c5ffa391ffb
2021-05-05 10:33:34 +08:00
Jan Tomljanovic
d11e4ef3a9 Merge "Launch SecurityHub fragment on SECURITY_SETTINGS intent when available." into sc-dev am: b6cea338a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14339810

Change-Id: I0f3b282d3d92d99b87cd230d9168bdf8d6b17cb0
2021-05-04 15:42:47 +00:00
Jan Tomljanovic
b6cea338a0 Merge "Launch SecurityHub fragment on SECURITY_SETTINGS intent when available." into sc-dev 2021-05-04 15:35:43 +00:00
Arc Wang
e64f01ccfc Cleanup Storage Settings
There is AOSP built in file browser for image/video/audio
file category, this change cleanup APP based category
for image/video/audio.

Bug: 183078080
Test: atest com.android.settings.deviceinfo
      atest com.android.settings.deviceinfo.storage
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.deviceinfo.storage
Change-Id: I925fc9296b8c2df5bd793668f66a12beb7744469
2021-05-04 22:21:53 +08:00
TreeHugger Robot
33baa05d95 Merge "Storage Settings Apps category shows image/video/audio APPs" into sc-dev am: 8d1fd73e89
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14186629

Change-Id: I4cf006558fda517dd7db111ee09e84cf17f7454d
2021-05-03 18:33:47 +00:00
Arc Wang
4cd89bb082 Storage Settings Apps category shows image/video/audio APPs
There is AOSP built in file browser for image/video/audio
file category, all APPs except games should be included in
Apps category.

- Shows image/video/audio APPs in APPs category.
- Count Image/Video/Audio APPs storage size to Apps storage size.
- Remove APP size & cache size for Images/Videos/Audios category.

Bug: 170918505
Test: atest StorageAsyncLoaderTest.java
Change-Id: I07e0a3a66a13f36b9e0cbde289d8ba90df4ae295
2021-05-03 20:17:58 +08:00
Jan Tomljanovic
07bffff454 Launch SecurityHub fragment on SECURITY_SETTINGS intent when available.
Test: atest SettingsUnitTests
Test: adb shell am start -a android.settings.SECURITY_SETTINGS opens
SecurityHub screen (when SecurityHub enabled)
Test: assistant opens SecurityHub screen (when SecurityHub enabled) when
given instrucion to "open security settings"
Bug: 183930061

Change-Id: Ie8fcb2f2dce4cd0a2a84c6cd21a0a1c0b2b3665e
2021-04-29 17:38:52 +01:00
SongFerng Wang
112eb9d000 Merge "Ui show "No connection" when WiFi is turned on and no available network" into sc-dev am: 03fbae7fc5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14281929

Change-Id: Id650d942223e5c097c1d16f38c5c6a05ce1566e8
2021-04-28 07:33:08 +00:00
SongFerng Wang
03fbae7fc5 Merge "Ui show "No connection" when WiFi is turned on and no available network" into sc-dev 2021-04-28 07:18:01 +00:00
Tom Hsu
b400088813 Merge "[Provider model] Show no connection during out of service." into sc-dev am: 463805b142
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14187782

Change-Id: I6770d0bc2e3662a4e0b440ad69999552a7d73e58
2021-04-28 06:56:22 +00:00
Tom Hsu
463805b142 Merge "[Provider model] Show no connection during out of service." into sc-dev 2021-04-28 06:32:33 +00:00
SongFerngWang
8e0349a67b Ui show "No connection" when WiFi is turned on and no available network
Follow this table to display the UI.
https://docs.google.com/spreadsheets/d/1w7R7Q3EXkep7iO4VcgioNp00DWas3Xve5i1rWexAkz8/edit#gid=954295315
Bug: 183593681
Test: atest ProviderModelSliceTest
atest ProviderModelSliceHelperTest
atest InternetConnectivityPanelTest
make RunSettingsRoboTests -j

Change-Id: I103f9b2fafe4fc543452a74b7ee7b2e537f879b5
2021-04-28 12:35:37 +08:00
Christine Franks
23b55a9af4 Merge "Support vendor modes in color mode preference" into sc-dev am: 10da1de13e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14128858

Change-Id: Ifb3a89d234bed0e850695bb93e272d3ee5bea024
2021-04-23 06:45:04 +00:00
Christine Franks
10da1de13e Merge "Support vendor modes in color mode preference" into sc-dev 2021-04-23 06:31:18 +00:00