From 306324b84809a2b53beb55260eef071d2d33f6d0 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Fri, 11 Sep 2015 12:14:12 -0700 Subject: Remove EXTRA_CALL_ORIGIN from Dialer This is legacy code from the PhoneApp days and no longer does anything. The method signatures in IntentUtils were kept unchanged to reduce code churn since they will be modified in a later CL. Change-Id: I76bcdd9b1302eed701e3d1cb5027a937ab2234c4 --- src/com/android/dialer/DialtactsActivity.java | 20 +++----------------- src/com/android/dialer/dialpad/DialpadFragment.java | 4 +--- 2 files changed, 4 insertions(+), 20 deletions(-) (limited to 'src/com/android/dialer') diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 2589956bc..786acab1a 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -118,10 +118,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O public static final String SHARED_PREFS_NAME = "com.android.dialer_preferences"; - /** @see #getCallOrigin() */ - private static final String CALL_ORIGIN_DIALTACTS = - "com.android.dialer.DialtactsActivity"; - private static final String KEY_IN_REGULAR_SEARCH_UI = "in_regular_search_ui"; private static final String KEY_IN_DIALPAD_SEARCH_UI = "in_dialpad_search_ui"; private static final String KEY_SEARCH_QUERY = "search_query"; @@ -958,16 +954,6 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O return false; } - /** - * Returns an appropriate call origin for this Activity. May return null when no call origin - * should be used (e.g. when some 3rd party application launched the screen. Call origin is - * for remembering the tab in which the user made a phone call, so the external app's DIAL - * request should not be counted.) - */ - public String getCallOrigin() { - return !isDialIntent(getIntent()) ? CALL_ORIGIN_DIALTACTS : null; - } - /** * Shows the search fragment */ @@ -1260,7 +1246,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O // Specify call-origin so that users will see the previous tab instead of // CallLog screen (search UI will be automatically exited). PhoneNumberInteraction.startInteractionForPhoneCall( - DialtactsActivity.this, dataUri, getCallOrigin()); + DialtactsActivity.this, dataUri, null); mClearSearchOnPause = true; } @@ -1277,8 +1263,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O phoneNumber = ""; } Intent intent = isVideoCall ? - IntentUtil.getVideoCallIntent(phoneNumber, getCallOrigin()) : - IntentUtil.getCallIntent(phoneNumber, getCallOrigin()); + IntentUtil.getVideoCallIntent(phoneNumber, (String) null) : + IntentUtil.getCallIntent(phoneNumber, (String) null); DialerUtils.startActivityWithErrorToast(this, intent); mClearSearchOnPause = true; } diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 0bbf802a4..c35bdea3c 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -1140,9 +1140,7 @@ public class DialpadFragment extends Fragment // Clear the digits just in case. clearDialpad(); } else { - final Intent intent = IntentUtil.getCallIntent(number, - (getActivity() instanceof DialtactsActivity ? - ((DialtactsActivity) getActivity()).getCallOrigin() : null)); + final Intent intent = IntentUtil.getCallIntent(number, (String) null); DialerUtils.startActivityWithErrorToast(getActivity(), intent); hideAndClearDialpad(false); } -- cgit v1.2.3