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

Commit d8611ecd authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Added a command to return app_standby_enabled

The only way to know the runtime state was check dumpsys usagestats, and
parse through a lot of output.
This makes it easier to retreive the state.

Test: adb shell settings put global app_standby_enabled 0
adb shell dumpsys usagestats is-app-standby-enabled

Bug: 74336662
Change-Id: Ibe80d27bdf940682b9e4c3c14f93b4871f9f1746
parent b504a2f6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -585,6 +585,9 @@ public class UsageStatsService extends SystemService implements
                        flushToDiskLocked();
                        pw.println("Flushed stats to disk");
                        return;
                    } else if ("is-app-standby-enabled".equals(arg)) {
                        pw.println(mAppStandby.mAppIdleEnabled);
                        return;
                    } else if (arg != null && !arg.startsWith("-")) {
                        // Anything else that doesn't start with '-' is a pkg to filter
                        pkg = arg;