Commit Graph

26 Commits

Author SHA1 Message Date
Xinyi Mao
d91809b752 Revert "Fix atest build error in settings.fuelgauge."
This reverts commit 3b962e3b9d.

Reason for revert: No need to update long -> int

Change-Id: I060b57c5b8c871ccc938ca84fe1aa916293acada
2024-05-28 05:15:43 +00:00
mxyyiyi
3b962e3b9d Fix atest build error in settings.fuelgauge.
Bug: 342963499
Fix: 342963499
Test: atest SettingsRoboTests:com.android.settings.fuelgauge
Change-Id: If34e7dd6af990dd4e678002e46c0e3794b9c0a61
2024-05-27 15:19:47 +08:00
Roy Chou
042c8c7328 feat(brightness suw): add brightness preferences in suw
Add brightness level and auto brightness preference in
accessibility_settings_for_setup_wizard.xml. Since the flagging has not
be supported yet for non-Manifest resources, for now we add the
preferences by default, and update the preferece availablity status in
each preference controllers based on the flag.

Bug: 311093618
Flag: ACONFIG com.android.settings.accessibility.add_brightness_settings_in_suw DEVELOPMENT
Test: manually
      atest AccessibilitySettingsForSetupWizardTest
      atest AutoBrightnessPreferenceFragmentForSetupWizardTest
      atest AutoBrightnessPreferenceControllerTest
      atest BrightnessLevelPreferenceControllerTest
Change-Id: I350d99138bdd14bf28828a39e42f707b5b1066c1
2024-05-15 03:19:40 +00:00
Zaiyue Xue
1ee693f0ed Support tips card directly changing settings [step-5]
Support clicking tips card directly changing settings.

Bug: 333989261
Test: manual
Change-Id: Idc485ee7430edff7f6d7265caf8d9d5cf97548b6
2024-04-15 17:39:43 +08:00
Roy Luo
5b93f8b399 Update incompatible charger checking rule
Use COMPLIANCE_WARNING_DEBUG_ACCESSORY to mock incompatible charging
event as COMPLIANCE_WARNING_OTHER is being deprecated.

Bug: 308700954
Test: make test RunSettingsRoboTests
ROBOTEST_FILTER=com.android.settings.fuelgauge
Change-Id: I1935740a7e4dca447fd545bbd46c35b42eeba508
2023-11-03 23:01:14 +00:00
mxyyiyi
56ba1c09d9 App anomaly tips on PowerUsage App list
Screenshots:
[in bg - banner] https://screenshot.googleplex.com/MzLC6LfX93TkkYf
[in bg - hints] https://screenshot.googleplex.com/9JLXNsRiVG8arAU
[in fg - banner] https://screenshot.googleplex.com/9oYbwUkeeLbQX2t
[in fg - hints] https://screenshot.googleplex.com/53DTTUCUnf8rsoE
[apps anomaly highlight hint + settings anomaly banner]
https://screenshot.googleplex.com/8NdS2VMrSzwv2DM

Bug: 291689643
Bug: 291689623
Test: manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bfd0f5859b6e5ffef4727ee562009f2050de7a58)
Change-Id: Ic02db49cb3794ef134759d9dcec5f5ef32454a95
2023-09-18 10:41:27 +00:00
mxyyiyi
6750634259 Impl highlight effect on BatteryChartView slots.
Screenshot: https://screenshot.googleplex.com/F5VrGjj5kdNHMV6

Bug: 284893240
Bug: 291689623
Test: manual
Change-Id: I846d95d31e8bb839481b86a94d5191ff205f8328
2023-09-13 13:29:32 +08:00
mxyyiyi
c4fb17d740 Impl app anomlay preference
[ScreenShot]: https://screenshot.googleplex.com/BBrHTQbwbFHxZE9

Bug: 291689623
Bug: 291689643
Test: manual
Change-Id: Ia257f3ace4a2d71b2221f861be3e1238de6d791e
2023-09-01 06:40:36 +00:00
mxyyiyi
737b9ab5b7 Impl dismiss action in battery tips cards.
- Use SharedPreferences to record and filter the already dimissed anomaly.

Bug: 291689623
Test: manual
Change-Id: I4fd4a39066591a4a201857f9586b6595b7d5c43b
2023-08-24 10:20:49 +08:00
mxyyiyi
5cbf3b0f74 Fixed battery tips card UI.
- Add highlight effect after navigate to new page.
- Update text format inside button.

Screenshot: https://screenshot.googleplex.com/8ib66dWzn6PZmhy

Fix: 296001546
Fix: 296339767
Bug: 291689623
Test: manual
Change-Id: Ic789e5feb684a109582477c553963a9a3f9936b8
2023-08-24 10:19:48 +08:00
Zaiyue Xue
9f57691d89 Add UI metrics logging for battery tips card.
Bug: 291689623
Test: manual
Change-Id: I925e4d887c3435239aed0aa0fde7cda2c3a95b3c
Merged-In: I925e4d887c3435239aed0aa0fde7cda2c3a95b3c
2023-08-21 17:40:28 +08:00
mxyyiyi
980116be4d Update power_anomaly_event proto fields
- add enum PowerAnomalyType/PowerAnomalyKey
- update the func to get anomaly index

Test: manual
Bug: 291689623
Change-Id: If4e6684c8169dfa3edd4e18a11d518737a3b2840
Merged-In: If4e6684c8169dfa3edd4e18a11d518737a3b2840
2023-08-18 14:10:06 +08:00
mxyyiyi
2148988cae Improve battery tips cards.
- Updated Card UI
- Set thumb-up/down feedback preference to be GONE
- Add basic button action

[Screenshots] https://screenshot.googleplex.com/925MEzRyUCxZCi8

Test: manual
Change-Id: I356648d0fcec5dd1ea724297187ecafb5be55fd8
Merged-In: I356648d0fcec5dd1ea724297187ecafb5be55fd8
Bug: 291689623
2023-08-11 03:26:15 +00:00
ykhung
e2f19b7de9 Update incompatible charger checking rule
Bug: 278316711
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge
Change-Id: I8f720bcdf7c0efabc8278913ccf1c0427c857fac
2023-06-01 12:50:47 +08:00
ykhung
c234196bc1 Support incompatible charger state in the battery main page
https://screenshot.googleplex.com/PrSzAtMAhsyqbsR

Bug: 271775549
Test: make test RunSettingsRoboTests
Change-Id: I0bb912eaab9c8837eaa3a9b998b3ebb5a8e6f99f
2023-05-04 14:57:07 +08:00
Kuan Wang
6c4f83f33d Load app usage events data in the hourly job.
Test: make RunSettingsRoboTests + manual
Bug: 260964679
Change-Id: Iaccaa77bd52fb7356cdcb786c64523f21040b128
2022-12-15 06:32:54 +00:00
Kuan Wang
ec1c9d94f2 Remove foreground_service_usage_time_in_ms field which has been merged
into background_usage_time_in_ms in the BatteryUsageStats (b/257392992).

Test: make RunSettingsRoboTests + manual
Bug: 258124768
Bug: 253553141
Change-Id: I0967eec0cbe6d0cb7a0535d744a1046dec1d267b
2022-12-06 01:04:48 +00:00
Zhenwei Chen
2ca0fb13a3 Merge "Add dock defender battery tips" 2022-11-29 02:53:27 +00:00
Zhenwei Chen
8d11d9ceea Add dock defender battery tips
1. Remove the dock defender v1 code
2. Add dock defender battery tips and update
   corresponding list item string

Bug:256523472
Test: Unit test passed and manual test on device
Change-Id: Ib6c09df056744142f42f5e2a13252b58e54c7534
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
2022-11-28 17:45:51 +08:00
Kuan Wang
2b93d40683 Use the field isFullChargeCycleStart in database to get the last full
charge cycle start and remove the unused SharedPreference.

Test: make RunSettingsRoboTests + manual
Bug: 253553141
Change-Id: I74ef71775fa5d4871077f6d5573467aa5843bc6b
2022-11-28 11:27:24 +08:00
Kuan Wang
1493fa2fea Database restructure: use protobuf to save battery information fields.
This patch only updates the existing fields.
There will be 2 following patches to:
1. Expose the new fields (foreground / foreground service / background x
   usage time / power consumption) to UI.
2. Get the full charge cycle start time from Database and remove the
   SharedPreference.

Test: make RunSettingsRoboTests + manual
Bug: 253553141
Change-Id: Iee02dc7e671f97899cb1495323acfa0173e31df2
2022-11-17 06:06:54 +00:00
Kuan Wang
c7afa45eac Clean up unused function getHideApplicationSummary in
PowerUsageFeatureProvider.

Bug: 253395332
Bug: 254769892
Bug: 254769770
Test: make RunSettingsRoboTests
Change-Id: I6acf0cbdb7321934e85939e0acee567001107a17
2022-10-21 04:42:06 +00:00
Kuan Wang
f41ae57f17 Copy Battery Usage Database from SettingsIntelligence to Settings.
Bug: 253395332
Test: make RunSettingsRoboTests + manually
Change-Id: Ibdd2ace10d9e0893b3d96b345d563307b1890df6
2022-10-18 02:26:18 +00:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
jackqdyulei
341ad63da7 Make app predicates singleton
1. AppLabelPredicate
2. AppRestrictionPredicate

Change-Id: I1fd8611c5dd7ffa6318bcb23de7a973c111910b6
Fixes: 111323520
Test: RunSettingsRoboTests
2018-07-19 10:51:42 -07:00
Salvador Martinez
8ccb5a4698 Fix enhanced estimate discharge text showing while charging
In the PowerUsageAdvanced screen the text showing whether your time
remaining information is enhanced or not should not show when the
device is plugged in. This CL fixes a bug in that logic that would
show the text when it wasn't supposed to.

Test: robotests still pass, manual verification
Bug: 63176050
Change-Id: I33fb31671cd9c29aed20483301e51ae1ded1f1b6
2017-07-14 10:30:29 -07:00