Ray Milkey
Committed by Brian O'Connor

Removed deprecated intent operations

Change-Id: I2ca316dab4c1ac1a66fb4ddf101c4adf3302dcd2
...@@ -42,18 +42,6 @@ public final class IntentOperation { ...@@ -42,18 +42,6 @@ public final class IntentOperation {
42 * Indicates that an intent should be removed. 42 * Indicates that an intent should be removed.
43 */ 43 */
44 WITHDRAW, 44 WITHDRAW,
45 -
46 - /**
47 - * Indicates that an intent should be replaced with another.
48 - */
49 - @Deprecated
50 - REPLACE,
51 -
52 - /**
53 - * Indicates that an intent should be updated (i.e. recompiled/reinstalled).
54 - */
55 - @Deprecated
56 - UPDATE,
57 } 45 }
58 46
59 /** 47 /**
......
...@@ -43,15 +43,6 @@ public interface IntentService { ...@@ -43,15 +43,6 @@ public interface IntentService {
43 void withdraw(Intent intent); 43 void withdraw(Intent intent);
44 44
45 /** 45 /**
46 - * Replaces the specified intent with a new one.
47 - *
48 - * @param oldIntentId identifier of the old intent being replaced
49 - * @param newIntent new intent replacing the old one
50 - */
51 - @Deprecated
52 - void replace(IntentId oldIntentId, Intent newIntent);
53 -
54 - /**
55 * Returns an iterable of intents currently in the system. 46 * Returns an iterable of intents currently in the system.
56 * 47 *
57 * @return set of intents 48 * @return set of intents
......
...@@ -186,11 +186,6 @@ public class FakeIntentManager implements TestableIntentService { ...@@ -186,11 +186,6 @@ public class FakeIntentManager implements TestableIntentService {
186 } 186 }
187 187
188 @Override 188 @Override
189 - public void replace(IntentId oldIntentId, Intent newIntent) {
190 - // TODO: implement later
191 - }
192 -
193 - @Override
194 public Set<Intent> getIntents() { 189 public Set<Intent> getIntents() {
195 return Collections.unmodifiableSet(new HashSet<>(intents.values())); 190 return Collections.unmodifiableSet(new HashSet<>(intents.values()));
196 } 191 }
......
...@@ -33,11 +33,6 @@ public class IntentServiceAdapter implements IntentService { ...@@ -33,11 +33,6 @@ public class IntentServiceAdapter implements IntentService {
33 } 33 }
34 34
35 @Override 35 @Override
36 - public void replace(IntentId oldIntentId, Intent newIntent) {
37 -
38 - }
39 -
40 - @Override
41 public Iterable<Intent> getIntents() { 36 public Iterable<Intent> getIntents() {
42 return null; 37 return null;
43 } 38 }
......
...@@ -167,11 +167,6 @@ public class IntentManager ...@@ -167,11 +167,6 @@ public class IntentManager
167 } 167 }
168 168
169 @Override 169 @Override
170 - public void replace(IntentId oldIntentId, Intent newIntent) {
171 - throw new UnsupportedOperationException("replace is not implemented");
172 - }
173 -
174 - @Override
175 public Iterable<Intent> getIntents() { 170 public Iterable<Intent> getIntents() {
176 return store.getIntents(); 171 return store.getIntents();
177 } 172 }
......
...@@ -373,31 +373,6 @@ public class IntentManagerTest { ...@@ -373,31 +373,6 @@ public class IntentManagerTest {
373 assertEquals(0L, flowRuleService.getFlowRuleCount()); 373 assertEquals(0L, flowRuleService.getFlowRuleCount());
374 } 374 }
375 375
376 - @Test
377 - public void replaceIntent() {
378 - flowRuleService.setFuture(true);
379 -
380 - MockIntent intent = new MockIntent(MockIntent.nextId());
381 - listener.setLatch(1, Type.INSTALLED);
382 - service.submit(intent);
383 - listener.await(Type.INSTALLED);
384 - assertEquals(1L, service.getIntentCount());
385 - assertEquals(1L, manager.flowRuleService.getFlowRuleCount());
386 -
387 - MockIntent intent2 = new MockIntent(MockIntent.nextId());
388 - listener.setLatch(1, Type.WITHDRAWN);
389 - listener.setLatch(1, Type.INSTALL_REQ);
390 - listener.setLatch(1, Type.INSTALLED);
391 - service.replace(intent.id(), intent2);
392 - listener.await(Type.WITHDRAWN);
393 - listener.await(Type.INSTALLED);
394 - delay(10); //FIXME this is a race
395 - assertEquals(1L, service.getIntentCount());
396 - assertEquals(1L, manager.flowRuleService.getFlowRuleCount());
397 - assertEquals(intent2.number().intValue(),
398 - flowRuleService.flows.iterator().next().priority());
399 - }
400 -
401 /** 376 /**
402 * Tests for proper behavior of installation of an intent that triggers 377 * Tests for proper behavior of installation of an intent that triggers
403 * a compilation error. 378 * a compilation error.
......