diff options
author | Eric Erfanian <erfanian@google.com> | 2017-03-15 14:41:07 -0700 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-03-15 16:24:23 -0700 |
commit | d5e47f6da5b08b13ecdfa7f1edc7e12aeb83fab9 (patch) | |
tree | b54abbb51fb7d66e7755a1fbb5db023ff601090b /java/com/android/incallui/video/impl/VideoCallFragment.java | |
parent | 30436e7e6d3f2c8755a91b2b6222b74d465a9e87 (diff) |
Update Dialer source from latest green build.
* Refactor voicemail component
* Add new enriched calling components
Test: treehugger, manual aosp testing
Change-Id: I521a0f86327d4b42e14d93927c7d613044ed5942
Diffstat (limited to 'java/com/android/incallui/video/impl/VideoCallFragment.java')
-rw-r--r-- | java/com/android/incallui/video/impl/VideoCallFragment.java | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/java/com/android/incallui/video/impl/VideoCallFragment.java b/java/com/android/incallui/video/impl/VideoCallFragment.java index 77a67d032..92c8b375e 100644 --- a/java/com/android/incallui/video/impl/VideoCallFragment.java +++ b/java/com/android/incallui/video/impl/VideoCallFragment.java @@ -32,6 +32,7 @@ import android.renderscript.RenderScript; import android.renderscript.ScriptIntrinsicBlur; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.annotation.VisibleForTesting; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.support.v4.view.animation.FastOutLinearInInterpolator; @@ -92,6 +93,9 @@ public class VideoCallFragment extends Fragment AudioRouteSelectorPresenter, OnSystemUiVisibilityChangeListener { + @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) + static final String ARG_CALL_ID = "call_id"; + private static final float BLUR_PREVIEW_RADIUS = 16.0f; private static final float BLUR_PREVIEW_SCALE_FACTOR = 1.0f; private static final float BLUR_REMOTE_RADIUS = 25.0f; @@ -156,6 +160,15 @@ public class VideoCallFragment extends Fragment } }; + public static VideoCallFragment newInstance(String callId) { + Bundle bundle = new Bundle(); + bundle.putString(ARG_CALL_ID, Assert.isNotNull(callId)); + + VideoCallFragment instance = new VideoCallFragment(); + instance.setArguments(bundle); + return instance; + } + @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -308,22 +321,27 @@ public class VideoCallFragment extends Fragment } @Override - public void onResume() { - super.onResume(); - LogUtil.i("VideoCallFragment.onResume", null); - inCallScreenDelegate.onInCallScreenResumed(); - } - - @Override public void onStart() { super.onStart(); LogUtil.i("VideoCallFragment.onStart", null); + onVideoScreenStart(); + } + + @Override + public void onVideoScreenStart() { inCallButtonUiDelegate.refreshMuteState(); videoCallScreenDelegate.onVideoCallScreenUiReady(); getView().postDelayed(cameraPermissionDialogRunnable, CAMERA_PERMISSION_DIALOG_DELAY_IN_MILLIS); } @Override + public void onResume() { + super.onResume(); + LogUtil.i("VideoCallFragment.onResume", null); + inCallScreenDelegate.onInCallScreenResumed(); + } + + @Override public void onPause() { super.onPause(); LogUtil.i("VideoCallFragment.onPause", null); @@ -333,6 +351,11 @@ public class VideoCallFragment extends Fragment public void onStop() { super.onStop(); LogUtil.i("VideoCallFragment.onStop", null); + onVideoScreenStop(); + } + + @Override + public void onVideoScreenStop() { getView().removeCallbacks(cameraPermissionDialogRunnable); videoCallScreenDelegate.onVideoCallScreenUiUnready(); } @@ -721,6 +744,12 @@ public class VideoCallFragment extends Fragment } @Override + @NonNull + public String getCallId() { + return Assert.isNotNull(getArguments().getString(ARG_CALL_ID)); + } + + @Override public void showButton(@InCallButtonIds int buttonId, boolean show) { LogUtil.v( "VideoCallFragment.showButton", |