Merge "Recheck if the network state in expedited job is unexpected." into sc-dev am: 1ec983c471 am: a20e2702dd

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15191249

Change-Id: I9688f4989a22f77530a2dd47e37eda934fb2929e
This commit is contained in:
Sudheer Shanka
2021-07-07 18:57:26 +00:00
committed by Automerger Merge Worker

View File

@@ -850,8 +850,10 @@ public abstract class AbstractRestrictBackgroundNetworkTestCase {
final String error = checkForAvailabilityInResultData(
resultData, expectAvailable);
if (error != null) {
fail("Network is not available for expedited job in app2 (" + mUid + "): "
+ error);
Log.d(TAG, "Network state is unexpected, checking again. " + error);
// Right now we could end up in an unexpected state if expedited job
// doesn't have network access immediately after starting, so check again.
assertNetworkAccess(expectAvailable, false /* needScreenOn */);
}
} else {
fail("Unexpected resultCode=" + resultCode + "; received=[" + resultData + "]");