diff options
author | Sailesh Nepal <sail@google.com> | 2014-04-01 11:48:07 -0700 |
---|---|---|
committer | Sailesh Nepal <sail@google.com> | 2014-04-01 13:58:52 -0700 |
commit | 248a6687e8075e9730217be73c54ee4f95501a0e (patch) | |
tree | 4f8ec9114772499c8431c10613212ae1e53c5128 /InCallUI/src/com/android/incallui/InCallActivity.java | |
parent | d11c7a03578697637f97e26758ac5bd96c85e967 (diff) |
InCallUI - Use custom object to track Calls
This is the first step in completely moving away from Telephony.
This CL creates a custom Call object. Currently this is just a
copy of the telephony Call object. I'll update various fields
in individual CLs.
This CL also deletes the old Telephony services.
Bug: 13643568
Change-Id: Id1860a5df9706f2a7fddd40e70f0d693af7b04bd
Diffstat (limited to 'InCallUI/src/com/android/incallui/InCallActivity.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/InCallActivity.java | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java index f4af51280..1b351d545 100644 --- a/InCallUI/src/com/android/incallui/InCallActivity.java +++ b/InCallUI/src/com/android/incallui/InCallActivity.java @@ -16,9 +16,6 @@ package com.android.incallui; -import com.android.services.telephony.common.Call; -import com.android.services.telephony.common.Call.State; - import android.app.Activity; import android.app.AlertDialog; import android.app.FragmentTransaction; @@ -28,7 +25,6 @@ import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; -import android.telecomm.InCallAdapter; import android.telephony.DisconnectCause; import android.view.KeyEvent; import android.view.View; @@ -37,6 +33,8 @@ import android.view.WindowManager; import android.view.accessibility.AccessibilityEvent; import android.widget.Toast; +import com.android.incallui.Call.State; + /** * Phone app "in call" screen. */ @@ -269,8 +267,7 @@ public class InCallActivity extends Activity { case KeyEvent.KEYCODE_MUTE: // toggle mute - setMute(!AudioModeProvider.getInstance().getMute()); - CallCommandClient.getInstance().mute(!AudioModeProvider.getInstance().getMute()); + TelecommAdapter.getInstance().mute(!AudioModeProvider.getInstance().getMute()); return true; // Various testing/debugging features, enabled ONLY when VERBOSE == true. @@ -296,16 +293,6 @@ public class InCallActivity extends Activity { return super.onKeyDown(keyCode, event); } - private void setMute(boolean shouldMute) { - CallCommandClient.getInstance().mute(shouldMute); - - InCallAdapter telecommAdapter = InCallPresenter.getInstance().getTelecommAdapter(); - if (telecommAdapter != null) { - Log.i(this, "Setting mute"); - telecommAdapter.mute(shouldMute); - } - } - private boolean handleDialerKeyDown(int keyCode, KeyEvent event) { Log.v(this, "handleDialerKeyDown: keyCode " + keyCode + ", event " + event + "..."); @@ -367,7 +354,7 @@ public class InCallActivity extends Activity { // wants to use the dialpad toward the exact line, so un-hold the holding line. final Call call = CallList.getInstance().getActiveOrBackgroundCall(); if (call != null && call.getState() == State.ONHOLD) { - CallCommandClient.getInstance().hold(call.getCallId(), false); + TelecommAdapter.getInstance().unholdCall(call.getCallId()); } } } |