Merge "Merge "Increase timeout for ordered broadcast response." into nougat-cts-dev am: 203361a0c3" into nougat-mr1-cts-dev am: b5abc8f89b
am: f0bc6efb5e
Change-Id: Ic20530cdbae02daf1133500e2778b8829331332b
This commit is contained in:
@@ -741,10 +741,10 @@ abstract class AbstractRestrictBackgroundNetworkTestCase extends Instrumentation
|
||||
protected void registerBroadcastReceiver() throws Exception {
|
||||
executeShellCommand("am startservice com.android.cts.net.hostside.app2/.MyService");
|
||||
// Wait until receiver is ready.
|
||||
final int maxTries = 5;
|
||||
final int maxTries = 10;
|
||||
for (int i = 1; i <= maxTries; i++) {
|
||||
final String message =
|
||||
sendOrderedBroadcast(new Intent(ACTION_RECEIVER_READY), SECOND_IN_MS);
|
||||
sendOrderedBroadcast(new Intent(ACTION_RECEIVER_READY), 4 * SECOND_IN_MS);
|
||||
Log.d(TAG, "app2 receiver acked: " + message);
|
||||
if (message != null) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user