Commit Graph

19 Commits

Author SHA1 Message Date
ykhung
0cd24adec5 Add allowlist mechanism for battery optimization mode
Add a mechanism to add package name into the allowlist to avoid users
change the battery optimization modes for specific apps in the list

https://screenshot.googleplex.com/8hrHCcTh5bNYXqp

Bug: 281566984
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.*
Change-Id: I8efa6a55646d761f5bee3667a59b38ab68c74bc1
2023-05-15 14:28:49 +08:00
ykhung
8f56114489 Record app optimization mode backup into BatteryHistoricalLog
App optimization mode format:
https://screenshot.googleplex.com/di9DDzBfYf7ihfV

App optimization mode backup format:
https://screenshot.googleplex.com/GkVW5HrgGvmv5yh

Bug: 192523697
Test: make SettingsRoboTests
Change-Id: I60a9a76a8ffc89d625ee3f77c138a19181c81c38
2023-05-11 10:48:47 +08:00
Wesley Wang
1f78ebd8aa Refine optimize page log pattern
- Add timestamp and prefix string
 - Chagne Action.MANUAL to LEAVE for better readability
 screenshot: https://screenshot.googleplex.com/ALTvMaPWVEq8y7c.png

Bug: 192523697
Test: make SettingsRoboTests
Change-Id: I69d1beceb98444d823f6ffc3a015cf61a7d7a66d
2023-05-10 10:11:28 +00:00
SongFerngWang
f7685dd715 Add a config to hide the 3G option at preferred network mode UI
Add a config config_display_network_mode_3g_option to hide the 3G
option at preferred network mode UI

Bug: 261615630
Test: build pass. local test pass.
atest EnabledNetworkModePreferenceControllerTest

Change-Id: I4f94971add1d1eddc9f7c7458b8fc8fdcec3935e
2023-02-08 07:48:08 +08:00
Kuan Wang
1e8ca1d7d2 Move fuelgauge_usage_state.proto into fuelgauge folder.
Test: make RunSettingsRoboTests + manual
Bug: 20424125
Change-Id: Id0ed25e06258764ec58263c2e2f7dec7bfd81c0a
2022-12-02 15:00:58 +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
Wesley Wang
d90026d184 Add BatteryHistoricalLogUtil class
- Impl optimize mode log mechanism to record optimize setup flow
 - Log optimize action with MANUAL, APPLY, RESET and RESTORE
 - Use proto file to serialize logs
 sample result: https://screenshot.googleplex.com/5KPrHVGb4pMvS7V.png

Bug: 241735485
Test: make SettingsRoboTests
Change-Id: I879663de4cf45d0cfb9cd7eee957eeb65addfbe1
2022-11-04 18:09:11 +08:00
Bonian Chen
93ca7288cf [Settings] Code refactor - NetworkModePreference
Code refactor for improving readibility.

Bug: 223461708
Test: unit test EnabledNetworkModePreferenceControllerTest
Change-Id: I3b3157cbc76f104d63062fda495a7391ecc18ada
2022-03-19 10:46:06 +08:00
Bob Badour
a73a67240c [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  protos/Android.bp
  tests/anomaly-tester/Android.bp
  tests/componenttests/Android.bp
  tests/legacy_unit/InstrumentedEntitlementApp/Android.bp
  tests/perftests/Android.bp
  tests/robotests/Android.bp
  tests/uitests/Android.bp
  tests/unit/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I58a85aced69923fa9a8e5a2b89ecfdd33de5e05c
2021-02-25 15:05:14 -08:00
Bob Badour
18e9723489 Revert "[LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings"
This reverts commit 0e73d05c74.

Change-Id: I627be6c5355eda9602b1cb201806fce4548fc951
2021-02-25 11:52:32 -08:00
Bob Badour
0e73d05c74 [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Settings
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  protos/Android.bp
  tests/anomaly-tester/Android.bp
  tests/perftests/Android.bp
  tests/robotests/Android.bp
  tests/uitests/Android.bp
  tests/unit/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: I81f11a66b5977cb5096e262819084706af5fa54c
Merged-in: I81f11a66b5977cb5096e262819084706af5fa54c
2021-02-21 08:50:16 -08:00
Jason Chiu
ca9ece1a0c Card showing mechanism change in homepage
- update contextual card proto interface to fit the new SettingsIntelligence
- show sticky cards at the tail of the card area

Bug: 149274976
Test: robotest
Change-Id: Icca167825c1c037ec12d8836d82c5fdff4331a8e
2020-02-14 17:44:11 +08:00
Raff Tsai
02e45574a3 Add SettingsIntelligenceLogwriter
Bug: 124701288
Test: robolectric, manual
Change-Id: Iea446ae600d22ed62c5ee45afd1cd27a89b5de34
2019-03-27 07:14:20 +08:00
Yanting Yang
4bd94b9053 Remove deprecated EXCLUSIVE field from proto
Fixes: 123560880
Test: robotests
Change-Id: I6ff184dc5998d1e8eadfbfa16c8c7a85ebd75d98
2019-02-18 16:25:23 +08:00
Yanting Yang
13818eb2f5 Deprecate EXCLUSIVE category from contextual_card_list.proto
Bug: 120485678
Test: visual, robotests
Change-Id: Ic287aeeed0743787d3e577c7086e9847b5c33157
2019-01-30 18:52:33 +08:00
Yanting Yang
2784da75a2 Improve UX of Deferred Setup
Change-Id: I3d0735ef1196b04abaef454529664a8daea53967
Bug: 120485678
Test: visual, robotests
2019-01-29 07:43:46 +00:00
Raff Tsai
56d304ea0b Modify proto
Add a field about contextual card score

Change-Id: I52b660801e317112673ada2f449709239a8b3c12
Bug: 79698338
Test: Robolectric
2018-12-05 08:15:17 +08:00
Fan Zhang
9a28c433f2 Update proto for contextual_card_list.
Bug: 118842350
Test: rebuild
Change-Id: I838738f56c8793a8e4d6adf43bc812777edbcd88
2018-11-06 15:48:03 -08:00
Fan Zhang
8985efe3b0 Add contextual card proto libraries.
Test: rebuild
Change-Id: Ifd105a91be4ce3b3ae35766e069d4b4663e54b0f
2018-10-10 10:14:07 -07:00