diff options
| author | Eric Erfanian <erfanian@google.com> | 2017-03-20 08:50:25 -0700 |
|---|---|---|
| committer | Eric Erfanian <erfanian@google.com> | 2017-03-20 09:03:10 -0700 |
| commit | 06b6b56e9eaa91ebf757ea641e38a9c885fa40bd (patch) | |
| tree | 6a0f9f0809cc02004f4be6ef9d20cbced397c3d1 /java/com/android/incallui/answer/impl/AnswerFragment.java | |
| parent | 9a090c89e7a0c43a668bd6e2ac5e5e680f323aed (diff) | |
Update AOSP Dialer source from internal google3 repository at
cl/150622237
Test: make, treehugger, on device testing.
This CL updates the AOSP Dialer source with all the changes that have
gone into the private google3 repository. This includes all the
changes from cl/150392808 (3/16/2017) to cl/150622237 (3/20/2017).
This goal of these drops is to keep the AOSP source in sync with the
internal google3 repository. Currently these sync are done by hand
with very minor modifications to the internal source code.
See the Android.mk file for list of modifications.
Our current goal is to do frequent drops (daily if possible) and
eventually switched to an automated process.
Change-Id: Id53e0e580a4ef73760a8afb7bb8c265ee27ad535
Diffstat (limited to 'java/com/android/incallui/answer/impl/AnswerFragment.java')
| -rw-r--r-- | java/com/android/incallui/answer/impl/AnswerFragment.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/java/com/android/incallui/answer/impl/AnswerFragment.java b/java/com/android/incallui/answer/impl/AnswerFragment.java index 6874daea3..a6174686c 100644 --- a/java/com/android/incallui/answer/impl/AnswerFragment.java +++ b/java/com/android/incallui/answer/impl/AnswerFragment.java @@ -106,6 +106,9 @@ public class AnswerFragment extends Fragment @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) static final String ARG_IS_VIDEO_UPGRADE_REQUEST = "is_video_upgrade_request"; + @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) + static final String ARG_IS_SELF_MANAGED_CAMERA = "is_self_managed_camera"; + private static final String STATE_HAS_ANIMATED_ENTRY = "hasAnimated"; private static final int HINT_SECONDARY_SHOW_DURATION_MILLIS = 5000; @@ -288,11 +291,15 @@ public class AnswerFragment extends Fragment } public static AnswerFragment newInstance( - String callId, boolean isVideoCall, boolean isVideoUpgradeRequest) { + String callId, + boolean isVideoCall, + boolean isVideoUpgradeRequest, + boolean isSelfManagedCamera) { Bundle bundle = new Bundle(); bundle.putString(ARG_CALL_ID, Assert.isNotNull(callId)); bundle.putBoolean(ARG_IS_VIDEO_CALL, isVideoCall); bundle.putBoolean(ARG_IS_VIDEO_UPGRADE_REQUEST, isVideoUpgradeRequest); + bundle.putBoolean(ARG_IS_SELF_MANAGED_CAMERA, isSelfManagedCamera); AnswerFragment instance = new AnswerFragment(); instance.setArguments(bundle); @@ -620,7 +627,11 @@ public class AnswerFragment extends Fragment view.setSystemUiVisibility(flags); if (isVideoCall() || isVideoUpgradeRequest()) { if (VideoUtils.hasCameraPermissionAndAllowedByUser(getContext())) { - answerVideoCallScreen = new AnswerVideoCallScreen(getCallId(), this, view); + if (isSelfManagedCamera()) { + answerVideoCallScreen = new SelfManagedAnswerVideoCallScreen(getCallId(), this, view); + } else { + answerVideoCallScreen = new AnswerVideoCallScreen(getCallId(), this, view); + } } else { view.findViewById(R.id.videocall_video_off).setVisibility(View.VISIBLE); } @@ -718,6 +729,10 @@ public class AnswerFragment extends Fragment return getArguments().getBoolean(ARG_IS_VIDEO_CALL); } + public boolean isSelfManagedCamera() { + return getArguments().getBoolean(ARG_IS_SELF_MANAGED_CAMERA); + } + @Override public void onAnswerProgressUpdate(@FloatRange(from = -1f, to = 1f) float answerProgress) { // Don't fade the window background for call waiting or video upgrades. Fading the background |
