bef28feba57be7fd6a4d14a85a8229154338b2ed |
|
30-Oct-2015 |
Dianne Hackborn <hackbod@google.com> |
Initial stab at background check. Actually, this implementation is more what we want for ephemeral apps. I am realizing the two are not really the same thing. :( For this implementation, we now keep track of how long a uid has been in the background, and after a certain amount of time (currently 1 minute) we mark it as "idle". Any packages associated with that uid are then no longer allowed to run in the background. This means, until the app next goes in the foreground: - No manifest broadcast receivers in the app will execute. - No services can be started (binding services is still okay, as this is outside dependencies on the app that should still be represented). - All alarms for the app are cancelled and no more can be set. - All jobs for the app are cancelled and no more can be scheduled. - All syncs for the app are cancelled and no more can be requested. Change-Id: If53714ca4beed35faf2e89f916ce9eaaabd9290d
/frameworks/base/core/java/android/app/IUidObserver.aidl
|
d23e0d6901935588f9472bd7073fea0009581e9b |
|
16-May-2015 |
Dianne Hackborn <hackbod@google.com> |
Update power manager to track uid state like netstats. To follow the correct semantics for when restricts due to device idle can be applied, power manager need to know about uid process states like net policy so that it can allow wake locks from apps that are in the foreground. Since this is being added to a second place, I reworked things so that the activity manager now keeps track of per-uid process states and allows apps to register to listen to those, rather than having to track lower-level process states and transform them into an overall uid state. Both net policy and power manager use this new facility. Change-Id: I77359164c40d0f36fe1ef296dd9f9c3062431148
/frameworks/base/core/java/android/app/IUidObserver.aidl
|