From c97a895e19d09707f54533f8985542caf2b0a17b Mon Sep 17 00:00:00 2001 From: twyen Date: Tue, 15 May 2018 11:01:52 -0700 Subject: Use new instances of PreCallAction on activity resume Previously the same action instance is used every time the PreCallActivity is resumed. This causes some state to be retain, for example the isDiscarding state on CallingAccountSelector prevents canceling the next dialog to abort the call. Actions should not retain state between activity life cycles. TEST=TAP Bug: 79692264 Test: TAP PiperOrigin-RevId: 196696224 Change-Id: Ifa604f431563dd1fb123a42e2a64b34c001e897d --- java/com/android/dialer/precall/PreCallAction.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'java/com/android/dialer/precall/PreCallAction.java') diff --git a/java/com/android/dialer/precall/PreCallAction.java b/java/com/android/dialer/precall/PreCallAction.java index 9ddc6f205..298af08ee 100644 --- a/java/com/android/dialer/precall/PreCallAction.java +++ b/java/com/android/dialer/precall/PreCallAction.java @@ -25,6 +25,9 @@ import com.android.dialer.callintent.CallIntentBuilder; * CallIntentBuilder} to generate full information for the call. For example, showing a dialog to * select the phone account on a multi-SIM device, ask if RTT should be enabled, or rewrite the * number for roaming calls. + * + *

UI actions are discarded when the hosting activity is paused. A new instance of the action + * will be created once the activity is resumed again. */ public interface PreCallAction { -- cgit v1.2.3