Andy Yu | 33aa642 | 2022-09-12 11:45:08 -0700 | [diff] [blame] | 1 | # Android Game Intervention List |
| 2 | |
| 3 | _This data source is supported only on Android userdebug builds._ |
| 4 | |
| 5 | The "android.game_interventions" data source gathers the list of available game modes and game interventions of each game. |
| 6 | |
| 7 | This allows you to better compare between or document traces of the same game but under different game mode or with different game intervention. |
| 8 | |
| 9 | ### UI |
| 10 | |
| 11 | At the UI level, game interventions are shown as a table in trace info page. |
| 12 | |
| 13 |  |
| 14 | |
| 15 | ### SQL |
| 16 | |
| 17 | At the SQL level, game interventions data is written in the following table: |
| 18 | |
| 19 | * [`android_game_intervention_list`](docs/analysis/sql-tables.autogen#android_game_intervention_list) |
| 20 | |
| 21 | Below is an example of querying what modes are supported (with interventions) and the current game mode of each game. |
| 22 | |
| 23 | ```sql |
| 24 | select package_name, current_mode, standard_mode_supported, performance_mode_supported, battery_mode_supported |
| 25 | from android_game_intervention_list |
| 26 | order by package_name |
| 27 | ``` |
| 28 | package_name | current_mode | standard_mode_supported | performance_mode_supported | battery_mode_supported |
| 29 | -------------|--------------|-------------------------|---------------------------|----------------------- |
| 30 | com.supercell.clashofclans | 1 | 1 | 0 | 1 |
| 31 | com.mobile.legends | 3 | 1 | 0 | 1 |
| 32 | com.riot.league.wildrift | 1 | 1 | 0 | 1 |
| 33 | |
| 34 | ### TraceConfig |
| 35 | |
Daniele Di Proietto | dee3508 | 2022-09-15 16:36:43 +0100 | [diff] [blame] | 36 | Android game intervention list is configured through [AndroidGameInterventionListConfig](/docs/reference/trace-config-proto.autogen#AndroidGameInterventionListConfig) section of trace config. |
Andy Yu | 33aa642 | 2022-09-12 11:45:08 -0700 | [diff] [blame] | 37 | |
| 38 | Sample config: |
| 39 | |
| 40 | ```protobuf |
| 41 | data_sources: { |
| 42 | config { |
| 43 | name: "android.game_interventions" |
| 44 | android_game_intervention_list_config { |
| 45 | package_name_filter: "com.my.game1" |
| 46 | package_name_filter: "com.my.game2" |
| 47 | } |
| 48 | } |
| 49 | } |
| 50 | ``` |