am dbb1e6af: Fix some more.

* commit 'dbb1e6af7fc82ac5f615e46ddaa93ba1ee7c0094':
  Fix some more.
This commit is contained in:
Dianne Hackborn
2012-09-04 11:25:08 -07:00
committed by Android Git Automerger

View File

@@ -25,6 +25,7 @@ import android.net.NetworkInfo;
import android.os.Bundle; import android.os.Bundle;
import android.os.RemoteException; import android.os.RemoteException;
import android.os.SystemClock; import android.os.SystemClock;
import android.os.UserHandle;
/** /**
* Class for monitoring network connectivity during monkey runs. * Class for monitoring network connectivity during monkey runs.
@@ -40,7 +41,7 @@ public class MonkeyNetworkMonitor extends IIntentReceiver.Stub {
private long mElapsedTime = 0; // amount of time spent between start() and stop() private long mElapsedTime = 0; // amount of time spent between start() and stop()
public void performReceive(Intent intent, int resultCode, String data, Bundle extras, public void performReceive(Intent intent, int resultCode, String data, Bundle extras,
boolean ordered, boolean sticky) throws RemoteException { boolean ordered, boolean sticky, int sendingUser) throws RemoteException {
NetworkInfo ni = (NetworkInfo) intent.getParcelableExtra( NetworkInfo ni = (NetworkInfo) intent.getParcelableExtra(
ConnectivityManager.EXTRA_NETWORK_INFO); ConnectivityManager.EXTRA_NETWORK_INFO);
if (LDEBUG) System.out.println("Network state changed: " if (LDEBUG) System.out.println("Network state changed: "
@@ -84,7 +85,7 @@ public class MonkeyNetworkMonitor extends IIntentReceiver.Stub {
public void register(IActivityManager am) throws RemoteException { public void register(IActivityManager am) throws RemoteException {
if (LDEBUG) System.out.println("registering Receiver"); if (LDEBUG) System.out.println("registering Receiver");
am.registerReceiver(null, null, this, filter, null); am.registerReceiver(null, null, this, filter, null, UserHandle.USER_ALL);
} }
public void unregister(IActivityManager am) throws RemoteException { public void unregister(IActivityManager am) throws RemoteException {