diff options
author | Santos Cordon <santoscordon@google.com> | 2014-07-19 21:18:15 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-07-19 21:18:15 +0000 |
commit | 49e1eba990e35340d415d2539283e97be285caca (patch) | |
tree | f3f561267dac46a6b256736104ccd6aac4e1cb9a /InCallUI | |
parent | 1ba2fdb75f1cc19c6e5affae8efd6c0fb9c58ba2 (diff) | |
parent | 28d90d7b5800f19194bade2a29cf1134e5a17f41 (diff) |
am 4bd6a95a: InCallService to inherit directly from Service. (2/2)
* commit '4bd6a95aabbf389a6399feb0c16d18ed98382a27':
InCallService to inherit directly from Service. (2/2)
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(); } } |