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

Skip to content
Commit 331beba8 authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Restricting network for low-priority proc-states

Outside of power saving modes like battery saver and doze, network
is freely available to any app that is in memory and can run code on
the processor. However, networking is a power expensive resource and
needs to be used judiciously.

The platform policy will now restrict any apps that are in cached or
nearby process-states that are not important to the user. Any user
critical networking task must be done while being in active and valid
lifecycle states only.
The system will allow a grace period of few seconds to reduce any churn
from quick proc-state transitions but apps should ideally not rely on
this implementation detail.

Apps that are in any of the power allowlists will be exempt from this
restriction.

Refactored some code to use more inclusive language.

Test: atest FrameworksServicesTests:com.android.server.net
Test: atest CtsHostsideNetworkTests

BYPASS_INCLUSIVE_LANGUAGE_REASON=Existing code

Bug: 304347838
Change-Id: I02d82dc88c46ee7eec7e428fd46d0a538481494d
parent b4d3b80e
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