Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1c5ef039 authored by Hui Yu's avatar Hui Yu
Browse files

Add shell am command to set and get app's background restriction level.

Added two "adb shell am " command.
adb shell am set-bg-restriction-level [--user <USER_ID>] <PACKAGE> unrestricted|exempted|adaptive_bucket|restricted_bucket|background_restricted|hibernation
adb shell am get-bg-restriction-level [--user <USER_ID>] <PACKAGE>

Note: right now only when the restriction level toggle between above(include) adaptive_bucket level and below(include) restricted_bucket level, the actual app standby bucket would change.

Bug: 211694922
Test: adb shell am get-bg-restriction-level --user 0 <packageName>
adb shell am set-bg-restriction-level --user 0 <packageName> restricted_bucket
adb shell am get-bg-restriction-level --user 0 <packageName>
adb shell am set-bg-restriction-level --user 0 <packageName> adaptive_bucket
adb shell am get-bg-restriction-level --user 0 <packageName>

Change-Id: If9cc2b0b0e3acaf2f145f79c9bf5072054994114
parent b37c41d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment