diff options
author | Varun Shah <varunshah@google.com> | 2019-04-12 10:54:36 -0700 |
---|---|---|
committer | Varun Shah <varunshah@google.com> | 2019-04-26 11:51:46 -0700 |
commit | 334d6764f79875e2023c7482d6b27a829df34311 (patch) | |
tree | ec7525220e89e58bd5bcc6dae70bd9e671e68159 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 8cee482fdddc678f14eb9a9dd87ee337a3451492 (diff) |
Update standby bucket for uninteracted foreground services.
This fixes a bug where foreground services that were started, but
never interacted with, were not transitioning to the Active bucket
after 30mins - a defined interval.
Also created unit tests for #maybeUpdateUsageStats().
Test steps: (adb shell commands are generic)
1) Install a test app which has a foreground service
* can install test app provided in bug via adb install
2) Set the bucket of the test app to Rare:
$ adb shell am set-stanby-bucket com.packagename rare
3) Launch the foreground service
$ adb shell am broadcast -a com.packagename.intentfilter -n com.packagename/.MyReceiver
4) Wait for approximately 30mins
5) Observe the app bucket - should be Active (10)
$ adb shell am get-standby-bucket com.packagename
Bug: 116189835
Test: atest OomAdjusterTests
Test: manual (steps listed above)
Change-Id: I6949466297cccdc349428c5f6172d65bd9d77a53
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions