Merge "Verify network state of apps hosting fg-service and in idle state."
This commit is contained in:
@@ -78,6 +78,17 @@ abstract class AbstractAppIdleTestCase extends AbstractRestrictBackgroundNetwork
|
||||
stopForegroundService();
|
||||
assertAppIdle(true);
|
||||
assertBackgroundNetworkAccess(false);
|
||||
|
||||
// Set Idle after foreground service start.
|
||||
launchComponentAndAssertNetworkAccess(TYPE_COMPONENT_FOREGROUND_SERVICE);
|
||||
setAppIdle(true);
|
||||
addPowerSaveModeWhitelist(TEST_PKG);
|
||||
removePowerSaveModeWhitelist(TEST_PKG);
|
||||
assertForegroundServiceNetworkAccess();
|
||||
stopForegroundService();
|
||||
assertAppIdle(true);
|
||||
assertBackgroundNetworkAccess(false);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user