From 8369df095a73a77b3715f8ae7ba06089cebca4ce Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Wed, 3 May 2017 10:27:13 -0700 Subject: This change reflects the Dialer V10 RC00 branch. RC00 is based on: branch: dialer-android_release_branch/153304843.1 synced to: 153304843 following the instructions at go/dialer-aosp-release. In this release: * Removes final apache sources. * Uses native lite compilation. More drops will follow with subsequent release candidates until we reach our final v10 release, in cadence with our prebuilt drops. Test: TreeHugger, on device Change-Id: Ic9684057230f9b579c777820c746cd21bf45ec0f --- .../incallui/answer/impl/AnswerFragment.java | 2 +- .../impl/answermethod/FlingUpDownMethod.java | 76 +++++--- .../res/layout/swipe_up_down_method.xml | 167 +++++++++-------- .../answermethod/res/values-b+sr+Latn/strings.xml | 12 ++ .../answer/impl/hint/PawSecretCodeListener.java | 2 +- .../impl/hint/res/values-b+sr+Latn/strings.xml | 6 + .../answer/impl/res/layout/fragment_avatar.xml | 3 +- .../impl/res/layout/fragment_incoming_call.xml | 201 +++++++++++---------- .../answer/impl/res/values-b+sr+Latn/strings.xml | 24 +++ .../answer/impl/res/values-h480dp/dimens.xml | 1 - .../answer/impl/res/values-h540dp/dimens.xml | 1 - .../incallui/answer/impl/res/values/dimens.xml | 1 - 12 files changed, 286 insertions(+), 210 deletions(-) create mode 100644 java/com/android/incallui/answer/impl/answermethod/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/answer/impl/hint/res/values-b+sr+Latn/strings.xml create mode 100644 java/com/android/incallui/answer/impl/res/values-b+sr+Latn/strings.xml (limited to 'java/com/android/incallui/answer') diff --git a/java/com/android/incallui/answer/impl/AnswerFragment.java b/java/com/android/incallui/answer/impl/AnswerFragment.java index 9eb29ace0..7fa559d6e 100644 --- a/java/com/android/incallui/answer/impl/AnswerFragment.java +++ b/java/com/android/incallui/answer/impl/AnswerFragment.java @@ -53,8 +53,8 @@ import com.android.dialer.common.FragmentUtils; import com.android.dialer.common.LogUtil; import com.android.dialer.common.MathUtil; import com.android.dialer.compat.ActivityCompat; +import com.android.dialer.logging.DialerImpression; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression; import com.android.dialer.multimedia.MultimediaData; import com.android.dialer.util.ViewUtil; import com.android.incallui.answer.impl.CreateCustomSmsDialogFragment.CreateCustomSmsHolder; diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java index 6e8e1f7bf..5c1ee47e6 100644 --- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java +++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java @@ -131,6 +131,7 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged private ImageView contactPuckBackground; private ImageView contactPuckIcon; private View incomingDisconnectText; + private View spaceHolder; private Animator lockBounceAnim; private AnimatorSet lockEntryAnim; private AnimatorSet lockHintAnim; @@ -193,33 +194,39 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged swipeToAnswerText = (TextView) view.findViewById(R.id.incoming_swipe_to_answer_text); swipeToRejectText = (TextView) view.findViewById(R.id.incoming_swipe_to_reject_text); incomingDisconnectText = view.findViewById(R.id.incoming_will_disconnect_text); + incomingDisconnectText.setVisibility(incomingWillDisconnect ? View.VISIBLE : View.GONE); incomingDisconnectText.setAlpha(incomingWillDisconnect ? 1 : 0); + spaceHolder = view.findViewById(R.id.incoming_bouncer_space_holder); + spaceHolder.setVisibility(incomingWillDisconnect ? View.GONE : View.VISIBLE); + + view.findViewById(R.id.incoming_swipe_to_answer_container) + .setAccessibilityDelegate( + new AccessibilityDelegate() { + @Override + public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfo(host, info); + info.addAction( + new AccessibilityAction( + R.id.accessibility_action_answer, + getString(R.string.call_incoming_answer))); + info.addAction( + new AccessibilityAction( + R.id.accessibility_action_decline, + getString(R.string.call_incoming_decline))); + } - view.setAccessibilityDelegate( - new AccessibilityDelegate() { - @Override - public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { - super.onInitializeAccessibilityNodeInfo(host, info); - info.addAction( - new AccessibilityAction( - R.id.accessibility_action_answer, getString(R.string.call_incoming_answer))); - info.addAction( - new AccessibilityAction( - R.id.accessibility_action_decline, getString(R.string.call_incoming_decline))); - } - - @Override - public boolean performAccessibilityAction(View host, int action, Bundle args) { - if (action == R.id.accessibility_action_answer) { - performAccept(); - return true; - } else if (action == R.id.accessibility_action_decline) { - performReject(); - return true; - } - return super.performAccessibilityAction(host, action, args); - } - }); + @Override + public boolean performAccessibilityAction(View host, int action, Bundle args) { + if (action == R.id.accessibility_action_answer) { + performAccept(); + return true; + } else if (action == R.id.accessibility_action_decline) { + performReject(); + return true; + } + return super.performAccessibilityAction(host, action, args); + } + }); swipeProgress = 0; @@ -367,7 +374,24 @@ public class FlingUpDownMethod extends AnswerMethod implements OnProgressChanged public void setShowIncomingWillDisconnect(boolean incomingWillDisconnect) { this.incomingWillDisconnect = incomingWillDisconnect; if (incomingDisconnectText != null) { - incomingDisconnectText.animate().alpha(incomingWillDisconnect ? 1 : 0); + if (incomingWillDisconnect) { + incomingDisconnectText.setVisibility(View.VISIBLE); + spaceHolder.setVisibility(View.GONE); + incomingDisconnectText.animate().alpha(1); + } else { + incomingDisconnectText + .animate() + .alpha(0) + .setListener( + new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + super.onAnimationEnd(animation); + incomingDisconnectText.setVisibility(View.GONE); + spaceHolder.setVisibility(View.VISIBLE); + } + }); + } } } diff --git a/java/com/android/incallui/answer/impl/answermethod/res/layout/swipe_up_down_method.xml b/java/com/android/incallui/answer/impl/answermethod/res/layout/swipe_up_down_method.xml index 42b55cf35..9a49075b8 100644 --- a/java/com/android/incallui/answer/impl/answermethod/res/layout/swipe_up_down_method.xml +++ b/java/com/android/incallui/answer/impl/answermethod/res/layout/swipe_up_down_method.xml @@ -16,101 +16,108 @@ --> - - + + android:layout_gravity="center_horizontal|bottom" + android:accessibilityLiveRegion="polite" + android:clipChildren="false" + android:clipToPadding="false" + android:orientation="vertical" + android:visibility="visible"> + android:id="@+id/incoming_will_disconnect_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="116dp" + android:layout_gravity="center_horizontal" + android:alpha="0" + android:text="@string/call_incoming_will_disconnect" + android:textColor="@color/blue_grey_100" + android:textSize="16sp" + android:visibility="gone" + tools:alpha="1"/> + + + + android:id="@+id/incoming_call_puck_container" + android:layout_width="@dimen/answer_contact_puck_size_photo" + android:layout_height="@dimen/answer_contact_puck_size_photo" + android:layout_marginBottom="10dp" + android:layout_gravity="center_horizontal" + android:clipChildren="false" + android:clipToPadding="false" + android:contentDescription="@string/a11y_incoming_call_swipe_to_answer"> + android:id="@+id/incoming_call_puck_bg" + android:layout_width="@dimen/answer_contact_puck_size_no_photo" + android:layout_height="@dimen/answer_contact_puck_size_no_photo" + android:layout_gravity="center" + android:background="@drawable/circular_background" + android:contentDescription="@null" + android:duplicateParentState="true" + android:elevation="8dp" + android:focusable="false" + android:stateListAnimator="@animator/activated_button_elevation"/> + android:id="@+id/incoming_call_puck_icon" + android:layout_width="30dp" + android:layout_height="30dp" + android:layout_gravity="center" + android:contentDescription="@null" + android:duplicateParentState="true" + android:elevation="16dp" + android:focusable="false" + android:outlineProvider="none" + android:src="@drawable/quantum_ic_call_white_24" + android:tint="@color/incoming_answer_icon" + android:tintMode="src_atop" + tools:outlineProvider="background"/> + android:id="@+id/incoming_swipe_to_reject_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="20dp" + android:layout_gravity="center_horizontal" + android:alpha="0" + android:focusable="false" + android:text="@string/call_incoming_swipe_to_reject" + android:textAppearance="@style/Dialer.Incall.TextAppearance.Hint" + tools:alpha="1"/> + android:id="@+id/hint_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:clipChildren="false" + android:clipToPadding="false"/> diff --git a/java/com/android/incallui/answer/impl/answermethod/res/values-b+sr+Latn/strings.xml b/java/com/android/incallui/answer/impl/answermethod/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..3f8ad9518 --- /dev/null +++ b/java/com/android/incallui/answer/impl/answermethod/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,12 @@ + + + "Prevucite nagore da biste odgovorili" + "Prevucite nadole da biste odbili" + "Pomoću dva prsta prevucite nagore da biste odgovorili na poziv ili nadole da biste ga odbili" + "Ako odgovorite na ovaj poziv, prekinućete video poziv" + "Odbijte" + "Odbij" + "Odgovorite" + "Odgovori" + diff --git a/java/com/android/incallui/answer/impl/hint/PawSecretCodeListener.java b/java/com/android/incallui/answer/impl/hint/PawSecretCodeListener.java index b4fc19c0d..a8737c363 100644 --- a/java/com/android/incallui/answer/impl/hint/PawSecretCodeListener.java +++ b/java/com/android/incallui/answer/impl/hint/PawSecretCodeListener.java @@ -27,8 +27,8 @@ import android.widget.Toast; import com.android.dialer.common.Assert; import com.android.dialer.common.ConfigProviderBindings; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression.Type; import com.android.dialer.logging.Logger; -import com.android.dialer.logging.nano.DialerImpression.Type; import java.util.Random; /** diff --git a/java/com/android/incallui/answer/impl/hint/res/values-b+sr+Latn/strings.xml b/java/com/android/incallui/answer/impl/hint/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..c36e4c2a9 --- /dev/null +++ b/java/com/android/incallui/answer/impl/hint/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,6 @@ + + + "Omogućen je režim šape" + "Onemogućen je režim šape" + diff --git a/java/com/android/incallui/answer/impl/res/layout/fragment_avatar.xml b/java/com/android/incallui/answer/impl/res/layout/fragment_avatar.xml index d656ceb4e..f8e48942c 100644 --- a/java/com/android/incallui/answer/impl/res/layout/fragment_avatar.xml +++ b/java/com/android/incallui/answer/impl/res/layout/fragment_avatar.xml @@ -21,6 +21,5 @@ android:id="@id/contactgrid_avatar" android:layout_width="@dimen/answer_avatar_size" android:layout_height="@dimen/answer_avatar_size" - android:layout_marginTop="20dp" - android:layout_gravity="center_horizontal" + android:layout_gravity="center" android:elevation="@dimen/answer_data_elevation"/> diff --git a/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml b/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml index 2e42a6ac8..cd85e2f5b 100644 --- a/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml +++ b/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml @@ -15,15 +15,15 @@ ~ limitations under the License --> + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/incoming_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:clipChildren="false" + android:clipToPadding="false" + android:keepScreenOn="true"> + app:scaleHeight="@bool/scale_height" + app:scaleWidth="@bool/scale_width"/> + android:id="@+id/incoming_preview_texture_view_overlay" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/videocall_overlay_background_color" + android:visibility="gone"/> + android:layout_width="match_parent" + android:layout_height="match_parent" + android:fitsSystemWindows="true"> + android:id="@+id/videocall_video_off" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:padding="64dp" + android:accessibilityTraversalBefore="@+id/videocall_speaker_button" + android:drawablePadding="8dp" + android:drawableTop="@drawable/quantum_ic_videocam_off_white_36" + android:gravity="center" + android:text="@string/call_incoming_video_is_off" + android:textAppearance="@style/Dialer.Incall.TextAppearance" + android:visibility="gone"/> + android:id="@+id/incall_contact_grid" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_marginTop="24dp" + android:clipChildren="false" + android:clipToPadding="false" + android:gravity="top|center_horizontal" + android:orientation="vertical"> + android:id="@id/contactgrid_top_row" + layout="@layout/incall_contactgrid_top_row" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp"/> + android:id="@id/contactgrid_contact_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="8dp" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp" + android:singleLine="true" + android:textAppearance="@style/Dialer.Incall.TextAppearance.Large" + android:textSize="@dimen/answer_contact_name_text_size" + app:autoResizeText_minTextSize="@dimen/answer_contact_name_min_size" + tools:ignore="Deprecated" + tools:text="Jake Peralta"/> + android:id="@id/contactgrid_bottom_row" + layout="@layout/incall_contactgrid_bottom_row" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp"/> + android:id="@+id/incall_important_call_badge" + android:layout_width="wrap_content" + android:layout_height="48dp" + android:layout_marginTop="4dp" + android:layout_marginBottom="@dimen/answer_importance_margin_bottom" + android:elevation="@dimen/answer_data_elevation" + android:gravity="center" + android:singleLine="true" + android:text="@string/call_incoming_important" + android:textAllCaps="true" + android:textAppearance="@style/Dialer.Incall.TextAppearance" + android:textColor="@android:color/black"/> + android:id="@+id/incall_location_holder" + android:layout_width="match_parent" + android:layout_height="wrap_content"/> + android:id="@+id/incall_data_container" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1" + android:clipChildren="false" + android:clipToPadding="false"/> + + + + android:id="@+id/answer_method_container" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:clipChildren="false" + android:clipToPadding="false"/> + android:id="@+id/incoming_secondary_button" + android:layout_width="56dp" + android:layout_height="56dp" + android:layout_gravity="bottom|start" + android:scaleType="center" + android:src="@drawable/quantum_ic_message_white_24" + android:visibility="invisible" + tools:visibility="visible"/> + + "Prevucite od ikone da biste odbili porukom" + "Prevucite od ikone da biste odgovorili audio pozivom" + "Prevucite nagore da biste odgovorili i zadržali poziv koji je u toku" + "Prevucite nagore da biste odgovorili i završili poziv koji je na čekanju" + "Prevucite od ikone da biste se javili i završili poziv koji je u toku" + "Napišite sami…" + "Telefon" + "Spikerfon" + "Napišite sami…" + "Otkaži" + "Pošalji" + "Odbijte ovaj poziv porukom" + "Odgovorite audio pozivom" + "Javite se i završite poziv koji je u toku" + "Odbijte porukom" + "Odgovorite audio pozivom" + "Javite se i završite poziv koji je u toku" + "Kamera je isključena" + "Prevucite nagore pomoću dva prsta da biste odgovorili. Prevucite nadole pomoću dva prsta da biste odbili." + "Važan poziv" + diff --git a/java/com/android/incallui/answer/impl/res/values-h480dp/dimens.xml b/java/com/android/incallui/answer/impl/res/values-h480dp/dimens.xml index 5dc3f2ac5..eab321fbd 100644 --- a/java/com/android/incallui/answer/impl/res/values-h480dp/dimens.xml +++ b/java/com/android/incallui/answer/impl/res/values-h480dp/dimens.xml @@ -15,7 +15,6 @@ ~ limitations under the License --> - 150dp 100dp 8dp true diff --git a/java/com/android/incallui/answer/impl/res/values-h540dp/dimens.xml b/java/com/android/incallui/answer/impl/res/values-h540dp/dimens.xml index 69716e0bd..d5e829928 100644 --- a/java/com/android/incallui/answer/impl/res/values-h540dp/dimens.xml +++ b/java/com/android/incallui/answer/impl/res/values-h540dp/dimens.xml @@ -15,7 +15,6 @@ ~ limitations under the License --> - 258dp 172dp 8dp diff --git a/java/com/android/incallui/answer/impl/res/values/dimens.xml b/java/com/android/incallui/answer/impl/res/values/dimens.xml index 50aec0328..0bda9d3c7 100644 --- a/java/com/android/incallui/answer/impl/res/values/dimens.xml +++ b/java/com/android/incallui/answer/impl/res/values/dimens.xml @@ -17,7 +17,6 @@ 24sp 24sp - 0dp 0dp 0dp false -- cgit v1.2.3