Loading src/com/android/dialer/DialtactsActivity.java +4 −5 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import android.content.res.Resources; import android.net.Uri; import android.os.Bundle; import android.os.RemoteException; import android.phone.PhoneManager; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Intents; import android.speech.RecognizerIntent; Loading Loading @@ -789,7 +788,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O final boolean callKey = Intent.ACTION_CALL_BUTTON.equals(intent.getAction()); if (callKey) { getPhoneManager().showCallScreen(false); getTelecommManager().showInCallScreen(false); return true; } Loading Loading @@ -1015,7 +1014,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O } private boolean phoneIsInUse() { return getPhoneManager().isInAPhoneCall(); return getTelecommManager().isInCall(); } public static Intent getAddNumberToContactIntent(CharSequence text) { Loading Loading @@ -1147,8 +1146,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O return (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); } private PhoneManager getPhoneManager() { return (PhoneManager) getSystemService(Context.PHONE_SERVICE); private TelecommManager getTelecommManager() { return (TelecommManager) getSystemService(Context.TELECOMM_SERVICE); } @Override Loading src/com/android/dialer/SpecialCharSequenceMgr.java +4 −4 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Looper; import android.phone.PhoneManager; import android.provider.Settings; import android.telecomm.TelecommManager; import android.telephony.PhoneNumberUtils; import android.telephony.TelephonyManager; import android.util.Log; Loading Loading @@ -225,9 +225,9 @@ public class SpecialCharSequenceMgr { static boolean handlePinEntry(Context context, String input) { if ((input.startsWith("**04") || input.startsWith("**05")) && input.endsWith("#")) { PhoneManager phoneManager = (PhoneManager) context.getSystemService(Context.PHONE_SERVICE); return phoneManager.handlePinMmi(input); TelecommManager telecommManager = (TelecommManager) context.getSystemService(Context.TELECOMM_SERVICE); return telecommManager.handleMmi(input); } return false; } Loading src/com/android/dialer/calllog/CallLogNotificationsHelper.java +4 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.dialer.calllog; import android.content.Context; import android.content.Intent; import android.phone.PhoneManager; import android.telecomm.TelecommManager; /** * Helper class operating on call log notifications. Loading @@ -26,8 +26,9 @@ import android.phone.PhoneManager; public class CallLogNotificationsHelper { /** Removes the missed call notifications. */ public static void removeMissedCallNotifications(Context context) { PhoneManager phoneManager = (PhoneManager) context.getSystemService(Context.PHONE_SERVICE); phoneManager.cancelMissedCallsNotification(); TelecommManager telecommManager = (TelecommManager) context.getSystemService(Context.TELECOMM_SERVICE); telecommManager.cancelMissedCallsNotification(); } /** Update the voice mail notifications. */ Loading src/com/android/dialer/dialpad/DialpadFragment.java +6 −6 Original line number Diff line number Diff line Loading @@ -33,11 +33,11 @@ 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.TelecommManager; import android.telephony.PhoneNumberUtils; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; Loading Loading @@ -213,7 +213,7 @@ public class DialpadFragment extends AnalyticsFragment * 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/PhoneManager call in the future. * temporary measure. To be replaced with an Telephony/TelecommManager 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. */ Loading Loading @@ -273,8 +273,8 @@ public class DialpadFragment extends AnalyticsFragment return (TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE); } private PhoneManager getPhoneManager() { return (PhoneManager) getActivity().getSystemService(Context.PHONE_SERVICE); private TelecommManager getTelecommManager() { return (TelecommManager) getActivity().getSystemService(Context.TELECOMM_SERVICE); } @Override Loading Loading @@ -1384,7 +1384,7 @@ public class DialpadFragment extends AnalyticsFragment * or "return to call" from the dialpad chooser. */ private void returnToInCallScreen(boolean showDialpad) { getPhoneManager().showCallScreen(showDialpad); getTelecommManager().showInCallScreen(showDialpad); // Finally, finish() ourselves so that we don't stay on the // activity stack. Loading @@ -1402,7 +1402,7 @@ public class DialpadFragment extends AnalyticsFragment * is active (ie. off hook or ringing or dialing, or on hold). */ public boolean isPhoneInUse() { return getPhoneManager().isInAPhoneCall(); return getTelecommManager().isInCall(); } /** Loading Loading
src/com/android/dialer/DialtactsActivity.java +4 −5 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ import android.content.res.Resources; import android.net.Uri; import android.os.Bundle; import android.os.RemoteException; import android.phone.PhoneManager; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.Intents; import android.speech.RecognizerIntent; Loading Loading @@ -789,7 +788,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O final boolean callKey = Intent.ACTION_CALL_BUTTON.equals(intent.getAction()); if (callKey) { getPhoneManager().showCallScreen(false); getTelecommManager().showInCallScreen(false); return true; } Loading Loading @@ -1015,7 +1014,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O } private boolean phoneIsInUse() { return getPhoneManager().isInAPhoneCall(); return getTelecommManager().isInCall(); } public static Intent getAddNumberToContactIntent(CharSequence text) { Loading Loading @@ -1147,8 +1146,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O return (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); } private PhoneManager getPhoneManager() { return (PhoneManager) getSystemService(Context.PHONE_SERVICE); private TelecommManager getTelecommManager() { return (TelecommManager) getSystemService(Context.TELECOMM_SERVICE); } @Override Loading
src/com/android/dialer/SpecialCharSequenceMgr.java +4 −4 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Looper; import android.phone.PhoneManager; import android.provider.Settings; import android.telecomm.TelecommManager; import android.telephony.PhoneNumberUtils; import android.telephony.TelephonyManager; import android.util.Log; Loading Loading @@ -225,9 +225,9 @@ public class SpecialCharSequenceMgr { static boolean handlePinEntry(Context context, String input) { if ((input.startsWith("**04") || input.startsWith("**05")) && input.endsWith("#")) { PhoneManager phoneManager = (PhoneManager) context.getSystemService(Context.PHONE_SERVICE); return phoneManager.handlePinMmi(input); TelecommManager telecommManager = (TelecommManager) context.getSystemService(Context.TELECOMM_SERVICE); return telecommManager.handleMmi(input); } return false; } Loading
src/com/android/dialer/calllog/CallLogNotificationsHelper.java +4 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.dialer.calllog; import android.content.Context; import android.content.Intent; import android.phone.PhoneManager; import android.telecomm.TelecommManager; /** * Helper class operating on call log notifications. Loading @@ -26,8 +26,9 @@ import android.phone.PhoneManager; public class CallLogNotificationsHelper { /** Removes the missed call notifications. */ public static void removeMissedCallNotifications(Context context) { PhoneManager phoneManager = (PhoneManager) context.getSystemService(Context.PHONE_SERVICE); phoneManager.cancelMissedCallsNotification(); TelecommManager telecommManager = (TelecommManager) context.getSystemService(Context.TELECOMM_SERVICE); telecommManager.cancelMissedCallsNotification(); } /** Update the voice mail notifications. */ Loading
src/com/android/dialer/dialpad/DialpadFragment.java +6 −6 Original line number Diff line number Diff line Loading @@ -33,11 +33,11 @@ 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.TelecommManager; import android.telephony.PhoneNumberUtils; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; Loading Loading @@ -213,7 +213,7 @@ public class DialpadFragment extends AnalyticsFragment * 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/PhoneManager call in the future. * temporary measure. To be replaced with an Telephony/TelecommManager 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. */ Loading Loading @@ -273,8 +273,8 @@ public class DialpadFragment extends AnalyticsFragment return (TelephonyManager) getActivity().getSystemService(Context.TELEPHONY_SERVICE); } private PhoneManager getPhoneManager() { return (PhoneManager) getActivity().getSystemService(Context.PHONE_SERVICE); private TelecommManager getTelecommManager() { return (TelecommManager) getActivity().getSystemService(Context.TELECOMM_SERVICE); } @Override Loading Loading @@ -1384,7 +1384,7 @@ public class DialpadFragment extends AnalyticsFragment * or "return to call" from the dialpad chooser. */ private void returnToInCallScreen(boolean showDialpad) { getPhoneManager().showCallScreen(showDialpad); getTelecommManager().showInCallScreen(showDialpad); // Finally, finish() ourselves so that we don't stay on the // activity stack. Loading @@ -1402,7 +1402,7 @@ public class DialpadFragment extends AnalyticsFragment * is active (ie. off hook or ringing or dialing, or on hold). */ public boolean isPhoneInUse() { return getPhoneManager().isInAPhoneCall(); return getTelecommManager().isInCall(); } /** Loading