Commit Graph

66 Commits

Author SHA1 Message Date
Chaohui Wang
5a89763503 Merge "Add AppDataUsagePreference for Spa" 2022-10-28 12:52:57 +00:00
Chaohui Wang
56c9bfed08 No show AppButtons for system modules
To try:
1. adb shell am start -n com.android.settings/.spa.SpaActivity
2. Go to Apps -> All apps (Show system) -> Bluetooth

Bug: 236346018
Test: Unit test & Manual with Settings App
Change-Id: Ibdf5f1ec9f69beefe47fb7a046b0192a73e71b27
2022-10-28 15:56:18 +08:00
Chaohui Wang
aafdb3bfbc Add AppSettingsPreference for Spa
This is used in new App Info page.

To try:
1. adb shell am start -n com.android.settings/.spa.SpaActivity
2. Go to Apps -> All apps -> [One App] -> Additional settings in the app

Bug: 236346018
Test: Unit test & Manual with App Info page
Change-Id: I40a175d771c4c0f13986f8c615169c99ce1b0623
2022-10-28 07:41:24 +00:00
Chaohui Wang
dbead03b6a Add AppBatteryPreference for Spa
This is used in new App Info page.

To try:
1. adb shell am start -n com.android.settings/.spa.SpaActivity
2. Go to Apps -> All apps -> [One App] -> App battery usage

Bug: 236346018
Test: Unit test & Manual with Settings App
Change-Id: I4784e42f230534d8d843ec00de51032baffcb7e2
2022-10-28 11:18:21 +08:00
Chaohui Wang
ca7eca1440 Merge "Add AppInstallerInfoPreference for Spa" 2022-10-28 03:08:06 +00:00
Chaohui Wang
601124517a Add AppInstallerInfoPreference for Spa
This is used in new App Info page.

To try:
1. adb shell am start -n com.android.settings/.spa.SpaActivity
2. Go to Apps -> All apps -> [One App] -> App details

Bug: 236346018
Test: Unit test
Change-Id: Ibd1ae27c60a096b7f12ca6640a58b099dcfb0b6b
2022-10-27 20:19:17 +08:00
Chaohui Wang
9ee43c96d3 Add AppDataUsagePreference for Spa
This is used in new App Info page.

To try:
1. adb shell am start -n com.android.settings/.spa.SpaActivity
2. Go to Apps -> All apps -> [One App] -> Mobile data & Wi-Fi

Bug: 236346018
Test: Unit test & Manual with Settings App
Change-Id: I1ebcc2c5197eef0c35a2b188b7edb3594fa4ae2a
2022-10-27 11:16:57 +00:00
Chaohui Wang
70e1f6abac Correct the name of AppLocalePreferenceTest
Bug: 236346018
Test: Unit test
Change-Id: I986b4f7daf2983d25eae55879808b3ae74f5b94c
2022-10-27 16:44:08 +08:00
Chaohui Wang
3eddcc6703 Add AppLocalePreference for Spa
Also let SettingsSpaUnitTests depends on the
mockito-target-extended-minus-junit4 to support mock static methods.

Bug: 236346018
Test: Unit test & Manual with Settings App
Change-Id: Ib7a3022b20e30c8292713f52d29785eb78899c70
2022-10-26 11:01:47 +08:00
Chaohui Wang
af97082f9b Add HibernationSwitchPreference for Spa
Bug: 236346018
Test: Manual with App Info page
Test: Settings Unit tests
Change-Id: I23140a2a16b3b5a4b569623504b1838a641611fe
2022-10-25 09:08:14 +08:00
Chaohui Wang
a8e19e0f2c Add DefaultAppShortcuts for Spa
Including the following,
- Home app
- Browser app
- Phone app
- Emergency app
- SMS app

Bug: 236346018
Test: Manual with App Info page
Test: Settings Unit tests
Change-Id: I4ceb31ed521b758a6f91d7e86fd34c780442b1ac
2022-10-21 15:43:12 +08:00
Chaohui Wang
6d39e5c911 Add AppOpenByDefaultPreference for Spa
The "Open by Default" in App Info page.

Bug: 236346018
Test: Manual with App Info page
Test: Settings Unit tests
Change-Id: I20f827241ff46bca28440b56fd32a0712ee439f9
2022-10-20 17:28:46 +08:00
Chaohui Wang
402744eb36 Add AppButtonRepositoryTest
Bug: 236346018
Test: Unit test
Change-Id: I174bad92ef5357ba0ea0e32cb0435d700a11dc51
2022-10-19 19:55:01 +08:00
Chaohui Wang
b752c3d058 Make the default getTimeSpentInApp() return empty
Current ApplicationFeatureProvider.getTimeSpentInApp() defaults returns
null, in extreme case there is ACTION_APP_USAGE_SETTINGS handler on
device but getTimeSpentInApp() still returns null, may lead
AppTimeSpentPreference to crash.

Make it returns empty string instead to eliminate this extreme case.

Bug: 236346018
Test: Unit test & Manual with SpaActivity
Change-Id: I33b413ceb9bdf48e3902e02c91fab617fe297862
2022-10-19 15:57:50 +08:00
Chaohui Wang
b2fdc25a6e Add AppTimeSpentPreference for Spa
Bug: 236346018
Test: Manual with App Info page
Test: atest SettingsSpaUnitTests
Change-Id: Ia707dc57222797536861a7366a31aafaf91b677b
2022-10-14 00:14:39 +08:00
Chaohui Wang
bb4d0250bb Add AppStoragePreference for Spa
Also add new SettingsSpaUnitTests.

Bug: 236346018
Test: Manual with App Info page
Test: atest SettingsSpaUnitTests
Test: Manual compare generated Settings AndroidManifest.xml
Change-Id: I9f6b2ca446fd3d196792a876a6e4049c5cf97a1d
2022-10-13 17:21:08 +08:00