diff options
author | Jay Shrauner <shrauner@google.com> | 2015-04-16 23:23:17 +0000 |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2015-04-16 23:23:26 +0000 |
commit | dd0d43e57ff8d073d90de4cc87c4c0285a8f1a7c (patch) | |
tree | 1cc0961f2017586b55b513aaff4105994c6027d4 /InCallUI | |
parent | 0e2cd6cedf9242ea5707d230a54633a030f8a810 (diff) | |
parent | 91ab7e596474583f0b9eb7eceaa152d98a75392b (diff) |
Merge "DO NOT MERGE Remove connection substate" into m-wireless-dev
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/res/values/strings.xml | 11 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/Call.java | 7 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/VideoCallFragment.java | 52 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/VideoCallPresenter.java | 22 |
4 files changed, 1 insertions, 91 deletions
diff --git a/InCallUI/res/values/strings.xml b/InCallUI/res/values/strings.xml index cfe3d41ab..b8a84c70c 100644 --- a/InCallUI/res/values/strings.xml +++ b/InCallUI/res/values/strings.xml @@ -447,17 +447,6 @@ <!-- This can be used in any application wanting to disable the text "Emergency number" --> <string name="emergency_call_dialog_number_for_display">Emergency number</string> - <!-- STOPSHIP These strings are for debugging only --> - <!-- Call substate label --> - <string name="call_substate_label" translatable="false">Call substate - \u000a</string> - <!-- Call substate label for call resumed --> - <string name="call_substate_call_resumed" translatable="false">Resumed \u000a</string> - <!-- Call substate label for call connected suspended (audio) --> - <string name="call_substate_connected_suspended_audio" translatable="false">Connected Suspended (Audio) \u000a</string> - <!-- Call substate label for call connected suspended (video) --> - <string name="call_substate_connected_suspended_video" translatable="false">Connected Suspended (Video) \u000a</string> - <!-- Call substate label for avp retry --> - <string name="call_substate_avp_retry" translatable="false">Avp Retry \u000a</string> <!-- Video quality changed message --> <string name="video_quality_changed" translatable="false">Video quality changed to \u0020</string> <!-- Video quality High --> diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index 3d6f2032e..a3fcd4db7 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -441,10 +441,6 @@ public final 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()); @@ -522,7 +518,7 @@ public final class Call { @Override public String toString() { 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 @@ -531,7 +527,6 @@ public final 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 1d711a882..2ce7b8910 100644 --- a/InCallUI/src/com/android/incallui/VideoCallFragment.java +++ b/InCallUI/src/com/android/incallui/VideoCallFragment.java @@ -599,58 +599,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 10cf11d64..9589c1b49 100644 --- a/InCallUI/src/com/android/incallui/VideoCallPresenter.java +++ b/InCallUI/src/com/android/incallui/VideoCallPresenter.java @@ -156,11 +156,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; @@ -447,19 +442,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) { @@ -496,13 +478,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; @@ -527,7 +507,6 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi } updateVideoCall(call); - checkForCallSubstateChange(call); updateCallCache(call); } @@ -1139,6 +1118,5 @@ public class VideoCallPresenter extends Presenter<VideoCallPresenter.VideoCallUi Point getScreenSize(); Point getPreviewSize(); void cleanupSurfaces(); - void showCallSubstateChanged(int callSubstate); } } |