Feature: Intent-based Automation for PowerPlay Sample #2341
+837
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description: Intent-based Automation and Stress-Testing for PowerPlay
Summary
This PR implements a robust command-line interface for the PowerPlay sample app via Android Intents. This enables full control of the audio engine via
adb, facilitating automated power profiling, stress testing, and validation of PCM Offload behavior without manual UI interaction.Changes
MainActivity.javato trigger engine actions and configuration changes.none,lowlat,powersave, andoffloadvia commands.toggle_offloadmode to test system stability during rapid resource transitions.duration_msfor self-terminating tests and abackgroundflag to test system behavior during display-off/doze transitions.POWERPLAY_STATUSlogcat outputs for easy parsing by external automation scripts.Supported ADB Parameters
commandplay,pause,stopperf_modenone,lowlat,powersave,offloadsong_indexvolumebackgroundduration_mstoggle_offloadHow to Test
You can verify the automation by running the following command to start a timed, background offload session:
adb shell am start -n com.google.oboe.samples.powerplay/.MainActivity \ --es command play \ --es perf_mode offload \ --ez background true \ --ei duration_ms 10000