Proto commits in LineageOS/android_packages_apps_Settings

These 54 commits are when the Protocol Buffers files have changed:

Commit:b6e0cd9
Author:Treehugger Robot
Committer:Android (Google) Code Review

Merge "Add whether app optimization mode mutable in BatteryUsageDiff proto." into main

The documentation is generated from this commit.

Commit:59e5dc7
Author:mxyyiyi
Committer:mxyyiyi

Add whether app optimization mode mutable in BatteryUsageDiff proto. Bug: 350657779 Test: atest ConvertUtilsTest Flag: EXEMPT bug fix Change-Id: I80a5e6513e1bee88f85caeed7661b10204df8a51

Commit:7009c00
Author:Chaohui Wang
Committer:Chaohui Wang

Fix search for MMS Message Also display multiple results when there are multiple MMS Message on different SIMs. When doing indexing, we not also log sub id as part of the key. When user clicks the result, using SpaSearchLandingActivity to do the redirection, set arguments to the fragment. Fix: 352245817 Flag: EXEMPT bug fix Test: manual - search mms Test: unit test Change-Id: Id47a1151cb418c18f68f97e3be33dcd21c5f5102

Commit:7477f4e
Author:Chaohui Wang
Committer:Chaohui Wang

Show category when search "Mobile data" The displayed category is "SIMs". Bug: 346776183 Flag: EXEMPT bug fix Test: manual - search "Mobile data" Test: unit test Change-Id: If3c395281e96603193e7476a9e76d1f9e9213531

Commit:dc841cd
Author:Zaiyue Xue
Committer:Android Build Coastguard Worker

AiCore reattribute feature Bug: 344438848 Bug: 346706894 Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage Flag: EXEMPT bug fix (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:164e2be9380ef0df6afe7616fb0bedc8eea6f899) Merged-In: Ifb18c2d156d11fcfdc67cff575ba800c4a6cc0fe Change-Id: Ifb18c2d156d11fcfdc67cff575ba800c4a6cc0fe

Commit:f8b46c0
Author:YK Hung
Committer:Zaiyue Xue

AiCore reattribute feature Bug: 346706894 Bug: 344438848 Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage Flag: EXEMPT bug fix Change-Id: Ifb18c2d156d11fcfdc67cff575ba800c4a6cc0fe Merged-In: Icc9a475a71f189e72bf06f9a0b4c23380a90a603

Commit:f5cf54b
Author:YK Hung
Committer:YK Hung

Add new database table and proto for battery usage reattribution (2/5) Bug: 346706894 Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage Flag: EXEMPT bug fix Change-Id: If360246d974abdea7004023aedcf1a4be7b63633

Commit:8eaf8ed
Author:mxyyiyi
Committer:mxyyiyi

Add AppOptimizationModeEventsUtils to save & update app optimization mode expiration events. - [Update] Save app optimizaiton mode set & expire events from turbo. - [Reset ] Restore optimization mode for expired events in Periodic job. - [Delete] Cancel expiration event if user updates mode in app usage page. Bug: 338965652 Test: atest + manual Change-Id: I3fb7311207da1bdb1146ea1ff041aca6adb66052

Commit:d3ce903
Author:mxyyiyi
Committer:mxyyiyi

Update database clear & job refresh mechanism for time zone change intent - Clear database and reset periodic job - Take a snapshot of current battery usage stats Bug: 336423923 Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage Change-Id: I4aade9db950b508e2190605371f246904f131da3

Commit:1df2429
Author:mxyyiyi
Committer:mxyyiyi

Add new action to log battery optimizaition mode updated by Turbo. Bug: 338965652 Test: atest SettingsRoboTests:com.android.settings.fuelgauge.BatteryOptimizeUtilsTest Change-Id: I80a53d327fee4b0442784e9b20617029f0e63f46

Commit:08d4b7a
Author:mxyyiyi
Committer:mxyyiyi

Log optimization mode for app usage in BatteryUsageSlot. Bug: 335374932 Test: atest ConvertUtilsTest Change-Id: Icf86b9bee58b3b70d99e166d9fce0dfd7e30dea3

Commit:cf292a0
Author:Zaiyue Xue
Committer:Zaiyue Xue

Support tips card directly changing settings [step-4] Add the settings name and settings value to gerrit proto. Bug: 333989261 Test: presubmit Change-Id: I169b615bb8a637614dd5b5c3eed52b4862d2e13f

Commit:ed7ce44
Author:mxyyiyi
Committer:mxyyiyi

Add record for anomaly detect request source and clean up unused function. Bug: 315905559 Test: make RunSettingsGoogleRoboTests ROBOTEST_FILTER="com.google.android.settings.fuelgauge.*" Change-Id: I21a13a7910b21b27aac58143bd41c77e87c71953

Commit:a919306
Author:mxyyiyi
Committer:mxyyiyi

Provide foreground_service usage time in BatteryDiffEntry. - Fetch foreground service info through new api from UidBatteryConsumer. - Record fgs & bg usage time separately, combine them till ui display. Bug: 315255868 Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge.*" Change-Id: Ic19844db7908a6ae6522c7a72972f44f94dcfca4

Commit:ad23b53
Author:mxyyiyi
Committer:mxyyiyi

Update battery usage data clear mechanism while time change. - Accept time updated in the last job schedule range: [ max (last-full-charge / last-even-hours) , next-even-hours ] Bug: 308714066 Fix: 308714066 Test: manual Change-Id: Id92fffddb7666d63fce66fee696a27d957c8b537

Commit:1b9eb17
Author:mxyyiyi
Committer:mxyyiyi

Refactor Power Usage Time Page. - Show use time category Screenshot: [Screen time with hint] https://screenshot.googleplex.com/3cRLrwevzw4iytb [Background time with hint] https://screenshot.googleplex.com/zEf8PcWopCVCRZR [without hint] https://screenshot.googleplex.com/9bao9sVd8s7VRwM [enter from app info (without category)] https://screenshot.googleplex.com/8sozxMrq8ojadiF Bug: 302063050 Test: Manual Change-Id: Ic967d05a173afa76c2a958e1332dedd9f83cd687

Commit:56ba1c0
Author:mxyyiyi
Committer:Xinyi Mao

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

Commit:e9378d2
Author:mxyyiyi
Committer:mxyyiyi

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 Bug: 284893240 Test: manual Change-Id: Ic02db49cb3794ef134759d9dcec5f5ef32454a95 Merged-In: Ic02db49cb3794ef134759d9dcec5f5ef32454a95 Merged-In: I7015cdf5a96d518febb160934d780ae84fe14427

Commit:6750634
Author:mxyyiyi
Committer:mxyyiyi

Impl highlight effect on BatteryChartView slots. Screenshot: https://screenshot.googleplex.com/F5VrGjj5kdNHMV6 Bug: 284893240 Bug: 291689623 Test: manual Change-Id: I846d95d31e8bb839481b86a94d5191ff205f8328

Commit:a93fd54
Author:Zaiyue Xue
Committer:Zaiyue Xue

Save foreground_service and cached consumed power in battery usage slot datebase. Bug: 284893240 Test: manual Change-Id: Ic09efabb0d93fb4bc7400b9410f32ec2f438dc73

Commit:c68e038
Author:mxyyiyi
Committer:Zaiyue Xue

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

Commit:5cbf3b0
Author:mxyyiyi
Committer:mxyyiyi

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

Commit:6b5273f
Author:mxyyiyi
Committer:Xinyi Mao

Modify the name of power_anomaly_event enum fields Test: manual Bug: 291689623 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:93112b075979c2829bd3fa14c87160e361f66a82) Change-Id: I1df76167548033887a6227d7b643117c28d68125

Commit:980116b
Author:mxyyiyi
Committer:mxyyiyi

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

Commit:12f8f5a
Author:Xinyi Mao
Committer:Android (Google) Code Review

Merge "Update power_anomaly_event proto fields" into main

Commit:af8fdee
Author:mxyyiyi
Committer:Xinyi Mao

Update power_anomaly_event proto fields - add enum PowerAnomalyType/PowerAnomalyKey - update the func to get anomaly index Test: manual Bug: 291689623 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:356be9109080bc54232ff801b739ec10cab4fdfa) Change-Id: If4e6684c8169dfa3edd4e18a11d518737a3b2840

Commit:50da7fe
Author:Zaiyue Xue
Committer:Zaiyue Xue

Battery usage page latency improvement (1-8) Save battery slot diff data into database in hourly job. Then read the saved diff data and only calculate the remaining data. This could speed up the battery usage loading. Bug: 261163071 Fix: 261163071 Test: manual Change-Id: Icd4868ca9326b64b17ddbccdb0311e755dc68026

Commit:f4dc70a
Author:mxyyiyi
Committer:mxyyiyi

Updated PowerAnomalyEvent Proto. - Add repeated fields. - Add unique id. - Updated main_button action arguments. Test: manual Bug: 291689623 Change-Id: Id9fa88d6df0db50472732e4a50aa00a7a02db284 Merged-In: Id9fa88d6df0db50472732e4a50aa00a7a02db284

Commit:66530d6
Author:mxyyiyi
Committer:Xinyi Mao

Updated PowerAnomalyEvent Proto. Test: manual Bug: 291689623 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a8f21d75be551f062c43490b08ebc5b0aa23a220) Change-Id: Id9fa88d6df0db50472732e4a50aa00a7a02db284

Commit:77bb2e1
Author:Zaiyue Xue
Committer:Zaiyue Xue

Define the anomaly proto for anomaly detection project Bug: 284893240 Test: presubmit Change-Id: Ifecc0c952392c58f5c10147d37d3de21a05157b5

Commit:ef66549
Author:ykhung
Committer:ykhung

Add a mechanism to log battery usage periodic job events Example history log: Jul 07, 2023, 15:28:51 SCHEDULE_JOB triggerTime=Jul 07, 2023, 16:00:00 Jul 07, 2023, 15:32:16 FETCH_USAGE_DATA Jul 07, 2023, 15:32:17 INSERT_USAGE_DATA size=37 Jul 07, 2023, 15:43:45 FETCH_USAGE_DATA Jul 07, 2023, 15:43:48 INSERT_USAGE_DATA size=47 Jul 07, 2023, 15:43:49 SCHEDULE_JOB triggerTime=Jul 07, 2023, 16:00:00 Bug: 284893240 Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge Change-Id: I45a1ce0ce9b70f095702727e53d7b7ce8824abdb

Commit:0cd24ad
Author:ykhung
Committer:ykhung

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

Commit:8f56114
Author:ykhung
Committer:ykhung

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

Commit:1f78ebd
Author:Wesley Wang
Committer:Wesley Wang

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

Commit:ff11b8e
Author:Zaiyue Xue
Committer:Zaiyue Xue

Exclude screen on time in battery usage page when the device is in charging. Bug: 265751163 Fix: 265751163 Test: manual Change-Id: I4ed71e1d6fad56a7cbfc9cd47ed4d791f45261ce

Commit:e85bb50
Author:SongFerngWang
Committer:SongFerng Wang

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 (cherry picked from commit f7685dd715874cc11360be252c212c673bd78b5c) Merged-In: I4f94971add1d1eddc9f7c7458b8fc8fdcec3935e

Commit:f7685dd
Author:SongFerngWang
Committer:SongFerngWang

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

Commit:1ce97c8
Author:Kuan Wang
Committer:Kuan Wang

Generate app and device screen-on time data and return back to UI for rendering. Test: make RunSettingsRoboTests + manually Bug: 260964903 Change-Id: I2fd69b4686cc2e1413ad0eb43c07b6164e411411

Commit:120c688
Author:Kuan Wang
Committer:Kuan Wang

Generate intermediate app usage data after all usage data has been loaded for further use. Test: make RunSettingsRoboTests + manually Bug: 260964903 Change-Id: I52d96151cab112adca68573f3b47a53b7152f2c0

Commit:6c4f83f
Author:Kuan Wang
Committer:Kuan Wang

Load app usage events data in the hourly job. Test: make RunSettingsRoboTests + manual Bug: 260964679 Change-Id: Iaccaa77bd52fb7356cdcb786c64523f21040b128

Commit:ec1c9d9
Author:Kuan Wang
Committer:Kuan Wang

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

Commit:1e8ca1d
Author:Kuan Wang

Move fuelgauge_usage_state.proto into fuelgauge folder. Test: make RunSettingsRoboTests + manual Bug: 20424125 Change-Id: Id0ed25e06258764ec58263c2e2f7dec7bfd81c0a

Commit:1493fa2
Author:Kuan Wang
Committer:Kuan Wang

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

Commit:d90026d
Author:Wesley Wang
Committer:Wesley Wang

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

Commit:d546043
Author:Bonian Chen
Committer:Bonian Chen

[Settings] Code refactor - NetworkModePreference Code refactor for improving readibility. Bug: 223461708 Test: unit test EnabledNetworkModePreferenceControllerTest Change-Id: I3b3157cbc76f104d63062fda495a7391ecc18ada

Commit:93ca728
Author:Bonian Chen
Committer:Bonian Chen

[Settings] Code refactor - NetworkModePreference Code refactor for improving readibility. Bug: 223461708 Test: unit test EnabledNetworkModePreferenceControllerTest Change-Id: I3b3157cbc76f104d63062fda495a7391ecc18ada

Commit:ca9ece1
Author:Jason Chiu
Committer:Jason Chiu

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

Commit:02e4557
Author:Raff Tsai
Committer:Raff Tsai

Add SettingsIntelligenceLogwriter Bug: 124701288 Test: robolectric, manual Change-Id: Iea446ae600d22ed62c5ee45afd1cd27a89b5de34

Commit:4bd94b9
Author:Yanting Yang

Remove deprecated EXCLUSIVE field from proto Fixes: 123560880 Test: robotests Change-Id: I6ff184dc5998d1e8eadfbfa16c8c7a85ebd75d98

Commit:13818eb
Author:Yanting Yang

Deprecate EXCLUSIVE category from contextual_card_list.proto Bug: 120485678 Test: visual, robotests Change-Id: Ic287aeeed0743787d3e577c7086e9847b5c33157

Commit:2784da7
Author:Yanting Yang
Committer:Yanting Yang

Improve UX of Deferred Setup Change-Id: I3d0735ef1196b04abaef454529664a8daea53967 Bug: 120485678 Test: visual, robotests

Commit:56d304e
Author:Raff Tsai
Committer:Raff Tsai

Modify proto Add a field about contextual card score Change-Id: I52b660801e317112673ada2f449709239a8b3c12 Bug: 79698338 Test: Robolectric

Commit:9a28c43
Author:Fan Zhang
Committer:Fan Zhang

Update proto for contextual_card_list. Bug: 118842350 Test: rebuild Change-Id: I838738f56c8793a8e4d6adf43bc812777edbcd88

Commit:8985efe
Author:Fan Zhang
Committer:Fan Zhang

Add contextual card proto libraries. Test: rebuild Change-Id: Ifd105a91be4ce3b3ae35766e069d4b4663e54b0f