diff options
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallServiceImpl.java | 53 |
1 files changed, 23 insertions, 30 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallServiceImpl.java b/InCallUI/src/com/android/incallui/InCallServiceImpl.java index c69571a67..f19220199 100644 --- a/InCallUI/src/com/android/incallui/InCallServiceImpl.java +++ b/InCallUI/src/com/android/incallui/InCallServiceImpl.java @@ -28,38 +28,31 @@ import android.telecomm.Phone; * dialing (outgoing), and active calls. When the last call is disconnected, Telecomm will unbind to * the service triggering InCallActivity (via CallList) to finish soon after. */ -public class InCallServiceImpl extends Service { +public class InCallServiceImpl extends InCallService { - private final InCallService mInCallServiceInstance = new InCallService() { - @Override - public void onPhoneCreated(Phone phone) { - Log.v(this, "onPhoneCreated"); - CallList.getInstance().setPhone(phone); - AudioModeProvider.getInstance().setPhone(phone); - TelecommAdapter.getInstance().setPhone(phone); - InCallPresenter.getInstance().setPhone(phone); - InCallPresenter.getInstance().setUp( - getApplicationContext(), - CallList.getInstance(), - AudioModeProvider.getInstance()); - TelecommAdapter.getInstance().setContext(InCallServiceImpl.this); - } - - @Override - public void onPhoneDestroyed(Phone phone) { - Log.v(this, "onPhoneDestroyed"); - // Tear down the InCall system - CallList.getInstance().clearPhone(); - AudioModeProvider.getInstance().clearPhone(); - TelecommAdapter.getInstance().clearPhone(); - TelecommAdapter.getInstance().setContext(null); - CallList.getInstance().clearOnDisconnect(); - InCallPresenter.getInstance().tearDown(); - } - }; + @Override + public void onPhoneCreated(Phone phone) { + Log.v(this, "onPhoneCreated"); + CallList.getInstance().setPhone(phone); + AudioModeProvider.getInstance().setPhone(phone); + TelecommAdapter.getInstance().setPhone(phone); + InCallPresenter.getInstance().setPhone(phone); + InCallPresenter.getInstance().setUp( + getApplicationContext(), + CallList.getInstance(), + AudioModeProvider.getInstance()); + TelecommAdapter.getInstance().setContext(InCallServiceImpl.this); + } @Override - public IBinder onBind(Intent intent) { - return mInCallServiceInstance.getBinder(); + public void onPhoneDestroyed(Phone phone) { + Log.v(this, "onPhoneDestroyed"); + // Tear down the InCall system + CallList.getInstance().clearPhone(); + AudioModeProvider.getInstance().clearPhone(); + TelecommAdapter.getInstance().clearPhone(); + TelecommAdapter.getInstance().setContext(null); + CallList.getInstance().clearOnDisconnect(); + InCallPresenter.getInstance().tearDown(); } } |