2

I'm trying to remove this bug by upgrading how my app handles receiving messages and doing background work, but I can't cause the bug to happen without just waiting for an hour or so.

How can I reproduce this? I've tried making a project that does nothing but launch a service as soon as the app is paused but works just fine. I've tried adb shell dumpsys deviceidle force-idle, adb shell dumpsys battery unplug and adb shell am set-inactive <packageName> true. No luck.

If I can't force this error to happen, I don't have a way to verify my fixes are correct.

Ethan_AI
  • 1,049
  • 2
  • 13
  • 20

1 Answers1

0

Did you try the command below?

adb shell am make-uid-idle [--user user-id | all | current] package-name

Source: https://source.android.com/devices/tech/power/app_mgmt#testing-app-restrictions

mfekim
  • 475
  • 4
  • 9