Removed onIncomingCall() from the CallHandlerService.
Using OnUpdate() exclusively with a fullUpdate flag.
Change-Id: I107cfdc6d132a524354bbede99550c71360e33ba
diff --git a/src/com/android/phone/CallHandlerServiceProxy.java b/src/com/android/phone/CallHandlerServiceProxy.java
index 24641c0..5d6f68d 100644
--- a/src/com/android/phone/CallHandlerServiceProxy.java
+++ b/src/com/android/phone/CallHandlerServiceProxy.java
@@ -56,21 +56,11 @@
mCallCommandService = callCommandService;
mCallModeler = callModeler;
- mCallModeler.addListener(this);
setupServiceConnection();
- }
+ mCallModeler.setListener(this);
- @Override
- public void onNewCall(Call call) {
- if (mCallHandlerService != null) {
- try {
- mCallHandlerService.onIncomingCall(call);
- } catch (RemoteException e) {
- Log.e(TAG, "Remote exception handling onIncomingCall", e);
- }
- } else {
- Log.wtf(TAG, "Call handle service has not connected! Cannot accept incoming call.");
- }
+ // start the whole process
+ onUpdate(mCallModeler.getFullList(), true);
}
@Override
@@ -85,10 +75,10 @@
}
@Override
- public void onUpdate(List<Call> calls) {
+ public void onUpdate(List<Call> calls, boolean fullUpdate) {
if (mCallHandlerService != null) {
try {
- mCallHandlerService.onUpdate(calls);
+ mCallHandlerService.onUpdate(calls, fullUpdate);
} catch (RemoteException e) {
Log.e(TAG, "Remote exception handling onUpdate", e);
}