diff options
author | Tobias Thierer <tobiast@google.com> | 2017-06-09 14:16:05 +0000 |
---|---|---|
committer | Tobias Thierer <tobiast@google.com> | 2017-06-09 14:16:05 +0000 |
commit | cded3beaf28a703e1ef8f71bbc6836e6806c3736 (patch) | |
tree | c1b5e8199b5996fc848e7455d04126b9cdbb3c39 /java/com/android/incallui/video | |
parent | c67d658e7daa453fe9ad9fd1a37f81eaf2048c44 (diff) |
Revert "Update AOSP Dialer source from internal google3 repository at cl/158012278. am: 91ce7d2a47"
This reverts commit c67d658e7daa453fe9ad9fd1a37f81eaf2048c44.
Reason for revert: This CL broke the sailfish-userdebug_javac-all target on master.
Change-Id: I9b54333a654c00154ca84f4ece84bea4f07cc19b
Diffstat (limited to 'java/com/android/incallui/video')
10 files changed, 38 insertions, 38 deletions
diff --git a/java/com/android/incallui/video/impl/SpeakerButtonController.java b/java/com/android/incallui/video/impl/SpeakerButtonController.java index d98545feb..e12032abf 100644 --- a/java/com/android/incallui/video/impl/SpeakerButtonController.java +++ b/java/com/android/incallui/video/impl/SpeakerButtonController.java @@ -88,7 +88,7 @@ public class SpeakerButtonController implements OnCheckedChangeListener, OnClick icon = R.drawable.quantum_ic_headset_white_36; contentDescriptionResId = R.string.incall_content_description_headset; } else { - icon = R.drawable.quantum_ic_phone_in_talk_white_36; + icon = R.drawable.ic_phone_audio_white_36dp; contentDescriptionResId = R.string.incall_content_description_earpiece; } } else { diff --git a/java/com/android/incallui/video/impl/SurfaceViewVideoCallFragment.java b/java/com/android/incallui/video/impl/SurfaceViewVideoCallFragment.java index 489f72b7d..b7a960e35 100644 --- a/java/com/android/incallui/video/impl/SurfaceViewVideoCallFragment.java +++ b/java/com/android/incallui/video/impl/SurfaceViewVideoCallFragment.java @@ -495,7 +495,7 @@ public class SurfaceViewVideoCallFragment extends Fragment } private View[] getAllPreviewRelatedViews() { - return new View[] {previewRoot, mutePreviewOverlay}; + return new View[] {previewRoot}; } private int getOffsetTop(View view) { @@ -644,6 +644,12 @@ public class SurfaceViewVideoCallFragment extends Fragment updateVideoOffViews(); } + /** + * This method scales the video feed inside the texture view, it doesn't change the texture view's + * size. In the old UI we would change the view size to match the aspect ratio of the video. In + * the new UI the view is always square (with the circular clip) so we have to do additional work + * to make sure the non-square video doesn't look squished. + */ @Override public void onLocalVideoDimensionsChanged() { LogUtil.i("SurfaceViewVideoCallFragment.onLocalVideoDimensionsChanged", null); @@ -828,9 +834,6 @@ public class SurfaceViewVideoCallFragment extends Fragment } @Override - public void onAudioRouteSelectorDismiss() {} - - @Override public void setPrimary(@NonNull PrimaryInfo primaryInfo) { LogUtil.i("SurfaceViewVideoCallFragment.setPrimary", primaryInfo.toString()); contactGridManager.setPrimary(primaryInfo); diff --git a/java/com/android/incallui/video/impl/VideoCallFragment.java b/java/com/android/incallui/video/impl/VideoCallFragment.java index 6e45f928a..8e2f5aefd 100644 --- a/java/com/android/incallui/video/impl/VideoCallFragment.java +++ b/java/com/android/incallui/video/impl/VideoCallFragment.java @@ -59,7 +59,6 @@ import android.widget.TextView; import com.android.dialer.common.Assert; import com.android.dialer.common.FragmentUtils; import com.android.dialer.common.LogUtil; -import com.android.dialer.common.concurrent.ThreadUtil; import com.android.dialer.compat.ActivityCompat; import com.android.incallui.audioroute.AudioRouteSelectorDialogFragment; import com.android.incallui.audioroute.AudioRouteSelectorDialogFragment.AudioRouteSelectorPresenter; @@ -666,14 +665,22 @@ public class VideoCallFragment extends Fragment updateRemoteVideoScaling(); } + /** + * This method scales the video feed inside the texture view, it doesn't change the texture view's + * size. In the old UI we would change the view size to match the aspect ratio of the video. In + * the new UI the view is always square (with the circular clip) so we have to do additional work + * to make sure the non-square video doesn't look squished. + */ @Override public void onLocalVideoDimensionsChanged() { LogUtil.i("VideoCallFragment.onLocalVideoDimensionsChanged", null); + updatePreviewVideoScaling(); } @Override public void onLocalVideoOrientationChanged() { LogUtil.i("VideoCallFragment.onLocalVideoOrientationChanged", null); + updatePreviewVideoScaling(); } /** Called when the remote video's dimensions change. */ @@ -846,9 +853,6 @@ public class VideoCallFragment extends Fragment } @Override - public void onAudioRouteSelectorDismiss() {} - - @Override public void setPrimary(@NonNull PrimaryInfo primaryInfo) { LogUtil.i("VideoCallFragment.setPrimary", primaryInfo.toString()); contactGridManager.setPrimary(primaryInfo); @@ -1041,6 +1045,7 @@ public class VideoCallFragment extends Fragment params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); previewTextureView.setLayoutParams(params); previewTextureView.setOutlineProvider(circleOutlineProvider); + updatePreviewVideoScaling(); updateOverlayBackground(); contactGridManager.setIsMiddleRowVisible(false); updateMutePreviewOverlayVisibility(); @@ -1048,9 +1053,6 @@ public class VideoCallFragment extends Fragment previewOffBlurredImageView.setLayoutParams(params); previewOffBlurredImageView.setOutlineProvider(circleOutlineProvider); previewOffBlurredImageView.setClipToOutline(true); - - // Wait until the layout pass has finished before updating the scaling - ThreadUtil.postOnUiThread(this::updatePreviewVideoScaling); } private void updateVideoOffViews() { diff --git a/java/com/android/incallui/video/impl/res/layout/frag_videocall_surfaceview.xml b/java/com/android/incallui/video/impl/res/layout/frag_videocall_surfaceview.xml index 1a2bc2429..c67246675 100644 --- a/java/com/android/incallui/video/impl/res/layout/frag_videocall_surfaceview.xml +++ b/java/com/android/incallui/video/impl/res/layout/frag_videocall_surfaceview.xml @@ -14,7 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License --> -<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" @@ -32,7 +32,7 @@ android:id="@+id/videocall_remote_video_off" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerInParent="true" + android:layout_gravity="center" android:accessibilityTraversalBefore="@+id/videocall_speaker_button" android:drawablePadding="8dp" android:drawableTop="@drawable/quantum_ic_videocam_off_white_36" @@ -71,22 +71,19 @@ android:visibility="gone" android:importantForAccessibility="no" tools:visibility="visible"/> - </FrameLayout> - <ImageView - android:id="@+id/videocall_video_preview_mute_overlay" - android:layout_width="32dp" - android:layout_height="32dp" - android:layout_alignBottom="@id/videocall_preview_root" - android:layout_alignEnd="@id/videocall_preview_root" - android:layout_marginBottom="-8dp" - android:layout_marginEnd="-8dp" - android:background="@drawable/videocall_background_circle_white" - android:contentDescription="@string/incall_content_description_muted" - android:scaleType="center" - android:src="@drawable/quantum_ic_mic_off_black_24" - android:visibility="gone" - tools:visibility="visible"/> + <ImageView + android:id="@+id/videocall_video_preview_mute_overlay" + android:layout_width="32dp" + android:layout_height="32dp" + android:layout_gravity="center" + android:background="@drawable/videocall_background_circle_white" + android:contentDescription="@string/incall_content_description_muted" + android:scaleType="center" + android:src="@drawable/quantum_ic_mic_off_black_24" + android:visibility="gone" + tools:visibility="visible"/> + </FrameLayout> <View android:id="@+id/videocall_green_screen_background" @@ -105,4 +102,4 @@ android:layout_height="wrap_content" android:layout_gravity="top"/> -</RelativeLayout> +</FrameLayout> diff --git a/java/com/android/incallui/video/impl/res/values-h580dp/dimens.xml b/java/com/android/incallui/video/impl/res/values-h580dp/dimens.xml index e9e7f9e8b..a53fb6404 100644 --- a/java/com/android/incallui/video/impl/res/values-h580dp/dimens.xml +++ b/java/com/android/incallui/video/impl/res/values-h580dp/dimens.xml @@ -19,5 +19,5 @@ <dimen name="videocall_button_size">72dp</dimen> <dimen name="videocall_preview_width">88dp</dimen> <dimen name="videocall_preview_height">88dp</dimen> - <dimen name="videocall_preview_long">116dp</dimen> + <dimen name="videocall_preview_long">104dp</dimen> </resources> diff --git a/java/com/android/incallui/video/impl/res/values-land/dimens.xml b/java/com/android/incallui/video/impl/res/values-land/dimens.xml index d0a5e409a..6485735e2 100644 --- a/java/com/android/incallui/video/impl/res/values-land/dimens.xml +++ b/java/com/android/incallui/video/impl/res/values-land/dimens.xml @@ -15,5 +15,5 @@ ~ limitations under the License --> <resources> - <dimen name="videocall_preview_long">96dp</dimen> + <dimen name="videocall_preview_long">92dp</dimen> </resources> diff --git a/java/com/android/incallui/video/impl/res/values-land/styles.xml b/java/com/android/incallui/video/impl/res/values-land/styles.xml index f60dbd1d6..a809708df 100644 --- a/java/com/android/incallui/video/impl/res/values-land/styles.xml +++ b/java/com/android/incallui/video/impl/res/values-land/styles.xml @@ -16,8 +16,7 @@ --> <resources> <style name="VideoPreviewHolder"> - <item name="android:layout_alignParentBottom">true</item> - <item name="android:layout_alignParentEnd">true</item> + <item name="android:layout_gravity">bottom|end</item> <item name="android:layout_width">@dimen/videocall_preview_long</item> <item name="android:layout_height">@dimen/videocall_preview_height</item> <item name="android:layout_marginBottom">@dimen/videocall_preview_margin_bottom</item> diff --git a/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml b/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml index e9e7f9e8b..a53fb6404 100644 --- a/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml +++ b/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml @@ -19,5 +19,5 @@ <dimen name="videocall_button_size">72dp</dimen> <dimen name="videocall_preview_width">88dp</dimen> <dimen name="videocall_preview_height">88dp</dimen> - <dimen name="videocall_preview_long">116dp</dimen> + <dimen name="videocall_preview_long">104dp</dimen> </resources> diff --git a/java/com/android/incallui/video/impl/res/values/dimens.xml b/java/com/android/incallui/video/impl/res/values/dimens.xml index 606b158d9..aa08c9d6d 100644 --- a/java/com/android/incallui/video/impl/res/values/dimens.xml +++ b/java/com/android/incallui/video/impl/res/values/dimens.xml @@ -17,7 +17,7 @@ <resources> <dimen name="videocall_preview_width">72dp</dimen> <dimen name="videocall_preview_height">72dp</dimen> - <dimen name="videocall_preview_long">96dp</dimen> + <dimen name="videocall_preview_long">84dp</dimen> <dimen name="videocall_preview_margin_bottom">24dp</dimen> <dimen name="videocall_preview_margin_start">24dp</dimen> <dimen name="videocall_preview_margin_end">24dp</dimen> diff --git a/java/com/android/incallui/video/impl/res/values/styles.xml b/java/com/android/incallui/video/impl/res/values/styles.xml index 010aca2d1..f73075f09 100644 --- a/java/com/android/incallui/video/impl/res/values/styles.xml +++ b/java/com/android/incallui/video/impl/res/values/styles.xml @@ -23,8 +23,7 @@ <item name="android:stateListAnimator">@animator/disabled_alpha</item> </style> <style name="VideoPreviewHolder"> - <item name="android:layout_alignParentBottom">true</item> - <item name="android:layout_alignParentStart">true</item> + <item name="android:layout_gravity">bottom|start</item> <item name="android:layout_width">@dimen/videocall_preview_width</item> <item name="android:layout_height">@dimen/videocall_preview_long</item> <item name="android:layout_marginBottom">@dimen/videocall_preview_margin_bottom</item> |