diff options
Diffstat (limited to 'java/com/android/dialer/app')
4 files changed, 34 insertions, 22 deletions
diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java index 089ffd389..4c2634184 100644 --- a/java/com/android/dialer/app/DialtactsActivity.java +++ b/java/com/android/dialer/app/DialtactsActivity.java @@ -121,6 +121,7 @@ import com.android.dialer.p13n.logging.P13nLogger; import com.android.dialer.p13n.logging.P13nLogging; import com.android.dialer.performancereport.PerformanceReport; import com.android.dialer.postcall.PostCall; +import com.android.dialer.precall.PreCall; import com.android.dialer.proguard.UsedByReflection; import com.android.dialer.searchfragment.list.NewSearchFragment; import com.android.dialer.searchfragment.list.NewSearchFragment.SearchFragmentListener; @@ -1515,14 +1516,12 @@ public class DialtactsActivity extends TransactionSafeActivity // an error message. phoneNumber = ""; } - - Intent intent = + PreCall.start( + this, new CallIntentBuilder(phoneNumber, callSpecificAppData) .setIsVideoCall(isVideoCall) - .setAllowAssistedDial(callSpecificAppData.getAllowAssistedDialing()) - .build(); + .setAllowAssistedDial(callSpecificAppData.getAllowAssistedDialing())); - DialerUtils.startActivityWithErrorToast(this, intent); mClearSearchOnPause = true; } @@ -1555,6 +1554,7 @@ public class DialtactsActivity extends TransactionSafeActivity if (tabIndex != mPreviouslySelectedTabIndex) { mFloatingActionButtonController.scaleIn(); } + LogUtil.i("DialtactsActivity.onPageSelected", "tabIndex: %d", tabIndex); mPreviouslySelectedTabIndex = tabIndex; timeTabSelected = SystemClock.elapsedRealtime(); } @@ -1676,6 +1676,10 @@ public class DialtactsActivity extends TransactionSafeActivity exitSearchUi(); } + protected int getPreviouslySelectedTabIndex() { + return mPreviouslySelectedTabIndex; + } + /** Popup menu accessible from the search bar */ protected class OptionsPopupMenu extends PopupMenu { diff --git a/java/com/android/dialer/app/calllog/IntentProvider.java b/java/com/android/dialer/app/calllog/IntentProvider.java index 5180651da..0835d894c 100644 --- a/java/com/android/dialer/app/calllog/IntentProvider.java +++ b/java/com/android/dialer/app/calllog/IntentProvider.java @@ -32,6 +32,7 @@ import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.dialercontact.DialerContact; import com.android.dialer.duo.DuoComponent; +import com.android.dialer.precall.PreCall; import com.android.dialer.util.IntentUtil; import java.util.ArrayList; @@ -53,9 +54,10 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) - .setPhoneAccountHandle(accountHandle) - .build(); + return PreCall.getIntent( + context, + new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) + .setPhoneAccountHandle(accountHandle)); } }; } @@ -65,9 +67,10 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) - .setAllowAssistedDial(true) - .build(); + return PreCall.getIntent( + context, + new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) + .setAllowAssistedDial(true)); } }; } @@ -81,10 +84,11 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) - .setPhoneAccountHandle(accountHandle) - .setIsVideoCall(true) - .build(); + return PreCall.getIntent( + context, + new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) + .setPhoneAccountHandle(accountHandle) + .setIsVideoCall(true)); } }; } @@ -103,8 +107,9 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - return CallIntentBuilder.forVoicemail(phoneAccountHandle, CallInitiationType.Type.CALL_LOG) - .build(); + return PreCall.getIntent( + context, + CallIntentBuilder.forVoicemail(phoneAccountHandle, CallInitiationType.Type.CALL_LOG)); } }; } diff --git a/java/com/android/dialer/app/calllog/MissedCallNotifier.java b/java/com/android/dialer/app/calllog/MissedCallNotifier.java index 8e09cf8df..dd92bb4e2 100644 --- a/java/com/android/dialer/app/calllog/MissedCallNotifier.java +++ b/java/com/android/dialer/app/calllog/MissedCallNotifier.java @@ -60,6 +60,7 @@ import com.android.dialer.notification.NotificationChannelId; import com.android.dialer.notification.NotificationManagerUtils; import com.android.dialer.phonenumbercache.ContactInfo; import com.android.dialer.phonenumberutil.PhoneNumberHelper; +import com.android.dialer.precall.PreCall; import com.android.dialer.util.DialerUtils; import com.android.dialer.util.IntentUtil; import java.util.Iterator; @@ -438,8 +439,9 @@ public class MissedCallNotifier implements Worker<Pair<Integer, String>, Void> { cancelSingleMissedCallNotification(context, callUri); DialerUtils.startActivityWithErrorToast( context, - new CallIntentBuilder(number, CallInitiationType.Type.MISSED_CALL_NOTIFICATION) - .build() + PreCall.getIntent( + context, + new CallIntentBuilder(number, CallInitiationType.Type.MISSED_CALL_NOTIFICATION)) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); } diff --git a/java/com/android/dialer/app/voicemail/error/VoicemailErrorMessage.java b/java/com/android/dialer/app/voicemail/error/VoicemailErrorMessage.java index 7cc6cda45..be7dccda8 100644 --- a/java/com/android/dialer/app/voicemail/error/VoicemailErrorMessage.java +++ b/java/com/android/dialer/app/voicemail/error/VoicemailErrorMessage.java @@ -31,6 +31,7 @@ import com.android.dialer.common.Assert; import com.android.dialer.common.PerAccountSharedPreferences; import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; +import com.android.dialer.precall.PreCall; import com.android.dialer.voicemail.settings.VoicemailChangePinActivity; import com.android.voicemail.VoicemailClient; import com.android.voicemail.VoicemailComponent; @@ -165,10 +166,10 @@ public class VoicemailErrorMessage { @Override public void onClick(View v) { Logger.get(context).logImpression(DialerImpression.Type.VVM_CALL_VOICEMAIL_CLICKED); - context.startActivity( + PreCall.start( + context, CallIntentBuilder.forVoicemail( - phoneAccountHandle, CallInitiationType.Type.VOICEMAIL_ERROR_MESSAGE) - .build()); + phoneAccountHandle, CallInitiationType.Type.VOICEMAIL_ERROR_MESSAGE)); } }); } |