Remove one time sending of handover from wifi to LTE connection event.
We will always send the event and let dialer filter it out.
Bug: 30837560
Change-Id: I3c40d8ee236bd5c27a8891f5c7b25a8fef0d4feb
diff --git a/src/java/com/android/internal/telephony/TelephonyTester.java b/src/java/com/android/internal/telephony/TelephonyTester.java
index 619af7e..ba59e6d 100644
--- a/src/java/com/android/internal/telephony/TelephonyTester.java
+++ b/src/java/com/android/internal/telephony/TelephonyTester.java
@@ -82,13 +82,6 @@
private static final String ACTION_TEST_HANDOVER_FAIL =
"com.android.internal.telephony.TestHandoverFail";
- /**
- * Test-only intent used to reset the shared preference associated with
- * {@link android.telephony.CarrierConfigManager#KEY_NOTIFY_VT_HANDOVER_TO_WIFI_FAILURE_BOOL}.
- */
- private static final String ACTION_RESET_HANDOVER_NOTICE =
- "com.android.internal.telephony.ResetHandoverNotice";
-
private static List<ImsExternalCallState> mImsExternalCallStates = null;
private Phone mPhone;
@@ -115,10 +108,6 @@
} else if (action.equals(ACTION_TEST_HANDOVER_FAIL)) {
log("handle handover fail test intent");
handleHandoverFailedIntent();
- } else if (action.equals(ACTION_RESET_HANDOVER_NOTICE)) {
- SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
- sp.edit().putBoolean(ImsPhoneCallTracker.NOTIFIED_HANDOVER_TO_LTE_KEY, false)
- .commit();
} else {
if (DBG) log("onReceive: unknown action=" + action);
}
@@ -142,7 +131,6 @@
filter.addAction(ACTION_TEST_CONFERENCE_EVENT_PACKAGE);
filter.addAction(ACTION_TEST_DIALOG_EVENT_PACKAGE);
filter.addAction(ACTION_TEST_HANDOVER_FAIL);
- filter.addAction(ACTION_RESET_HANDOVER_NOTICE);
mImsExternalCallStates = new ArrayList<ImsExternalCallState>();
}
diff --git a/src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java b/src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java
index 237e8c9..74a2b0a 100644
--- a/src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java
+++ b/src/java/com/android/internal/telephony/imsphone/ImsPhoneCallTracker.java
@@ -1885,20 +1885,13 @@
srcAccessTech == ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN &&
targetAccessTech != ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN;
if (mNotifyHandoverVideoFromWifiToLTE && isHandoverFromWifi && imsCall.isVideoCall()) {
- if (!hasNotifiedHandoverVideoFromWifiToLTE() ) {
- log("onCallHandover :: notifying of WIFI to LTE handover.");
- ImsPhoneConnection conn = findConnection(imsCall);
- if (conn != null) {
- conn.onConnectionEvent(
- TelephonyManager.EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE,
- null);
- setNotifiedHandoverVideoFromWifiToLTE(true);
- } else {
- loge("onCallHandover :: failed to notify of handover; connection is null.");
- }
-
+ log("onCallHandover :: notifying of WIFI to LTE handover.");
+ ImsPhoneConnection conn = findConnection(imsCall);
+ if (conn != null) {
+ conn.onConnectionEvent(
+ TelephonyManager.EVENT_HANDOVER_VIDEO_FROM_WIFI_TO_LTE, null);
} else {
- log("onCallHandover :: already notified of WIFI to LTE handover.");
+ loge("onCallHandover :: failed to notify of handover; connection is null.");
}
}
@@ -2744,24 +2737,4 @@
public boolean isCarrierDowngradeOfVtCallSupported() {
return mSupportDowngradeVtToAudio;
}
-
- /**
- * @return {@code true} if the user has been previously notified of a video call which has been
- * handed over from WIFI to LTE, {@code false} otherwise.
- */
- private boolean hasNotifiedHandoverVideoFromWifiToLTE() {
- SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mPhone.getContext());
- return sp.getBoolean(NOTIFIED_HANDOVER_TO_LTE_KEY, false);
- }
-
- /**
- * Sets whether the user has been notified of the fact a video call has been handed over from
- * WIFI to LTE. Saved to shared preferences.
- *
- * @param notified {@code true} if the user has been notified, {@code false} otherwise.
- */
- private void setNotifiedHandoverVideoFromWifiToLTE(boolean notified) {
- SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(mPhone.getContext());
- sp.edit().putBoolean(NOTIFIED_HANDOVER_TO_LTE_KEY, notified).commit();
- }
}