diff options
author | Santos Cordon <santoscordon@google.com> | 2014-07-07 15:15:29 -0700 |
---|---|---|
committer | Santos Cordon <santoscordon@google.com> | 2014-07-08 18:36:32 -0700 |
commit | d15629deb20dd45572ee27fb2890e9a5a2a86ca3 (patch) | |
tree | 5f491552c979b7d07dc46661d8515a65c631fc2e /src/com/android/dialer/dialpad/DialpadFragment.java | |
parent | 2adba884432bc5f1b78079d74b4bf2cb2f1ff20f (diff) |
Update showCallScreen & isInAPhoneCall to use PhoneManager.
Change-Id: Ibe6900a0560611346d4ec8e109349b0c82c8a463
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index f9139c7b7..0c1450a8c 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -34,12 +34,12 @@ import android.media.AudioManager; import android.media.ToneGenerator; import android.net.Uri; import android.os.Bundle; +import android.phone.PhoneManager; import android.provider.Contacts.People; import android.provider.Contacts.Phones; import android.provider.Contacts.PhonesColumns; import android.provider.Settings; import android.telecomm.PhoneAccount; -import android.telecomm.TelecommManager; import android.telephony.PhoneNumberUtils; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; @@ -68,12 +68,13 @@ import android.widget.TextView; import com.android.contacts.common.CallUtil; import com.android.contacts.common.GeoUtil; + import com.android.contacts.common.PhoneAccountManager; import com.android.contacts.common.dialog.SelectAccountDialogFragment; import com.android.contacts.common.util.PhoneNumberFormatter; import com.android.contacts.common.util.StopWatch; -import com.android.dialer.NeededForReflection; import com.android.dialer.DialtactsActivity; +import com.android.dialer.NeededForReflection; import com.android.dialer.R; import com.android.dialer.SpecialCharSequenceMgr; import com.android.dialer.util.DialerUtils; @@ -215,7 +216,7 @@ public class DialpadFragment extends Fragment * press/depress of the "hookswitch" of a landline phone. Aka "empty flash". * * TODO: Using an intent extra to tell the phone to send this flash is a - * temporary measure. To be replaced with an Telephony/TelecommManager call in the future. + * temporary measure. To be replaced with an Telephony/PhoneManager call in the future. * TODO: Keep in sync with the string defined in OutgoingCallBroadcaster.java * in Phone app until this is replaced with the Telephony/Telecomm API. */ @@ -275,8 +276,8 @@ public class DialpadFragment extends Fragment return (TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE); } - private TelecommManager getTelecommManager() { - return (TelecommManager) getActivity().getSystemService(Context.TELECOMM_SERVICE); + private PhoneManager getPhoneManager() { + return (PhoneManager) getActivity().getSystemService(Context.PHONE_SERVICE); } @Override @@ -1389,7 +1390,7 @@ public class DialpadFragment extends Fragment * or "return to call" from the dialpad chooser. */ private void returnToInCallScreen(boolean showDialpad) { - getTelephonyManager().showCallScreenWithDialpad(showDialpad); + getPhoneManager().showCallScreen(showDialpad); // Finally, finish() ourselves so that we don't stay on the // activity stack. @@ -1407,7 +1408,7 @@ public class DialpadFragment extends Fragment * is active (ie. off hook or ringing or dialing, or on hold). */ public boolean isPhoneInUse() { - return getTelecommManager().isInAPhoneCall(); + return getPhoneManager().isInAPhoneCall(); } /** |