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
Loading
Please register or sign in to comment