• Jeff Sharkey's avatar
    Observe screen on/off events in NetworkPolicy. · a4620793
    Jeff Sharkey authored
    The POLICY_REJECT_BACKGROUND policy requires that network traffic be
    blocked when a UID goes into the background.  Even if the UID has an
    activity in the foreground, it's considered "background" if the screen
    is turned off.
    
    This changes watches for SCREEN_ON/OFF broadcasts, and rule generation
    now observes screen state.  It also introduces an observer pattern so
    that ActivityManager doesn't directly know about NetworkPolicy, and
    moves the service management into SystemServer.
    
    Change-Id: Ie7a84929d3ca60ae4578d47e19d5a8da10fd8d58
    a4620793
Android.mk 27.3 KB