OSDN Git Service

Handle charging state separately from temporary parole
authorAmith Yamasani <yamasani@google.com>
Tue, 13 Sep 2016 21:24:01 +0000 (14:24 -0700)
committerAmith Yamasani <yamasani@google.com>
Thu, 15 Sep 2016 20:38:43 +0000 (13:38 -0700)
commit693d869b32b375a6b3812aa56145e334b3a8c219
tree95617ce364c556d0ef7a465201740a10ef940777
parent1b6e3e48242258e1dafb1709c1f11acd5ee1b1fa
Handle charging state separately from temporary parole

Don't use the parole state to deal with the plugged-in trigger.
Otherwise standby apps will only be paroled for a few minutes
after plugging in to charge and not the entire duration.

Use a different intent for charging state, since the CHARGING
intent takes several seconds to be received.

A refactor some time ago changed the charging state behavior
that caused this regression.

Bug: 31399882
Change-Id: Ic036de5e136b3151b225473d0c3f440adb3b48e7
services/usage/java/com/android/server/usage/UsageStatsService.java