From 4b63d69759ecbb6837b3ee227f336905c9d9bae5 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Thu, 22 Mar 2012 12:36:45 -0700 Subject: Fix test breakage. Change-Id: I2c5fc8c3bf7795ccdd474caa3f858e9a56f026ed --- .../server/NetworkPolicyManagerServiceTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java index b4fd55e..a243e4d 100644 --- a/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/NetworkPolicyManagerServiceTest.java @@ -242,13 +242,13 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { @Suppress public void testPolicyChangeTriggersBroadcast() throws Exception { - mService.setUidPolicy(UID_A, POLICY_NONE); + mService.setAppPolicy(UID_A, POLICY_NONE); // change background policy and expect broadcast final Future backgroundChanged = mServiceContext.nextBroadcastIntent( ConnectivityManager.ACTION_BACKGROUND_DATA_SETTING_CHANGED); - mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); + mService.setAppPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); backgroundChanged.get(); } @@ -316,7 +316,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { expectSetUidForeground(UID_A, true); future = expectRulesChanged(UID_A, RULE_ALLOW_ALL); replay(); - mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); + mService.setAppPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); future.get(); verifyAndReset(); @@ -357,7 +357,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { expectSetUidForeground(UID_A, true); future = expectRulesChanged(UID_A, RULE_ALLOW_ALL); replay(); - mService.setUidPolicy(UID_A, POLICY_NONE); + mService.setAppPolicy(UID_A, POLICY_NONE); future.get(); verifyAndReset(); @@ -379,7 +379,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { expectSetUidForeground(UID_A, false); future = expectRulesChanged(UID_A, RULE_REJECT_METERED); replay(); - mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); + mService.setAppPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); future.get(); verifyAndReset(); @@ -411,7 +411,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { future = expectRulesChanged(UID_A, RULE_ALLOW_ALL); replay(); mProcessObserver.onForegroundActivitiesChanged(PID_1, UID_A, false); - mService.setUidPolicy(UID_A, POLICY_NONE); + mService.setAppPolicy(UID_A, POLICY_NONE); future.get(); verifyAndReset(); @@ -420,7 +420,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { expectSetUidForeground(UID_A, false); future = expectRulesChanged(UID_A, RULE_REJECT_METERED); replay(); - mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); + mService.setAppPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); future.get(); verifyAndReset(); @@ -429,7 +429,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { expectSetUidForeground(UID_A, false); future = expectRulesChanged(UID_A, RULE_ALLOW_ALL); replay(); - mService.setUidPolicy(UID_A, POLICY_NONE); + mService.setAppPolicy(UID_A, POLICY_NONE); future.get(); verifyAndReset(); } @@ -605,7 +605,7 @@ public class NetworkPolicyManagerServiceTest extends AndroidTestCase { expectSetUidForeground(UID_A, false); future = expectRulesChanged(UID_A, RULE_REJECT_METERED); replay(); - mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); + mService.setAppPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND); future.get(); verifyAndReset(); -- cgit v1.1