diff --git a/packages/SystemUI/res/layout/screen_record_dialog.xml b/packages/SystemUI/res/layout/screen_record_dialog.xml index ab38dd2aebba8..ae052502a1104 100644 --- a/packages/SystemUI/res/layout/screen_record_dialog.xml +++ b/packages/SystemUI/res/layout/screen_record_dialog.xml @@ -49,13 +49,13 @@ android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceLarge" android:fontFamily="@*android:string/config_headlineFontFamily" - android:text="@string/screenrecord_start_label" + android:text="@string/screenrecord_permission_dialog_title" android:layout_marginTop="22dp" android:layout_marginBottom="15dp"/> diff --git a/packages/SystemUI/res/layout/screen_share_dialog.xml b/packages/SystemUI/res/layout/screen_share_dialog.xml index bd719894e25fa..7dbe0598f3c89 100644 --- a/packages/SystemUI/res/layout/screen_share_dialog.xml +++ b/packages/SystemUI/res/layout/screen_share_dialog.xml @@ -63,7 +63,7 @@ android:id="@+id/text_warning" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/screenrecord_description" + android:text="@string/screenrecord_permission_dialog_warning_entire_screen" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:textColorSecondary" android:gravity="start" @@ -91,7 +91,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0" - android:text="@string/screenrecord_start" + android:text="@string/screenrecord_continue" style="@style/Widget.Dialog.Button" /> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 4e68efeea8706..853930e174a7c 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -251,25 +251,22 @@ Add to note - Screen Recorder + Screen Recorder Processing screen recording Ongoing notification for a screen record session + + - Start Recording? - - While recording, Android System can capture any sensitive information that\u2019s visible on your screen or played on your device. This includes passwords, payment info, photos, messages, and audio. - - Record entire screen - - Record a single app + Start Recording? - While you\'re recording, Android has access to anything visible on your screen or played on your device. So be careful with passwords, payment details, messages, or other sensitive information. + While you’re recording, Android has access to anything visible on your screen or played on your device. So be careful with things like passwords, payment details, messages, photos, and audio and video. - While you\'re recording an app, Android has access to anything shown or played on that app. So be careful with passwords, payment details, messages, or other sensitive information. + While you’re recording an app, Android has access to anything shown or played on that app. So be careful with things like passwords, payment details, messages, photos, and audio and video. - Start recording + Start recording + Record audio @@ -281,7 +278,7 @@ Device audio and microphone - Start + Start Recording screen @@ -1064,47 +1061,52 @@ Remove - - %s will have access to all of the information that is visible on your screen or played from your device while recording or casting. This includes information such as passwords, payment details, photos, messages, and audio that you play. - - - The service providing this function will have access to all of the information that is visible on your screen or played from your device while recording or casting. This includes information such as passwords, payment details, photos, messages, and audio that you play. - - - Start recording or casting? - + Start recording or casting with %s? + + %s will have access to all of the information that is visible on your screen or played from your device while recording or casting. This includes information such as passwords, payment details, photos, messages, and audio that you play. + + Start recording or casting? + + The service providing this function will have access to all of the information that is visible on your screen or played from your device while recording or casting. This includes information such as passwords, payment details, photos, messages, and audio that you play. - - Allow %s to share or record? - - - Entire screen - - - A single app - - - When you\'re sharing, recording, or casting, %s has access to anything visible on your screen or played on your device. So be careful with passwords, payment details, messages, or other sensitive information. - - - When you\'re sharing, recording, or casting an app, %s has access to anything shown or played on that app. So be careful with passwords, payment details, messages, or other sensitive information. - - - Continue - + + Entire screen + + A single app - Share or record an app + Share or record an app - - Allow this app to share or record? + + + Start recording or casting with %s? + + When you’re sharing, recording, or casting, %s has access to anything visible on your screen or played on your device. So be careful with things like passwords, payment details, messages, photos, and audio and video. + + When you’re sharing, recording, or casting an app, %s has access to anything shown or played on that app. So be careful with things like passwords, payment details, messages, photos, and audio and video. + + Start - - When you\'re sharing, recording, or casting, this app has access to anything visible on your screen or played on your device. So be careful with passwords, payment details, messages, or other sensitive information. + + + Start casting? + + When you’re casting, Android has access to anything visible on your screen or played on your device. So be careful with things like passwords, payment details, messages, photos, and audio and video. + + When you’re casting an app, Android has access to anything shown or played on that app. So be careful with things like passwords, payment details, messages, photos, and audio and video. + + Start casting - - When you\'re sharing, recording, or casting an app, this app has access to anything shown or played on that app. So be careful with passwords, payment details, messages, or other sensitive information. + + + Start sharing? + + When you’re sharing, recording, or casting, Android has access to anything visible on your screen or played on your device. So be careful with things like passwords, payment details, messages, photos, and audio and video. + + When you’re sharing, recording, or casting an app, Android has access to anything shown or played on that app. So be careful with things like passwords, payment details, messages, photos, and audio and video. + + Start Blocked by your IT admin diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt index 0860c207ef206..aec7b5f7aa7a6 100644 --- a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt +++ b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionAppSelectorActivity.kt @@ -259,7 +259,7 @@ class MediaProjectionAppSelectorActivity( putExtra(Intent.EXTRA_INTENT, queryIntent) // Update the title of the chooser - val title = resources.getString(R.string.media_projection_permission_app_selector_title) + val title = resources.getString(R.string.screen_share_permission_app_selector_title) putExtra(Intent.EXTRA_TITLE, title) // Select host app's profile tab by default diff --git a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java index e217e36d10515..28adfbba1103d 100644 --- a/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java +++ b/packages/SystemUI/src/com/android/systemui/media/MediaProjectionPermissionActivity.java @@ -157,8 +157,8 @@ public class MediaProjectionPermissionActivity extends Activity CharSequence dialogTitle = null; String appName = null; if (Utils.isHeadlessRemoteDisplayProvider(packageManager, mPackageName)) { - dialogText = getString(R.string.media_projection_dialog_service_text); - dialogTitle = getString(R.string.media_projection_dialog_service_title); + dialogText = getString(R.string.media_projection_sys_service_dialog_warning); + dialogTitle = getString(R.string.media_projection_sys_service_dialog_title); } else { String label = aInfo.loadLabel(packageManager).toString(); @@ -188,7 +188,7 @@ public class MediaProjectionPermissionActivity extends Activity paint, MAX_APP_NAME_SIZE_PX, TextUtils.TruncateAt.END).toString(); appName = BidiFormatter.getInstance().unicodeWrap(unsanitizedAppName); - String actionText = getString(R.string.media_projection_dialog_text, appName); + String actionText = getString(R.string.media_projection_dialog_warning, appName); SpannableString message = new SpannableString(actionText); int appNameIndex = actionText.indexOf(appName); diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/MediaProjectionPermissionDialog.kt b/packages/SystemUI/src/com/android/systemui/screenrecord/MediaProjectionPermissionDialog.kt index 201557c03e481..f4f5f66dfb095 100644 --- a/packages/SystemUI/src/com/android/systemui/screenrecord/MediaProjectionPermissionDialog.kt +++ b/packages/SystemUI/src/com/android/systemui/screenrecord/MediaProjectionPermissionDialog.kt @@ -28,12 +28,14 @@ class MediaProjectionPermissionDialog( ) : BaseScreenSharePermissionDialog(context, createOptionList(appName), appName) { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + // TODO(b/270018943): Handle the case of System sharing (not recording nor casting) if (appName == null) { - setDialogTitle(R.string.media_projection_permission_dialog_system_service_title) + setDialogTitle(R.string.media_projection_entry_cast_permission_dialog_title) + setStartButtonText(R.string.media_projection_entry_cast_permission_dialog_continue) } else { - setDialogTitle(R.string.media_projection_permission_dialog_title) + setDialogTitle(R.string.media_projection_entry_app_permission_dialog_title) + setStartButtonText(R.string.media_projection_entry_app_permission_dialog_continue) } - setStartButtonText(R.string.media_projection_permission_dialog_continue) setStartButtonOnClickListener { // Note that it is important to run this callback before dismissing, so that the // callback can disable the dialog exit animation if it wants to. @@ -50,26 +52,26 @@ class MediaProjectionPermissionDialog( private fun createOptionList(appName: String?): List { val singleAppWarningText = if (appName == null) { - R.string.media_projection_permission_dialog_system_service_warning_single_app + R.string.media_projection_entry_cast_permission_dialog_warning_single_app } else { - R.string.media_projection_permission_dialog_warning_single_app + R.string.media_projection_entry_app_permission_dialog_warning_single_app } val entireScreenWarningText = if (appName == null) { - R.string.media_projection_permission_dialog_system_service_warning_entire_screen + R.string.media_projection_entry_cast_permission_dialog_warning_entire_screen } else { - R.string.media_projection_permission_dialog_warning_entire_screen + R.string.media_projection_entry_app_permission_dialog_warning_entire_screen } return listOf( ScreenShareOption( mode = ENTIRE_SCREEN, - spinnerText = R.string.media_projection_permission_dialog_option_entire_screen, + spinnerText = R.string.screen_share_permission_dialog_option_entire_screen, warningText = entireScreenWarningText ), ScreenShareOption( mode = SINGLE_APP, - spinnerText = R.string.media_projection_permission_dialog_option_single_app, + spinnerText = R.string.screen_share_permission_dialog_option_single_app, warningText = singleAppWarningText ) ) diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java index 4349bd71f670d..69008cca6fe3f 100644 --- a/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java +++ b/packages/SystemUI/src/com/android/systemui/screenrecord/RecordingService.java @@ -262,7 +262,7 @@ public class RecordingService extends Service implements ScreenMediaRecorderList Resources res = getResources(); NotificationChannel channel = new NotificationChannel( CHANNEL_ID, - getString(R.string.screenrecord_name), + getString(R.string.screenrecord_title), NotificationManager.IMPORTANCE_DEFAULT); channel.setDescription(getString(R.string.screenrecord_channel_description)); channel.enableVibration(true); @@ -270,7 +270,7 @@ public class RecordingService extends Service implements ScreenMediaRecorderList Bundle extras = new Bundle(); extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, - res.getString(R.string.screenrecord_name)); + res.getString(R.string.screenrecord_title)); String notificationTitle = res.getString(R.string.screenrecord_start_error); Notification.Builder builder = new Notification.Builder(this, CHANNEL_ID) @@ -290,7 +290,7 @@ public class RecordingService extends Service implements ScreenMediaRecorderList Resources res = getResources(); NotificationChannel channel = new NotificationChannel( CHANNEL_ID, - getString(R.string.screenrecord_name), + getString(R.string.screenrecord_title), NotificationManager.IMPORTANCE_DEFAULT); channel.setDescription(getString(R.string.screenrecord_channel_description)); channel.enableVibration(true); @@ -298,7 +298,7 @@ public class RecordingService extends Service implements ScreenMediaRecorderList Bundle extras = new Bundle(); extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, - res.getString(R.string.screenrecord_name)); + res.getString(R.string.screenrecord_title)); String notificationTitle = mAudioSource == ScreenRecordingAudioSource.NONE ? res.getString(R.string.screenrecord_ongoing_screen_only) @@ -335,7 +335,7 @@ public class RecordingService extends Service implements ScreenMediaRecorderList Bundle extras = new Bundle(); extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, - res.getString(R.string.screenrecord_name)); + res.getString(R.string.screenrecord_title)); Notification.Builder builder = new Notification.Builder(getApplicationContext(), CHANNEL_ID) .setContentTitle(notificationTitle) @@ -365,7 +365,7 @@ public class RecordingService extends Service implements ScreenMediaRecorderList Bundle extras = new Bundle(); extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME, - getResources().getString(R.string.screenrecord_name)); + getResources().getString(R.string.screenrecord_title)); Notification.Builder builder = new Notification.Builder(this, CHANNEL_ID) .setSmallIcon(R.drawable.ic_screenrecord) diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordDialog.java b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordDialog.java index efa45a4c4723b..2a21aaa81404d 100644 --- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordDialog.java +++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordDialog.java @@ -100,7 +100,7 @@ public class ScreenRecordDialog extends SystemUIDialog { window.addPrivateFlags(WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS); window.setGravity(Gravity.CENTER); - setTitle(R.string.screenrecord_name); + setTitle(R.string.screenrecord_title); setContentView(R.layout.screen_record_dialog); diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialog.kt b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialog.kt index 30509e23d1861..bfaf3d0d2ec52 100644 --- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialog.kt +++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialog.kt @@ -62,8 +62,8 @@ class ScreenRecordPermissionDialog( private lateinit var options: Spinner override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setDialogTitle(R.string.screenrecord_start_label) - setStartButtonText(R.string.screenrecord_start_recording) + setDialogTitle(R.string.screenrecord_permission_dialog_title) + setStartButtonText(R.string.screenrecord_permission_dialog_continue) setStartButtonOnClickListener { v: View? -> onStartRecordingClicked?.run() if (selectedScreenShareOption.mode == ENTIRE_SCREEN) { @@ -186,13 +186,13 @@ class ScreenRecordPermissionDialog( return listOf( ScreenShareOption( ENTIRE_SCREEN, - R.string.screenrecord_option_entire_screen, - R.string.screenrecord_warning_entire_screen + R.string.screen_share_permission_dialog_option_entire_screen, + R.string.screenrecord_permission_dialog_warning_entire_screen ), ScreenShareOption( SINGLE_APP, - R.string.screenrecord_option_single_app, - R.string.screenrecord_warning_single_app + R.string.screen_share_permission_dialog_option_single_app, + R.string.screenrecord_permission_dialog_warning_single_app ) ) }