Commit Graph

13516 Commits

Author SHA1 Message Date
TreeHugger Robot
10190793fe Merge "Hide running time for "Android System" in the optimization page" into tm-dev 2022-05-10 13:41:55 +00:00
Bonian Chen
812de51467 Merge "[Settings] Hide some Preference entries when no mobile data support" into tm-dev 2022-05-10 12:35:30 +00:00
ykhung
7015cd0dd9 Hide running time for "Android System" in the optimization page
Hide the running time information for "Android System" entry, since this
entry will combine multiple system components together. It will provide
incorrect running time information. The getRealUid() method maps many
UIDs to Process.SYSTEM_UID(1000), which results in combining all of
those UIDs into one "Android System" entry. This is the expected behavior.

Bug: 220717612
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: I9d44fe8490ad5c684419b8ebf8d7d5576a42788a
2022-05-10 18:47:44 +08:00
Martijn Coenen
63db54c290 Merge "Add SDK sandbox network usage to corresponding apps." into tm-dev 2022-05-10 09:18:52 +00:00
Tsung-Mao Fang
ca72e5c333 Merge "Disable setting items in App details page" into tm-dev 2022-05-10 08:17:57 +00:00
Chaohui Wang
9b28ecf9de Merge "Display TOO_SHORT_WHEN_ALL_NUMERIC" into tm-dev 2022-05-10 02:44:47 +00:00
Bonian Chen
bd971968e9 Merge "[Settings] IMS feature checking before accessing VT IMS API" into tm-dev 2022-05-10 02:25:51 +00:00
Bonian Chen
8b06c96fe9 [Settings] Hide some Preference entries when no mobile data support
Hide some Preference which requires mobile data on device didn't support
it.

Bug: 221999174
Test: local
Change-Id: I7dd6e13aea0ed4467c7c7edeada564e42ea78349
2022-05-10 01:12:23 +00:00
Julia Reynolds
23a85a1f96 Merge "Remove notification permission feature flag" into tm-dev 2022-05-09 20:16:09 +00:00
Bonian Chen
e0f1081739 [Settings] IMS feature checking before accessing VT IMS API
Check IMS feature before accessing VT IMS API.o

Bug: 231248315
Test: local
Change-Id: I01b438cc79bb91ca05ba6bf57c7e38eb06e51a98
2022-05-10 01:32:31 +08:00
Yuri Lin
9fb3262a1a Merge "Change zen mode schedules page rule handling" into tm-dev 2022-05-09 14:56:13 +00:00
Tsung-Mao Fang
05de9819e9 Disable setting items in App details page
Prior to this cl, we allow user to tap on those
setting items which belong to another user profile app.
However, we already observed some functional broken cases now.
Such as, device can't get the storage data/screen time/mobile data
battery, notification for those apps from another user profile.
Therefore, we decide to grey out those setting items,
and we don't allow user to tap on unsupported setting items.

Test: Download apk in different user profile, and see setting items
is disabled/enabled correctly. and run robo test.
Fix: 230303570

Change-Id: I1bb6b1d8b52f6a00088b2f0e4279b896d568f8a6
2022-05-09 22:04:45 +08:00
Jason Chiu
c9615611e1 Reduce flickers of Injection
The injection dynamic data was loaded in the background and then post to
main thread to update UI. However, it usually updates after
Fragement.onResume(), which causes the flicker.

To make it more smooth, DashboardFragment to wait for the dynamic data
observers to update UI for a short period, which eliminates the flicker
in most cases.

Also skip the repeated tiles refresh called by onCategoriesChanged in
onResume after all preferences refreshed.

Test: robotest, visual
Bug: 229177114
Change-Id: I04650af9692703f1fc1e6e5ad2090f051b1eeb81
2022-05-09 12:33:54 +08:00
Yi-Ling Chuang
9a14f087cd Merge "Show previous query upon configuration change" into tm-dev 2022-05-06 03:17:22 +00:00
Yuri Lin
7cbba753dc Change zen mode schedules page rule handling
The approach of reloading all rules (and recreating all ZenRulePreferences) every time the rule set changed causes the switches on the page to stop working.

This change keeps the ZenRulePreference around as long as the rule itself is around and keeps it updated, while re-adding the preferences to the PreferenceCategory if needed due to rules changing.

Fixes: 229879326
Test: manual, ZenModeAutomaticRulesPreferenceControllerTest
Change-Id: I4eba41e8252cedd87ac866e4b97513970ca2d94a
2022-05-05 14:24:42 -04:00
TreeHugger Robot
af5a015198 Merge "Add missing settings strings." into tm-dev 2022-05-05 13:19:07 +00:00
YK Hung
434009d709 Merge "Support special tethering and removed apps UID in the usage list" into tm-dev 2022-05-05 12:18:10 +00:00
Jonathan Scott
b7f4f56cad Add missing settings strings.
Also re-enable and fix tests.

Test: manual
Fixes: 226183482
Fixes: 218799125
Fixes: 219375624

Change-Id: I9605f1f4e2e834baf63e015e96639567c5481b5f
2022-05-05 09:12:59 +00:00
Tsung-Mao Fang
c5153183d8 Merge "Show slice without toggle when there's no wifi permission" into tm-dev 2022-05-05 08:43:00 +00:00
ykhung
be10538a09 Support special tethering and removed apps UID in the usage list
There is a special UID for network data tethering usage, we will handle
it in a special case to avoid the current rule considering it as an
invalid UID case without showing in the usage list. We will disable the
click behavior to protect the optimization mode page first.

Bug: 227395125
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: I8d96473d382ebc3253748cce8345d6f2261a233d
2022-05-05 16:17:41 +08:00
Tsung-Mao Fang
cb641fa6eb Show slice without toggle when there's no wifi permission
When the presenter app doesn't have certain permissions,
it's safer to go with a generic fallback slice
which just redirects user to the actual settings page.

Test: test on the presenter app. robo test
Fix: 178014725
Change-Id: I6f5358af2e00cb2fedba0b3f1474a026135986c6
2022-05-05 12:05:38 +08:00
Daniel Huang
74b1027fe2 Merge "[Panlingual] Unit test for onLocaleSelected" into tm-dev 2022-05-05 03:46:47 +00:00
Julia Reynolds
4138b6f68a Remove notification permission feature flag
Tes: Settings notification robotests
Bug: 231344755
Change-Id: I3e35eede94ea88bee4c2e7fc03ce998ed68b4f81
2022-05-04 16:24:23 -04:00
TreeHugger Robot
3fb9c1a24b Merge "Hide Wi-Fi toggle in the Wi-Fi slice" into tm-dev 2022-05-04 16:01:35 +00:00
TreeHugger Robot
2e6d03d0f4 Merge "Remove Wi-Fi toggle in settings search" into tm-dev 2022-05-04 15:51:34 +00:00
Yi-Ling Chuang
d9453bf8c6 Show previous query upon configuration change
Save the query string before configuration changed and set the previous
query string upon the re-create.

Fixes: 204158119
Test: robotest
Change-Id: I48b2a4b272873665a653d2ebc4c02bb99d4b0d0d
2022-05-04 22:22:26 +08:00
Chaohui Wang
140cb75566 Display TOO_SHORT_WHEN_ALL_NUMERIC
To distinguish the requirement between all numeric
and not all numeric when COMPLEXITY_HIGH.

Fix: 227149118
Fix: 173167839
Test: manual & robolectric
Change-Id: I1f682625d8e86963218dda43b626a9e55d169fb3
2022-05-04 21:51:06 +08:00
danielwbhuang
a5ef37752b [Panlingual] Unit test for onLocaleSelected
Add unit test.

Bug: 224724840
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AppLocalePickerActivityTest
Change-Id: Iabbf84d58d5c325b15d960d63aeda0f7ca7af00b
2022-05-04 17:51:01 +08:00
TreeHugger Robot
756ed72913 Merge "Fix can't select the [USB Tethering] item in [Developer Options]" into tm-dev 2022-05-04 04:47:44 +00:00
Weng Su
2d3d9b9305 Hide Wi-Fi toggle in the Wi-Fi slice
- Hide Wi-Fi toggle and show restriction message in the Wi-Fi slice if Wi-Fi state is disallowed to change

- See the result screenshot in b/203168097#comment30

Bug: 203168097
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiSliceTest

Change-Id: I09ccb6349dadf64a2f903245ba203ce77c86d1e1
2022-05-04 10:26:50 +08:00
Chaohui Wang
b3db0000a6 Merge "Add the jank detection to Settings sliders" into tm-dev 2022-05-04 02:23:14 +00:00
Weng Su
9dfbd9dab8 Remove Wi-Fi toggle in settings search
- Remove Wi-Fi toggle preferences in settings search if Wi-Fi state is disallowed to change

- See the result screenshot in b/203168097#comment29

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

Change-Id: Ibe352f3ec3413fb0774de0b2bd213bb705e919e0
2022-05-04 04:01:47 +08:00
Chaohui Wang
f311566b85 Add the jank detection to Settings sliders
- Currently most the sliders are implemented by
   com.android.settings.widget.SeekBarPreference.
 - Volume ones are implemented by VolumeSeekBarPreference, which resets
   the OnSeekBarChangeListener, so need special handling.
 - PointerSpeedPreference is standalone, added separately.

Bug: 230285829
Test: Verify trace via jank developer guideline.
Change-Id: Ia2978df196676ad6675d2834f6af6cb2aa9094cf
2022-05-03 11:06:34 +00:00
TreeHugger Robot
cf52a8ea7d Merge "Show restricted message in Wi-Fi hotspot settings" into tm-dev 2022-05-03 08:58:13 +00:00
Hugh Chen
ec0c171735 Fix can't select the [USB Tethering] item in [Developer Options]
- This CL is using 'USB_CONFIGURED' to check whether the USB enumeration
  is completed from the intent. If 'USB_CONFIGURED' is true then update
  the UI.

Bug: 229200265
Test: make -j65 RunSettingsRoboTests
Change-Id: Icab05e37ae3fcc9f1bf404a610fc97c368c453f5
2022-05-03 08:00:58 +00:00
TreeHugger Robot
e99683f013 Merge "Fix the flashing list on Opening link page" into tm-dev 2022-05-03 07:59:17 +00:00
Weng Su
e37a553e94 Show restricted message in Wi-Fi hotspot settings
- Remove Wi-Fi hotspot preferences in settings search if Wi-Fi hotspot is disallowed

- See the result screenshot in b/203168953#comment12

Bug: 203168953
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSettingsTest

Change-Id: Id4416fd0659b596e4e6f31890a139198219f4552
2022-05-03 13:58:54 +08:00
Joshua Mccloskey
8f463f5c88 Merge "Fix final UDFPS enrollment haptic." into tm-dev 2022-04-29 22:59:19 +00:00
Joshua McCloskey
b7f3001cea Fix final UDFPS enrollment haptic.
Test: Verified both accessibility/non-accessibility flows
have correct haptic feedback.
Fixes: 229804277

Change-Id: I8623771016b9819d4211d07a19b50291a8b06cd9
Merged-In: I8623771016b9819d4211d07a19b50291a8b06cd9
2022-04-29 22:52:44 +00:00
TreeHugger Robot
38989c9c6a Merge "Show restricted message in Wi-Fi Direct summary" into tm-dev 2022-04-29 15:16:44 +00:00
Martijn Coenen
bc9856104d Add SDK sandbox network usage to corresponding apps.
SDK sandboxes run in a separate UID range. Their network usage should be
attributed to the corresponding app.

Make sure we collapse the usage collection of sandboxes to the
corresponding app UID in DataUsageList.

For AppDataUsage, make sure we add in the sandbox UID when being asked
to calculate data usage for a regular app UID. Invoke
DataUsageCycleLoader with all UIDs in AppItem, because there can now be
multiple UIDs associated with a regular app, too. Also make sure that
all new instances of AppItem for regular applications have their own
application UID.

Bug: 225319220
Test: manual
Change-Id: Id101a96ee4e3ba02376fa2ac64a9f9c2581acb61
2022-04-29 13:35:17 +00:00
Yi-Ling Chuang
93f945d516 Fix the flashing list on Opening link page
The bottom list flashes because it takes some time to create a
DomainAppPreference, where each perference takes around 6ms to load an
icon. When there are, that say, 30 apps installed, then it will take
around 180ms to be ready, which introduces the flashing issue.

In order to tackle icon loading, this CL applies the icon cache
mechanism to speed up the loading time.

Fixes: 222981986
Test: robotest
Change-Id: Ia8f7cbf5af5ea9f694c352ea40ccca47bedb175c
2022-04-29 19:29:02 +08:00
TreeHugger Robot
30bba3bbdb Merge "Show restricted message in Wi-Fi hotspot summary" into tm-dev 2022-04-29 09:51:21 +00:00
Chaohui Wang
71e03076cd Merge "Fix flicker for Mobile data & Wi-Fi page" into tm-dev 2022-04-29 08:26:24 +00:00
Calvin Pan
8ad2642b5f Merge "Add unit test for AppLocalePickerActivity" into tm-dev 2022-04-29 03:56:56 +00:00
Weng Su
5e3d75a6f9 Show restricted message in Wi-Fi Direct summary
- See the result screenshot in b/203168953#comment9

Bug: 203168953
Test: manual test
make RunSettingsRoboTests \
    ROBOTEST_FILTER=WifiP2PPreferenceControllerTest

Change-Id: I87ad6d7554fbb4aa86d4617438fa359c67544812
2022-04-29 03:41:56 +08:00
Weng Su
4e34e65228 Show restricted message in Wi-Fi hotspot summary
- Refine WifiTetherPreferenceController

- See the result screenshot in b/203168953#comment8

Bug: 203168953
Test: manual test
make RunSettingsRoboTests \
    ROBOTEST_FILTER=WifiTetherPreferenceControllerTest

Change-Id: If094178eb0cd9ccf20ff3899dc4b087b45c66f6b
2022-04-28 18:28:49 +00:00
Prabal Singh
9a8f44227e Merge "Remove extra argument WorkPolicyUtil constructor" into tm-dev 2022-04-28 17:12:28 +00:00
Chaohui Wang
ddedb31f6e Fix flicker for Mobile data & Wi-Fi page
Both "Mobile data usage" & "Non-carrier data usage".

By,
1. Add header in onCreate() instead of onViewCreated()
2. Keep the space for Spinner, and preload initial cycles
3. Keep the space for 3 usage summaries

Bug: 191730864
Test: manual
Change-Id: I8c309c5f51ce6290383a2d10f75e41d0f207d61a
2022-04-28 23:00:57 +08:00
Prabal Singh
3e2d7f4581 Remove extra argument WorkPolicyUtil constructor
Only constructor is required for WorkPolicyInfo constructor. The other
dependencies can be derives

Test: make ROBOTEST_FILTER=EnterprisePrivacyFeatureProviderImplTest RunSettingsRoboTests -j40
Change-Id: I7f35e5ed344d452190b333aad7fa823a010d17b3
2022-04-28 15:21:18 +01:00