Commit Graph

13451 Commits

Author SHA1 Message Date
Hugh Chen
3cf4c3f3a5 Use new api to get bluetooth device icon
This CL use CachedBluetoothDevice#getDrawableWithDescription()
to get bluetooth device icon.

Bug: 178255374
Test: make RunSettingsRoboTests -j56

Change-Id: I45c273e2dd782029da7a3a2724cbca3762cc2d9c
2021-04-20 19:13:34 +08:00
Wesley.CW Wang
72463703ac Clean up app usage page
- Remove unused reference

Bug: 178197718
Test: make SettingsRoboTests
Change-Id: Iecb9b14bba5e823c1ceee70d5a27c6fe74dab815
2021-04-20 18:08:25 +08:00
Wesley.CW Wang
f1966e9d0b Update app usage page active time column
Screenshot: https://screenshot.googleplex.com/5DYcV9fFTiatepi.png

Bug: 178197718
Test: make SettingsRoboTests
Change-Id: If0427a4ed634a453ac49b35bd8082b8790ca7402
2021-04-20 13:49:57 +08:00
Chloris Kuo
7e9fe7b5c5 Merge "NAS settings change" into sc-dev 2021-04-20 02:03:27 +00:00
Mady Mellor
24adce034d Change bubble settings to use Secure rather than Global
Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER="Bubble"
Bug: 173408780
Change-Id: I53fcd59c22c219551bd2eb6f0251acb5a03690ea
2021-04-20 01:37:34 +00:00
Weng Su
aeb6200bfe [Provider Model] Carrie Wi-Fi offload toggle request
- Remove the Advanced expandable list pattern and expose the items

- Add Carrie Wi-Fi offload toggle preference

- Add Carrier Wi-Fi network preference

- Do not set Carrier Network together when setting Mobile Data, if
carrner network provision enabled.

- Screenshot:
  https://screenshot.googleplex.com/8vMow53cvGfUAoj

Bug: 182324921
Test: manual test
atest -c CarrierWifiTogglePreferenceControllerTest \
         MobileDataPreferenceControllerTest \
	 WifiPickerTrackerHelperTest

Change-Id: I5a7f4cc6850fe76c0efee392c0c0c23cb41f5e1e
2021-04-20 07:58:20 +08:00
ykhung
4752ea17b9 Refine startBatteryDetailPage method to support history data
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Iee3b6b353c4f92bdad37fac55adad58b4f205bf6
2021-04-19 14:06:55 +00:00
Wesley Wang
e3cf049039 Merge changes Iced0fa59,Ic354ac91,I0b4cb6ca,I9c1d3761 into sc-dev
* changes:
  Add footer to app usage page
  Update app usage page with 3 radio button control
  Add 3 controller for app usage page radio buttons
  Add utils class for app usage operation
2021-04-19 10:15:49 +00:00
Kholoud Mohamed
5fb1b61253 Merge "Enable ignored test" into sc-dev 2021-04-19 08:34:47 +00:00
Wesley.CW Wang
8ca6f31716 Add footer to app usage page
- Add a footer to present the description text, will present specific text once this app is optimized or unrestricted only
 Screenshots:
   https://screenshot.googleplex.com/4HZGQU6SDni3PdR.png
   https://screenshot.googleplex.com/9gLSgftmaYuZepf.png
   https://screenshot.googleplex.com/55masP3VoAtAFMo.png

Bug: 178197718
Test: make SettingsRoboTests
Change-Id: Iced0fa591faf72874e2e3dff942122c90d35a4e7
2021-04-19 08:14:54 +00:00
Wesley.CW Wang
5083d82df7 Update app usage page with 3 radio button control
- Improve the UX from 2 different preference column to 3 radio button,
 make the restriction state more easy to control and recognize
 Screenshot: https://screenshot.googleplex.com/4nCBnF5FzwePqrL.png

Bug: 178197718
Test: make SettingsRoboTests
Change-Id: Ic354ac91e5496c0e44c5b44142627ac8a090e30f
2021-04-19 08:14:41 +00:00
Wesley.CW Wang
3db43de758 Add 3 controller for app usage page radio buttons
Bug: 178197718
Test: make SettingsRoboTests
Change-Id: I0b4cb6ca2db3c5f6dafd89484c91ca3f7fb1a1ae
2021-04-19 08:14:21 +00:00
Wesley.CW Wang
f2321ad5e1 Add utils class for app usage operation
- An util class to control usage state

Bug: 178197718
Test: make SettingsRoboTests
Change-Id: I9c1d37610a2e52d484228ef8e5c7af49e12f82aa
2021-04-19 16:13:00 +08:00
Chloris Kuo
d37f0faf0d NAS settings change
Handle migration for multi-profiles

Test: make RunSettingsRoboTests
Bug: 185623118
Change-Id: I392b420b849a329e3e24d8e8dcf0b84a63d37799
2021-04-19 00:14:49 -07:00
ykhung
bcf0a411a1 Add app usage preferencee item into the history preference
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I7d9a14eca0b8d3b054e040cb13135ef15390e512
2021-04-19 04:45:11 +00:00
ykhung
33115020ba Merge original AOSP chart into battery usage with runtime switchable
This patch is merged from ag/14111128 and seperate two different chart
design between isChratGraphEnabled() method, but we drop the options
menu in the both versions to align the new material next design.

Bug: 185187718
Bug: 185187591
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ie88df6a94abf5d1652440fe35392b9f47c447537
2021-04-18 15:59:43 +00:00
ykhung
5aa3c23535 Support badged icon for work profile mode and add system checking
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Iebe458b364ab02eaf595bfc3b1a455e5be7d3d9d
2021-04-17 13:29:07 +00:00
ykhung
3cdf60c016 Purge low percentage BatteryDiffEntry from indexed usage map
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I943e224147ccbfa80578511d6cb0d6adf6f8da0f
2021-04-17 10:22:11 +00:00
Syaoran Kuo
f608d1e7b6 Merge "Adds new test for notification." into sc-dev 2021-04-16 08:58:01 +00:00
ykhung
ab5e180139 Refine logic and add simple test for BatteryChartPreferenceController
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ie218cf967c6f30c6eadcdfe6bfd3f37ccdc2276e
2021-04-16 07:02:04 +00:00
TreeHugger Robot
ab12e78a10 Merge "Fix TranscodeDisableCachePreferenceControllerTest" into sc-dev 2021-04-16 06:50:01 +00:00
Ryan Lin
3a34a5767b Merge "Extract the logic of MagnificationMode to the controller" into sc-dev 2021-04-16 03:50:27 +00:00
Biswarup Pal
48bb439db6 Fix TranscodeDisableCachePreferenceControllerTest
Test: TranscodeDisableCachePreferenceControllerTest
Bug: 185483742
Change-Id: Ie448929fb50a49a0641baf6456df11430bb9f1c6
2021-04-15 20:08:48 +00:00
kholoud mohamed
551f8b20e1 Enable ignored test
Test started failing after a change in PermissionChecker
that started using an unshadowed API in AppopsManager.
Reenabling the test after fixign that.

Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.applications.specialaccess.interactacrossprofiles.InteractAcrossProfilesDetailsTest
Fixes: 184238335
Change-Id: I3dc97366671cb1ff8b6a3482b02f6e2148bdda40
2021-04-15 15:51:53 +01:00
Biswarup Pal
acb5bebb3d Merge "Implement controller to disable transcoding cache" into sc-dev 2021-04-15 11:24:27 +00:00
ryanlwlin
8e5e4dec12 Extract the logic of MagnificationMode to the controller
To move the preference to the upper layer, we extract all logics
to its controller.

We move all tests to the test files and add server tests to
verify the behaviour of edit shortcut dialog.

Bug: 182992338
Test: atest  MagnificationModePreferenceControllerTest

Change-Id: I34c4361e2e116a22c3e34bd35c8ac8cac752ab96
2021-04-15 18:41:44 +08:00
YUKAI HUNG
98ad383e5b Merge "Add cache mechanism to improve icon and label loading performance" into sc-dev 2021-04-15 08:40:26 +00:00
Edgar Wang
9d14071637 Merge "Apply SettingsPreferenceTheme in Settings" into sc-dev 2021-04-15 05:27:22 +00:00
TreeHugger Robot
fce594ad7f Merge "Cleanup Storage Settings" into sc-dev 2021-04-15 02:28:35 +00:00
ykhung
b2674eb5be Add cache mechanism to improve icon and label loading performance
Bug: 185207505
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I73dba5e40783f9ef4cfc0c4c33ea56b12754535d
2021-04-15 02:20:14 +00:00
YUKAI HUNG
a73e40cb74 Merge "Load application icon and label for UID battery consumer type" into sc-dev 2021-04-15 01:04:00 +00:00
TreeHugger Robot
d41c4d3c8c Merge "Toggle Power + Volume chord with long press power to assist setting" into sc-dev 2021-04-14 18:49:31 +00:00
Dmitri Plotnikov
3ac49f0a9b Merge "Remove references to POWER_COMPONENT_USAGE and TIME_COMPONENT_USAGE" into sc-dev 2021-04-14 17:50:25 +00:00
TreeHugger Robot
5467d0f7aa Merge "Replace the hidden API to public API or other alternatives" into sc-dev 2021-04-14 17:47:41 +00:00
Biswarup Pal
4da3dd1458 Implement controller to disable transcoding cache
This is to provide users with control over whether to disable
transcoding cache or not.

By default we keep the transcoding cache enabled.

The controller resides within the Media transcoding settings under
Developer Options.

Test: Manual. Unit tests added.
Bug: 185246580
Change-Id: I5cc85e4a254c87b5c84c32a303e8294c918748c2
2021-04-14 17:15:22 +00:00
Jernej Virag
f74f1dbbc0 Toggle Power + Volume chord with long press power to assist setting
Power + Volume chord setting should be toggled together with LPP setting. The LPP setting still remains the source of truth with Power + Volume chord being dependant on it.

Bug: 179673796
Bug: 185205501
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.gestures.*"
      Flash image on actual device and manually test toggling.
Change-Id: Ie19ae55db7c6c07533ea6347e0a4e1e4505423e2
2021-04-14 17:03:46 +00:00
ykhung
59da7ab7b1 Load application icon and label for UID battery consumer type
Bug: 185187669
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Idb77a1bd48f7f4b66b86ff12c166a204d17bd9ec
2021-04-14 16:16:33 +00:00
Sally Yuen
182c812b1b Merge "Call ColorDisplayManager for Extra Dim/RBC state" into sc-dev 2021-04-14 16:05:59 +00:00
Lucas Lin
e231dc2b6f Merge "Remove the usage of hidden API and fix the test" into sc-dev 2021-04-14 15:11:49 +00:00
Arc Wang
192fd24f26 Cleanup Storage Settings
Bug: 183078080
Test: make
      make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.deviceinfo
      make RunSettingsRoboTests
      ROBOTEST_FILTER=com.android.settings.deviceinfo.storage
      atest com.android.settings.deviceinfo
      atest com.android.settings.deviceinfo.storage
Change-Id: I901f5f7999ea94dafb72a2517a11e2ff1fd51b42
2021-04-14 21:37:46 +08:00
lucaslin
09bbb51d29 Replace the hidden API to public API or other alternatives
Some of connectivity related files are going to be a part of
mainline module, so the external callers cannot call its hidden
API.
Replace the hidden API to public API or other alternatives from
the callers side.

Bug: 182859030
Test: 1. Remove "framework-connectivity.impl"
      2. atest SettingsUnitTests:InternetUpdaterTest
      3. atest SettingsUnitTests:ProviderModelSliceHelperTest
      4. atest SettingsUnitTests:MobileNetworkUtilsTest
      5. make RunSettingsRoboTests \
         ROBOTEST_FILTER=AppDataUsagePreferenceControllerTest
      6. make RunSettingsRoboTests \
         ROBOTEST_FILTER=TetherPreferenceControllerTest
      7. make RunSettingsRoboTests \
         ROBOTEST_FILTER=WifiDetailPreferenceController2Test
      8. make RunSettingsRoboTests \
         ROBOTEST_FILTER=ContextualWifiSliceTest
Change-Id: Idd1ca57d8f2790070e9c401936c5af2a05bcfe9d
2021-04-14 11:36:54 +00:00
lucaslin
4400038635 Remove the usage of hidden API and fix the test
- Network class will be inside mainline module, so the external
callers cannot call its hidden API. Remove the usage of hidden
API.
- The orignal test looks wrong because it shouldn't set the data
of intent, it should set the extra of intent instead. (Refer to
the design of ConnectivityService.java) Fix the test and remove
the @Ignore annotation.
- Add 2 new tests to cover the case of receiving unexpected network.

Bug: 182859030
Bug: 183920404
Test: 1. Remove "framework-connectivity.impl"
      2. make RunSettingsRoboTests \
         ROBOTEST_FILTER=WifiNoInternetDialogTest
Change-Id: Ie48a1651629ad9c067728f667cdd91f2f0bccd07
2021-04-14 09:07:54 +00:00
Edgar Wang
817a167416 Apply SettingsPreferenceTheme in Settings
- Set all of preference style inherit from SettingsPreferenceTheme
- Apply to Theme.Settings and Theme.Settings.Home
- Fix robotest failed in ScreenTimeoutSettingsTest

Bug: 185206291
Test: manual & robotest
Change-Id: I855d003b10348569903855fcbf235bc00265658b
2021-04-14 16:36:14 +08:00
Jack He
ab38192a1f Merge "BT: Use DeviceConfig for Bluetooth GD toggle" am: 6de2953232 am: ee25171aa1 am: 130f27d48f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1661159

Change-Id: Ic39e10b36eff5b009886d7a321575f63ef15ba5c
2021-04-14 06:55:36 +00:00
Jack He
130f27d48f Merge "BT: Use DeviceConfig for Bluetooth GD toggle" am: 6de2953232 am: ee25171aa1
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1661159

Change-Id: I690e850a6b67125a35e999a4faf86a3454140d3f
2021-04-14 06:07:23 +00:00
Syaoran Kuo
f4aca12619 Adds new test for notification.
1. Add notification test.
2. Add shareUserId into manifest file.

Test: atest
com.android.settings.notification.AppNotificationComponentTest
Bug: 184814161

Change-Id: I38b7a854e8c8e0777fb7be3a518b7ed9d0f0a7a6
2021-04-14 05:35:38 +00:00
YUKAI HUNG
8d8877b6db Merge "Load application icon and label from package manager if available" into sc-dev 2021-04-14 01:58:37 +00:00
sallyyuen
fefb447526 Call ColorDisplayManager for Extra Dim/RBC state
- Move junit test into unit test folder
- Settings resources ids are different from the junit test ids
so we need to find the correct resource id
- ColorDisplayManager will not update in time before the controller
is checked, and it can't be mocked since it's a final class
Bug: 170970675
Test: manual, atest ReduceBrightColorsPreferenceControllerTest

Change-Id: I57bfdd8294c5b6e147b4e11ae97b6b56f6121343
2021-04-13 17:42:25 -07:00
Dmitri Plotnikov
470839a3b7 Remove references to POWER_COMPONENT_USAGE and TIME_COMPONENT_USAGE
Bug: 184397335
Test: enable fake data, rebuild and restart Settings/Battery
Change-Id: I1a5825a0e324c7884fc900e7cea9f38a9153253c
2021-04-13 15:39:26 -07:00
Jack He
8cc23bd2fe BT: Use DeviceConfig for Bluetooth GD toggle
Bug: 184235563
Test: make and toggle GD settings, unit test
Change-Id: I643339f80a82950b1b1ffcf60830f93a955e6666
2021-04-13 20:31:38 +00:00