summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'InCallUI/src/com/android')
-rw-r--r--InCallUI/src/com/android/incallui/Call.java7
-rw-r--r--InCallUI/src/com/android/incallui/VideoCallFragment.java52
-rw-r--r--InCallUI/src/com/android/incallui/VideoCallPresenter.java22
3 files changed, 1 insertions, 80 deletions
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java
index d637c8a60..e26c04794 100644
--- a/InCallUI/src/com/android/incallui/Call.java
+++ b/InCallUI/src/com/android/incallui/Call.java
@@ -466,10 +466,6 @@ public class Call {
return mTelecommCall.getDetails().getVideoState();
}
- public int getCallSubstate() {
- return mTelecommCall.getDetails().getCallSubstate();
- }
-
public boolean isVideoCall(Context context) {
return CallUtil.isVideoEnabled(context) &&
VideoProfile.VideoState.isVideo(getVideoState());
@@ -553,7 +549,7 @@ public class Call {
}
return String.format(Locale.US, "[%s, %s, %s, children:%s, parent:%s, conferenceable:%s, " +
- "videoState:%d, callSubState:%d, mSessionModificationState:%d, VideoSettings:%s]",
+ "videoState:%d, mSessionModificationState:%d, VideoSettings:%s]",
mId,
State.toString(getState()),
android.telecom.Call.Details
@@ -562,7 +558,6 @@ public class Call {
getParentId(),
this.mTelecommCall.getConferenceableCalls(),
mTelecommCall.getDetails().getVideoState(),
- mTelecommCall.getDetails().getCallSubstate(),
mSessionModificationState,
getVideoSettings());
}
diff --git a/InCallUI/src/com/android/incallui/VideoCallFragment.java b/InCallUI/src/com/android/incallui/VideoCallFragment.java
index fb29c9ce6..6077017f5 100644
--- a/InCallUI/src/com/android/incallui/VideoCallFragment.java
+++ b/InCallUI/src/com/android/incallui/VideoCallFragment.java
@@ -595,58 +595,6 @@ public class VideoCallFragment extends BaseFragment<VideoCallPresenter,
}
/**
- * Displays a message on the UI that the call substate has changed.
- *
- */
- @Override
- public void showCallSubstateChanged(int callSubstate) {
- Log.d(this, "showCallSubstateChanged - call substate changed to " + callSubstate);
-
- final Context context = getActivity();
- if (context == null) {
- Log.e(this, "showCallSubstateChanged - Activity is null. Return");
- return;
- }
-
- final Resources resources = context.getResources();
-
- String callSubstateChangedText = "";
-
- if (isEnabled(Connection.SUBSTATE_AUDIO_CONNECTED_SUSPENDED, callSubstate)) {
- callSubstateChangedText +=
- resources.getString(R.string.call_substate_connected_suspended_audio);
- }
-
- if (isEnabled(Connection.SUBSTATE_VIDEO_CONNECTED_SUSPENDED, callSubstate)) {
- callSubstateChangedText +=
- resources.getString(R.string.call_substate_connected_suspended_video);
- }
-
- if (isEnabled(Connection.SUBSTATE_AVP_RETRY, callSubstate)) {
- callSubstateChangedText +=
- resources.getString(R.string.call_substate_avp_retry);
- }
-
- if (isNotEnabled(Connection.SUBSTATE_ALL, callSubstate)) {
- callSubstateChangedText = resources.getString(R.string.call_substate_call_resumed);
- }
-
- if (!callSubstateChangedText.isEmpty()) {
- String callSubstateLabelText = resources.getString(R.string.call_substate_label);
- Toast.makeText(context, callSubstateLabelText + callSubstateChangedText,
- Toast.LENGTH_SHORT).show();
- }
- }
-
- boolean isEnabled(int mask, int callSubstate) {
- return (mask & callSubstate) == mask;
- }
-
- boolean isNotEnabled(int mask, int callSubstate) {
- return (mask & callSubstate) == 0;
- }
-
- /**
* Cleans up the video telephony surfaces. Used when the presenter indicates a change to an
* audio-only state. Since the surfaces are static, it is important to ensure they are cleaned
* up promptly.
diff --git a/InCallUI/src/com/android/incallui/VideoCallPresenter.java b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
index b9aeacfd7..f11f328e6 100644
--- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java
@@ -158,11 +158,6 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
private static boolean mIsVideoMode = false;
- /**
- * Stores the current call substate.
- */
- private int mCurrentCallSubstate;
-
/** Handler which resets request state to NO_REQUEST after an interval. */
private Handler mSessionModificationResetHandler;
private static final long SESSION_MODIFICATION_RESET_DELAY_MS = 3000;
@@ -449,19 +444,6 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
showVideoUi(call.getVideoState(), call.getState());
}
- private void checkForCallSubstateChange(Call call) {
- if (mCurrentCallSubstate != call.getCallSubstate()) {
- VideoCallUi ui = getUi();
- if (ui == null) {
- Log.e(this, "Error VideoCallUi is null. Return.");
- return;
- }
- mCurrentCallSubstate = call.getCallSubstate();
- // Display a call substate changed message on UI.
- ui.showCallSubstateChanged(mCurrentCallSubstate);
- }
- }
-
private void cleanupSurfaces() {
final VideoCallUi ui = getUi();
if (ui == null) {
@@ -498,13 +480,11 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
private void updateCallCache(Call call) {
if (call == null) {
mCurrentVideoState = VideoProfile.VideoState.AUDIO_ONLY;
- mCurrentCallSubstate = Connection.SUBSTATE_NONE;
mCurrentCallState = Call.State.INVALID;
mVideoCall = null;
mPrimaryCall = null;
} else {
mCurrentVideoState = call.getVideoState();
- mCurrentCallSubstate = call.getCallSubstate();
mVideoCall = call.getVideoCall();
mCurrentCallState = call.getState();
mPrimaryCall = call;
@@ -529,7 +509,6 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
}
updateVideoCall(call);
- checkForCallSubstateChange(call);
updateCallCache(call);
}
@@ -1141,6 +1120,5 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi
Point getScreenSize();
Point getPreviewSize();
void cleanupSurfaces();
- void showCallSubstateChanged(int callSubstate);
}
}