Merge "Verify network state of apps hosting fg-service and in idle state." am: 468293beef am: 7cb66673cc
Original change: https://android-review.googlesource.com/c/platform/cts/+/1455860 Change-Id: Iad434b5270372230b69c4c42e0a588d0db32d28a
This commit is contained in:
@@ -78,6 +78,17 @@ abstract class AbstractAppIdleTestCase extends AbstractRestrictBackgroundNetwork
|
|||||||
stopForegroundService();
|
stopForegroundService();
|
||||||
assertAppIdle(true);
|
assertAppIdle(true);
|
||||||
assertBackgroundNetworkAccess(false);
|
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
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user