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
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java
index 02335b6..0f0e9d9 100644
--- a/java/com/android/incallui/InCallActivity.java
+++ b/java/com/android/incallui/InCallActivity.java
@@ -83,8 +83,8 @@
import com.android.incallui.audiomode.AudioModeProvider;
import com.android.incallui.call.CallList;
import com.android.incallui.call.DialerCall;
-import com.android.incallui.call.DialerCall.State;
import com.android.incallui.call.TelecomAdapter;
+import com.android.incallui.call.state.DialerCallState;
import com.android.incallui.callpending.CallPendingActivity;
import com.android.incallui.disconnectdialog.DisconnectMessage;
import com.android.incallui.incall.bindings.InCallBindings;
@@ -348,7 +348,7 @@
// If there's only one line in use, AND it's on hold, then we're sure the user
// wants to use the dialpad toward the exact line, so un-hold the holding line.
DialerCall call = CallList.getInstance().getActiveOrBackgroundCall();
- if (call != null && call.getState() == State.ONHOLD) {
+ if (call != null && call.getState() == DialerCallState.ONHOLD) {
call.unhold();
}
}
@@ -1449,7 +1449,7 @@
if (call == null) {
call = CallList.getInstance().getBackgroundCall();
}
- if (didShowAnswerScreen && (call == null || call.getState() == State.DISCONNECTED)) {
+ if (didShowAnswerScreen && (call == null || call.getState() == DialerCallState.DISCONNECTED)) {
LogUtil.i("InCallActivity.getShouldShowAnswerUi", "found disconnecting incoming call");
return new ShouldShowUiResult(true, call);
}