diff options
author | Ashish Sharma <ashishsharma@google.com> | 2011-06-15 19:34:53 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2011-06-29 10:51:06 -0700 |
commit | 50fd36d7c38c40b087c8f3e3172478abe0c051d9 (patch) | |
tree | 1ed0e512b7901ff13a328914c51a529ccc29e617 /services/tests | |
parent | b8e52574ead87ea0eb9077beb54b8ed22dd444f1 (diff) | |
download | frameworks_base-50fd36d7c38c40b087c8f3e3172478abe0c051d9.zip frameworks_base-50fd36d7c38c40b087c8f3e3172478abe0c051d9.tar.gz frameworks_base-50fd36d7c38c40b087c8f3e3172478abe0c051d9.tar.bz2 |
Push interface quota rules from NetworkPolicyManager to kernel.
Change-Id: Id2b758f561820b44839f69bf5fbd676cae771fe3
Diffstat (limited to 'services/tests')
-rw-r--r-- | services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java index 324e896..af2e01c 100644 --- a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java @@ -56,6 +56,7 @@ import android.net.NetworkState; import android.net.NetworkStats; import android.net.NetworkTemplate; import android.os.Binder; +import android.os.INetworkManagementService; import android.os.IPowerManager; import android.test.AndroidTestCase; import android.test.mock.MockPackageManager; @@ -95,6 +96,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { private IActivityManager mActivityManager; private IPowerManager mPowerManager; private INetworkStatsService mStatsService; + private INetworkManagementService mNetworkManagement; private INetworkPolicyListener mPolicyListener; private TrustedTime mTime; private IConnectivityManager mConnManager; @@ -150,13 +152,15 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { mActivityManager = createMock(IActivityManager.class); mPowerManager = createMock(IPowerManager.class); mStatsService = createMock(INetworkStatsService.class); + mNetworkManagement = createMock(INetworkManagementService.class); mPolicyListener = createMock(INetworkPolicyListener.class); mTime = createMock(TrustedTime.class); mConnManager = createMock(IConnectivityManager.class); mNotifManager = createMock(INotificationManager.class); mService = new NetworkPolicyManagerService( - mServiceContext, mActivityManager, mPowerManager, mStatsService, mTime, mPolicyDir); + mServiceContext, mActivityManager, mPowerManager, mStatsService, + mNetworkManagement, mTime, mPolicyDir); mService.bindConnectivityManager(mConnManager); mService.bindNotificationManager(mNotifManager); @@ -526,14 +530,14 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { } private void replay() { - EasyMock.replay(mActivityManager, mPowerManager, mStatsService, mPolicyListener, mTime, - mConnManager, mNotifManager); + EasyMock.replay(mActivityManager, mPowerManager, mStatsService, mPolicyListener, + mNetworkManagement, mTime, mConnManager, mNotifManager); } private void verifyAndReset() { - EasyMock.verify(mActivityManager, mPowerManager, mStatsService, mPolicyListener, mTime, - mConnManager, mNotifManager); - EasyMock.reset(mActivityManager, mPowerManager, mStatsService, mPolicyListener, mTime, - mConnManager, mNotifManager); + EasyMock.verify(mActivityManager, mPowerManager, mStatsService, mPolicyListener, + mNetworkManagement, mTime, mConnManager, mNotifManager); + EasyMock.reset(mActivityManager, mPowerManager, mStatsService, mPolicyListener, + mNetworkManagement, mTime, mConnManager, mNotifManager); } } |