blob: f8cb833224e665c8fd235c6e07509c0b904ea498 [file] [log] [blame] [view]
Andy Yu33aa6422022-09-12 11:45:08 -07001# Android Game Intervention List
2
3_This data source is supported only on Android userdebug builds._
4
5The "android.game_interventions" data source gathers the list of available game modes and game interventions of each game.
6
7This 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
11At the UI level, game interventions are shown as a table in trace info page.
12
13![](/docs/images/android_game_interventions.png "Android game intervention list in the UI")
14
15### SQL
16
17At 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
21Below is an example of querying what modes are supported (with interventions) and the current game mode of each game.
22
23```sql
24select package_name, current_mode, standard_mode_supported, performance_mode_supported, battery_mode_supported
25from android_game_intervention_list
26order by package_name
27```
28package_name | current_mode | standard_mode_supported | performance_mode_supported | battery_mode_supported
29-------------|--------------|-------------------------|---------------------------|-----------------------
30com.supercell.clashofclans | 1 | 1 | 0 | 1
31com.mobile.legends | 3 | 1 | 0 | 1
32com.riot.league.wildrift | 1 | 1 | 0 | 1
33
34### TraceConfig
35
Daniele Di Proiettodee35082022-09-15 16:36:43 +010036Android game intervention list is configured through [AndroidGameInterventionListConfig](/docs/reference/trace-config-proto.autogen#AndroidGameInterventionListConfig) section of trace config.
Andy Yu33aa6422022-09-12 11:45:08 -070037
38Sample config:
39
40```protobuf
41data_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```