Commit Graph

853 Commits

Author SHA1 Message Date
Beth Thibodeau
8e67634830 Merge "Add recommendation setting and remove app settings" into sc-dev 2021-05-27 16:19:17 +00:00
Rajeev Kumar
265dd55235 Merge "Ensure hibernation exemption toggle uses pre-S flag" into sc-dev 2021-05-26 16:46:58 +00:00
Beth Thibodeau
b7993699ba Add recommendation setting and remove app settings
- Add a new setting to control whether smartspace recommendations are
enabled
- Remove setting to block individual apps from resumption
- Update strings for existing resume setting

Bug: 187925818
Test: atest SettingsProviderTest
Test: atest MediaControlsRecommendationControllerTest
Test: atest MediaControlsPreferenceControllerTest
Change-Id: I4bd6a420e01e8c44f4db8be477557501648cc8d7
2021-05-26 11:00:25 -04:00
Weng Su
9512d53697 Merge "[Provider model] Add "See all" text link to Internet Panel" into sc-dev 2021-05-26 11:45:00 +00:00
Weng Su
a2084a63c6 [Provider model] Add "See all" text link to Internet Panel
- Add "See all" text link at the bottom of the network providers list
  - Don't show "See all" text link if the Wi-Fi network is empty

Bug: 188710392
Test: manual test
atest -c ProviderModelSliceTest

Change-Id: If99c1e6597b4d2ef6a916fbdab3df9cfad8b464e
2021-05-26 11:44:09 +00:00
Weng Su
59f7b677fe Merge "[Provider model] Add "Turn off/on Wi-Fi" link to Internet Panel" into sc-dev 2021-05-26 11:43:49 +00:00
Weng Su
7b8c367d4f [Provider model] Add "Turn off/on Wi-Fi" link to Internet Panel
- Replace the left menu button with "Turn off/on Wi-Fi"
  - Remove the TurnOnWifiSlice

- Show "Wi-Fi is off" sub-title when Wi-Fi is disabled
  - Remove the "Wi\u-Fi is turned on" sub-title when APM is on.

Bug: 188710392
Test: manual test
atest -c InternetConnectivityPanelTest
make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.panel

Change-Id: I53e200f6cadf8b712bf794bcbd5ff79f0f239cc0
2021-05-26 17:22:38 +08:00
Yanting Yang
4fce42c454 Merge "Correct breadcrumbs of Wallpaper & style" into sc-dev 2021-05-26 06:20:38 +00:00
Kevin Han
4b34271f7d Ensure hibernation exemption toggle uses pre-S flag
For dogfood, we want hibernation to target apps that target pre-S. This
was done on the PermissionController side but the toggle in Settings
did not visually reflect this policy, confusing dogfood/teamfood
participants.

This updates the default toggle position to consider whether the pre-S
flag is on and then default to the "on" position for apps targeting
pre-S if the flag was on for the device.

Bug: 189260947
Test: atest HibernationSwitchPreferenceControllerTest
Test: manual
Change-Id: I9cd16e82e1eee4589cb17a356b6bf2e3297a8dd2
2021-05-25 18:52:19 -07:00
TreeHugger Robot
0eaf329a43 Merge "Query storage size instead of calculate size of installed APP" into sc-dev 2021-05-26 00:13:16 +00:00
Yanting Yang
6bf1c3675d Correct breadcrumbs of Wallpaper & style
Remove the sitemap connection between Display and Wallpaper & style,
since we already moved the Wallpaper & style to the homepage.

Bug: 182708819
Test: robotests & visual
Change-Id: Ia069be91177d8fef56248b5343c41a13ef8267a2
2021-05-26 05:43:53 +08:00
Arc Wang
044c91cc70 Query storage size instead of calculate size of installed APP
From android S, Storage Settings show files of images/videos/audios
category instead of installed APP of each category. So it's
necessary to change the way to calculate size information.

This change also
- StorageItemPreference shows changing storage size units instead
  of fixed GB. It helps UX for categories of only small size files.
- Query media provider for size of Documents and others.
- Query media provider for size of Trash.

Bug: 170918505
Bug: 177892478
Bug: 179871408
Bug: 184379946
Bug: 186077224
Bug: 187128447
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
      manual visual
      Click each file category to count files size is the same as
      displayed in Storage Settings.
Change-Id: I37c7b3a4b5860323cb55581b23a90f583f4af216
2021-05-25 23:44:21 +08:00
Betty Chang
4246049c7c Merge "Remove the Network rating provider item" into sc-dev 2021-05-24 06:42:10 +00:00
changbetty
8267a2757f Remove the Network rating provider item
Bug: 187119482
Test: manual test
      make RunSettingsRoboTests ROBOTEST_FILTER=ConfigureWifiSettingsTest
Change-Id: Iff4a7663c0bca8f0553fcd16673a9aa766050ff4
2021-05-21 17:08:44 +08:00
Weng Su
72dd0830e1 Merge "[Provider model] Revise the Internet Panel title sub-text" into sc-dev 2021-05-21 08:14:07 +00:00
Arc Wang
8b5913ba18 Merge "Shows "This device" for default internal storage" into sc-dev 2021-05-21 06:23:02 +00:00
Jack Yu
3616520985 Merge "API Review: Rename CAPABILITY_ALLOWED_NETWORK_TYPES_USED" into sc-dev 2021-05-19 16:26:18 +00:00
Antoan Angelov
eb45fd3f2a Merge "Update ActionDisabledByAdminDialogHelper" into sc-dev 2021-05-19 13:50:06 +00:00
Weng Su
99d8fcfae2 [Provider model] Revise the Internet Panel title sub-text
- Display "Tap a network to connect" on sub-title when Wi-Fi networks is
not empty

- Screenshot:
  https://screenshot.googleplex.com/5TzpJDLghpCQnDP

Bug: 188594439
Test: manual test
atest -c InternetConnectivityPanelTest

Change-Id: I0e3f0eb269fb4fe040a62be9ee84105879af82f7
2021-05-19 15:35:41 +08:00
Peiyong Lin
d32d11248e Merge "Add Game settings support." into sc-dev 2021-05-19 05:42:14 +00:00
Weng Su
3d904eba71 Merge "Introduce new Disconnect functionality for Wifi networks in Internet Panel only" into sc-dev 2021-05-19 03:48:24 +00:00
Weng Su
ca5f4e4952 Merge "Improve discoverability of the intent & actions progress" into sc-dev 2021-05-19 03:48:16 +00:00
Weng Su
4bf9551c30 Improve discoverability of the intent & actions progress
- Display "Select the network you want to use for data" on sub-title
when Wi-Fi networks is not empty

- Screenshot:
  https://screenshot.googleplex.com/6nuwYoSh7UjF93Q

Bug: 186432232
Test: manual test
atest -c InternetConnectivityPanelTest

Change-Id: I9ab0ce0ca052b3444e50a914b59f38e4e7778ddf
2021-05-19 02:17:33 +08:00
Weng Su
3d2950c8af Introduce new Disconnect functionality for Wifi networks in Internet
Panel only

- Display the close icon on the Wi-Fi network connected to the Internet,
and performs the same action as tapping on the carrier network when
tapped it.

- Display the cog icon on the Wi-Fi network if it has no the Internet
access.

- Screenshot:
  https://screenshot.googleplex.com/YBQ8onG2dFJ8Q2a

Bug: 187995278
Test: manual test
atest -c ProviderModelSliceTest

Change-Id: Id54a94c1fdfc37aff5cc37d6fb9f5478c0dccb00
2021-05-19 01:52:05 +08:00
Peiyong Lin
83a71ca8fd Add Game settings support.
Add Game settings page under Apps so that users can access game related
features and toggle settings.

Bug: b/185822999
Test: make ROBOTEST_FILTER=GameSettingsPreferenceControllerTest RunSettingsRoboTests
Change-Id: I923ba70536b7f68b5330a508b8dabf27e33f4c55
2021-05-18 17:24:51 +00:00
arangelov
d79ab00524 Update ActionDisabledByAdminDialogHelper
- For managed devices, "Learn more" takes the user to a support
page
- Put back the "If you have questions, contact your IT admin"
dialog content text
- Update header to 'Blocked by your IT admin' for managed devices

Fixes: 184107103
Test: manual
Test: atest ActionDisabledByAdminDialogHelperTest
Test: atest ActionDisabledLearnMoreButtonLauncherImplTest
Change-Id: Ie5b8a21b9ba295435d5709f9b0374035141d319a
2021-05-18 15:40:46 +01:00
Arc Wang
07dc4fe79a Shows "This device" for default internal storage
Bug: 188492974
Test: atest StorageEntryTest
Change-Id: I7278ff604f22acafd47cef2f5d613a2bf9f0e371
2021-05-18 16:23:25 +08:00
SongFerngWang
d7969369de API Review: Rename CAPABILITY_ALLOWED_NETWORK_TYPES_USED
CAPABILITY_ALLOWED_NETWORK_TYPES_USED is renamed CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK
Bug: 182198501
Test: atest packages/apps/Settings/tests/unit/src/com/android/settings/network/telephony/Enable2gPreferenceControllerTest.java
atest frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/RadioConfigResponseTest.java

Change-Id: Id9a27ad972ba7b27311e1b8c6b245f42b94fc7be
2021-05-17 17:20:54 +08:00
Arc Wang
c0b5ba5225 Storage Settings shift profile selection tab position
In this change, Storage Settings main UI is composed by 3 fragments.

StorageDashboardFragment only shows when there is only personal profile for
current user.

ProfileSelectStorageFragment (controls preferences above profile tab) and
StorageDashboardNoHeaderFragment (controls preferences below profile tab)
only show when current user has installed work profile.

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: I50dea2fbcae39a1488e648f3ca615f54840e19d5
2021-05-17 14:07:24 +08:00
Jan Tomljanovic
e6070f9f0e Filter out SecuritySettings search results when alternative available.
When alternative fragment is shown for the security settings page, we
don't want to show search results that would lead to an unused security
settings page.

Test: manual
Test: atest SettingsUnitTests
Test: make RunSettingsRoboTests -j
Bug: 184613149
Change-Id: I525bd87d1ac6a24a7a26f59ae917e35ac39732e3
2021-05-14 11:52:12 +01:00
Julia Reynolds
78c4e70cf6 Use | not ,
To match similar APIs

Test: Settings unit
Bug: 181175697
Change-Id: I2ef56528da7a3d5b2c96be8ecfad1a3d6590bbe4
2021-05-13 19:24:17 +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
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
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
333b68d059 Merge "Handle NLS metadata when provided as strings" into sc-dev 2021-05-10 15:56:35 +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
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
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
413893244d Merge "Use shared model for non-system overlay toggle" into sc-dev 2021-05-07 14:08:52 +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
0dc1ee01f8 Merge "wifi: Use new API for wifi data usage function" into sc-dev 2021-05-06 03:17:20 +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
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