diff options
Diffstat (limited to 'java')
3 files changed, 13 insertions, 7 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java index d0ba31f40..213fde8cd 100644 --- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java +++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java @@ -35,6 +35,8 @@ import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; +import android.telecom.TelecomManager; +import android.telecom.VideoProfile; import android.telephony.PhoneNumberUtils; import android.text.BidiFormatter; import android.text.TextDirectionHeuristics; @@ -894,12 +896,20 @@ public final class CallLogListItemViewHolder extends RecyclerView.ViewHolder // intents need to be started using startActivityForResult instead of the usual startActivity String packageName = intent.getPackage(); if (packageName != null && packageName.equals(getLightbringer().getPackageName())) { + Logger.get(mContext) + .logImpression(DialerImpression.Type.LIGHTBRINGER_VIDEO_REQUESTED_FROM_CALL_LOG); startLightbringerActivity(intent); } else if (CallDetailsActivity.isLaunchIntent(intent)) { PerformanceReport.recordClick(UiAction.Type.OPEN_CALL_DETAIL); ((Activity) mContext) .startActivityForResult(intent, DialtactsActivity.ACTIVITY_REQUEST_CODE_CALL_DETAILS); } else { + if (Intent.ACTION_CALL.equals(intent.getAction()) + && intent.getIntExtra(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE, -1) + == VideoProfile.STATE_BIDIRECTIONAL) { + Logger.get(mContext) + .logImpression(DialerImpression.Type.IMS_VIDEO_REQUESTED_FROM_CALL_LOG); + } DialerUtils.startActivityWithErrorToast(mContext, intent); } } diff --git a/java/com/android/dialer/app/calllog/IntentProvider.java b/java/com/android/dialer/app/calllog/IntentProvider.java index e1ec9f509..55fdbbace 100644 --- a/java/com/android/dialer/app/calllog/IntentProvider.java +++ b/java/com/android/dialer/app/calllog/IntentProvider.java @@ -30,8 +30,6 @@ import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; import com.android.dialer.dialercontact.DialerContact; import com.android.dialer.lightbringer.LightbringerComponent; -import com.android.dialer.logging.DialerImpression; -import com.android.dialer.logging.Logger; import com.android.dialer.util.CallUtil; import com.android.dialer.util.IntentUtil; import java.util.ArrayList; @@ -70,7 +68,6 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - Logger.get(context).logImpression(DialerImpression.Type.IMS_VIDEO_REQUESTED_FROM_CALL_LOG); return new CallIntentBuilder(number, CallInitiationType.Type.CALL_LOG) .setPhoneAccountHandle(accountHandle) .setIsVideoCall(true) @@ -83,8 +80,6 @@ public abstract class IntentProvider { return new IntentProvider() { @Override public Intent getIntent(Context context) { - Logger.get(context) - .logImpression(DialerImpression.Type.LIGHTBRINGER_VIDEO_REQUESTED_FROM_CALL_LOG); return LightbringerComponent.get(context).getLightbringer().getIntent(context, number); } }; diff --git a/java/com/android/dialer/logging/dialer_impression.proto b/java/com/android/dialer/logging/dialer_impression.proto index bc35900af..19beca35c 100644 --- a/java/com/android/dialer/logging/dialer_impression.proto +++ b/java/com/android/dialer/logging/dialer_impression.proto @@ -423,9 +423,10 @@ message DialerImpression { BUBBLE_END_CALL = 1195; LIGHTBRINGER_VIDEO_REQUESTED_FROM_SEARCH = 1196; - LIGHTBRINGER_VIDEO_REQUESTED_FROM_CALL_LOG = 1197; + LIGHTBRINGER_VIDEO_REQUESTED_FROM_CALL_LOG = + 1197; // Including call history IMS_VIDEO_REQUESTED_FROM_SEARCH = 1198; - IMS_VIDEO_REQUESTED_FROM_CALL_LOG = 1199; + IMS_VIDEO_REQUESTED_FROM_CALL_LOG = 1199; // Including call history // Multi select impressions MULTISELECT_LONG_PRESS_ENTER_MULTI_SELECT_MODE = 1200; |