summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2014-07-19 13:21:49 -0700
committerSantos Cordon <santoscordon@google.com>2014-07-19 13:21:49 -0700
commit28d90d7b5800f19194bade2a29cf1134e5a17f41 (patch)
treed634859106f0cd732b8742ebd261f9917e2de011 /InCallUI
parent64e7a8b15cb66e75600497386b1754c7bc6f70b0 (diff)
InCallService to inherit directly from Service. (2/2)
Bug: 16416927 Change-Id: I31584556c79e49132c628a0f8f25c372eb4e9b3c
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/InCallServiceImpl.java53
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();
}
}