diff options
author | wangqi <wangqi@google.com> | 2018-04-27 14:34:04 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-28 22:26:58 -0700 |
commit | bb94ca670290484b4f6a801735870f21328d49c2 (patch) | |
tree | ba4c2acbe70a19343121866c0fc26c50a3c9faf0 /java/com/android/incallui/contactgrid/TopRow.java | |
parent | b493c3f93c3560cca8cb91525f043538d3721cd2 (diff) |
Move DialerCall.State to an independent package.
This refactoring will remove dependency on incall/call package for those classes only dependent on DialerCall.State.
The benefit is to remove unnecessary dependency and avoid potential loop dependency in the future.
Test: presubmit
PiperOrigin-RevId: 194594382
Change-Id: I6b3241bcf10a0a15c495c3c90a13f174c32e3f72
Diffstat (limited to 'java/com/android/incallui/contactgrid/TopRow.java')
-rw-r--r-- | java/com/android/incallui/contactgrid/TopRow.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/java/com/android/incallui/contactgrid/TopRow.java b/java/com/android/incallui/contactgrid/TopRow.java index 89300caa8..82a103a61 100644 --- a/java/com/android/incallui/contactgrid/TopRow.java +++ b/java/com/android/incallui/contactgrid/TopRow.java @@ -25,7 +25,7 @@ import android.text.TextDirectionHeuristics; import android.text.TextUtils; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; -import com.android.incallui.call.DialerCall.State; +import com.android.incallui.call.state.DialerCallState; import com.android.incallui.incall.protocol.PrimaryCallState; import com.android.incallui.incall.protocol.PrimaryInfo; import com.android.incallui.videotech.utils.SessionModificationState; @@ -69,7 +69,8 @@ public class TopRow { icon = context.getDrawable(R.drawable.quantum_ic_network_wifi_vd_theme_24); } - if (state.state() == State.INCOMING || state.state() == State.CALL_WAITING) { + if (state.state() == DialerCallState.INCOMING + || state.state() == DialerCallState.CALL_WAITING) { // Call from // [Wi-Fi icon] Video call from // Hey Jake, pick up! @@ -87,18 +88,20 @@ public class TopRow { } else if (VideoUtils.hasSentVideoUpgradeRequest(state.sessionModificationState()) || VideoUtils.hasReceivedVideoUpgradeRequest(state.sessionModificationState())) { label = getLabelForVideoRequest(context, state); - } else if (state.state() == State.PULLING) { + } else if (state.state() == DialerCallState.PULLING) { label = context.getString(R.string.incall_transferring); - } else if (state.state() == State.DIALING || state.state() == State.CONNECTING) { + } else if (state.state() == DialerCallState.DIALING + || state.state() == DialerCallState.CONNECTING) { // [Wi-Fi icon] Calling via Google Guest // Calling... label = getLabelForDialing(context, state); - } else if (state.state() == State.ACTIVE && state.isRemotelyHeld()) { + } else if (state.state() == DialerCallState.ACTIVE && state.isRemotelyHeld()) { label = context.getString(R.string.incall_remotely_held); - } else if (state.state() == State.ACTIVE + } else if (state.state() == DialerCallState.ACTIVE && shouldShowNumber(primaryInfo, false /* isIncoming */)) { label = spanDisplayNumber(primaryInfo.number()); - } else if (state.state() == State.CALL_PENDING && !TextUtils.isEmpty(state.customLabel())) { + } else if (state.state() == DialerCallState.CALL_PENDING + && !TextUtils.isEmpty(state.customLabel())) { label = state.customLabel(); } else { // Video calling... |