From 56b1f401810be96f03e1a4575c83273bc4a686fb Mon Sep 17 00:00:00 2001 From: Kenneth Ford Date: Wed, 25 Jan 2023 00:37:40 +0000 Subject: [PATCH] String update for rear display mode Bug: 267395633 Test: Manual & UX sign off Change-Id: I172651cadba52d8d2da636c519edc7a6de72db0d --- .../activity_rear_display_education.xml | 5 ++-- ...activity_rear_display_education_opened.xml | 15 +++--------- packages/SystemUI/res/values/strings.xml | 14 +++++------ .../RearDisplayDialogController.java | 1 - .../RearDisplayDialogControllerTest.java | 23 ++++++++++--------- 5 files changed, 25 insertions(+), 33 deletions(-) diff --git a/packages/SystemUI/res/layout/activity_rear_display_education.xml b/packages/SystemUI/res/layout/activity_rear_display_education.xml index f5fc48c70003a..094807e0fad42 100644 --- a/packages/SystemUI/res/layout/activity_rear_display_education.xml +++ b/packages/SystemUI/res/layout/activity_rear_display_education.xml @@ -41,9 +41,10 @@ - - diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 7d5b66e9cbab9..afcd596c7e4ad 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -2780,15 +2780,15 @@ Cancel - Flip now + Switch screens now - Unfold phone for a better selfie - - Flip to front display for a better selfie? + Unfold phone + + Switch screens? - Use the rear-facing camera for a wider photo with higher resolution. - - ✱ This screen will turn off + For higher resolution, use the rear camera + + For higher resolution, flip the phone Foldable device being unfolded diff --git a/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayDialogController.java b/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayDialogController.java index 802db7e9d0c00..dc3c8203d1a2d 100644 --- a/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayDialogController.java +++ b/packages/SystemUI/src/com/android/systemui/reardisplay/RearDisplayDialogController.java @@ -27,7 +27,6 @@ import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.CoreStartable; import com.android.systemui.R; import com.android.systemui.dagger.SysUISingleton; -import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.phone.SystemUIDialog; diff --git a/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayDialogControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayDialogControllerTest.java index ea0e454f0b5de..9acd47e4378f5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayDialogControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/reardisplay/RearDisplayDialogControllerTest.java @@ -16,14 +16,13 @@ package com.android.systemui.reardisplay; -import static junit.framework.Assert.assertNotNull; -import static junit.framework.Assert.assertNull; +import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertTrue; import android.hardware.devicestate.DeviceStateManager; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; -import android.view.View; +import android.widget.TextView; import androidx.test.filters.SmallTest; @@ -37,8 +36,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import java.util.concurrent.Executor; - @SmallTest @RunWith(AndroidTestingRunner.class) @TestableLooper.RunWithLooper(setAsMainLooper = true) @@ -63,9 +60,11 @@ public class RearDisplayDialogControllerTest extends SysuiTestCase { controller.showRearDisplayDialog(CLOSED_BASE_STATE); assertTrue(controller.mRearDisplayEducationDialog.isShowing()); - View deviceOpenedWarningTextView = controller.mRearDisplayEducationDialog.findViewById( - R.id.rear_display_warning_text_view); - assertNull(deviceOpenedWarningTextView); + TextView deviceClosedTitleTextView = controller.mRearDisplayEducationDialog.findViewById( + R.id.rear_display_title_text_view); + assertEquals(deviceClosedTitleTextView.getText().toString(), + getContext().getResources().getString( + R.string.rear_display_folded_bottom_sheet_title)); } @Test @@ -79,9 +78,11 @@ public class RearDisplayDialogControllerTest extends SysuiTestCase { controller.showRearDisplayDialog(OPEN_BASE_STATE); assertTrue(controller.mRearDisplayEducationDialog.isShowing()); - View deviceOpenedWarningTextView = controller.mRearDisplayEducationDialog.findViewById( - R.id.rear_display_warning_text_view); - assertNotNull(deviceOpenedWarningTextView); + TextView deviceClosedTitleTextView = controller.mRearDisplayEducationDialog.findViewById( + R.id.rear_display_title_text_view); + assertEquals(deviceClosedTitleTextView.getText().toString(), + getContext().getResources().getString( + R.string.rear_display_unfolded_bottom_sheet_title)); } /**