Loading packages/SystemUI/res/drawable/ic_sr_clock.xml 0 → 100644 +10 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="@android:color/white" android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM12.5,7L11,7v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z"/> </vector> packages/SystemUI/res/layout/screen_record_options.xml +47 −0 Original line number Diff line number Diff line Loading @@ -179,4 +179,51 @@ style="@style/ScreenRecord.Switch" android:importantForAccessibility="yes" /> </LinearLayout> <LinearLayout android:id="@+id/show_skip_time" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical" android:layout_marginTop="@dimen/screenrecord_option_padding"> <ImageView android:layout_width="@dimen/screenrecord_option_icon_size" android:layout_height="@dimen/screenrecord_option_icon_size" android:src="@drawable/ic_sr_clock" android:tint="?android:attr/textColorSecondary" android:layout_marginRight="@dimen/screenrecord_option_padding" android:importantForAccessibility="no"/> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:minHeight="48dp" android:layout_weight="1" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:fontFamily="@*android:string/config_bodyFontFamily" android:text="@string/screenrecord_skip_time_label" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="?android:attr/textColorPrimary" android:contentDescription="@string/screenrecord_skip_time_label"/> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:importantForAccessibility="no" android:fontFamily="@*android:string/config_bodyFontFamily" android:text="@string/screenrecord_skip_time_summary" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:textColorSecondary"/> </LinearLayout> <Switch android:layout_width="wrap_content" android:minWidth="48dp" android:layout_height="48dp" android:id="@+id/screenrecord_skip_time_switch" android:contentDescription="@string/screenrecord_skip_time_label" style="@style/ScreenRecord.Switch" android:importantForAccessibility="yes" /> </LinearLayout> </LinearLayout> No newline at end of file packages/SystemUI/res/values/cm_strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,8 @@ <string name="screenrecord_lowquality_summary">For smaller file size</string> <string name="screenrecord_longer_timeout_switch_label">Larger file size limit</string> <string name="screenrecord_longer_timeout_switch_summary">Limit recording size to 15 GB</string> <string name="screenrecord_skip_time_label">Skip timer</string> <string name="screenrecord_skip_time_summary">Remove the 3 second wait</string> <!-- Channel name for Battery notifications --> <string name="battery_notification_channel_tv">Battery warning</string> Loading packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegate.kt +6 −1 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ class ScreenRecordPermissionDialogDelegate( private lateinit var audioSwitch: Switch private lateinit var lowQualitySwitch: Switch private lateinit var longerDurationSwitch: Switch private lateinit var skipTimeSwitch: Switch private lateinit var options: Spinner override fun createViewBinder(): BaseMediaProjectionPermissionViewBinder { Loading Loading @@ -182,6 +183,7 @@ class ScreenRecordPermissionDialogDelegate( tapsSwitch = dialog.requireViewById(R.id.screenrecord_taps_switch) lowQualitySwitch = dialog.requireViewById(R.id.screenrecord_lowquality_switch) longerDurationSwitch = dialog.requireViewById(R.id.screenrecord_longer_timeout_switch) skipTimeSwitch = dialog.requireViewById(R.id.screenrecord_skip_time_switch) // Add these listeners so that the switch only responds to movement // within its target region, to meet accessibility requirements Loading @@ -189,6 +191,7 @@ class ScreenRecordPermissionDialogDelegate( tapsSwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE } lowQualitySwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE } longerDurationSwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE } skipTimeSwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE } options = dialog.requireViewById(R.id.screen_recording_options) val a: ArrayAdapter<*> = Loading Loading @@ -257,7 +260,8 @@ class ScreenRecordPermissionDialogDelegate( RecordingService.getStopIntent(userContext), PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE, ) controller.startCountdown(DELAY_MS, INTERVAL_MS, startIntent, stopIntent) controller.startCountdown(if (skipTimeSwitch.isChecked) NO_DELAY else DELAY_MS, INTERVAL_MS, startIntent, stopIntent) } private inner class CaptureTargetResultReceiver : Loading @@ -284,6 +288,7 @@ class ScreenRecordPermissionDialogDelegate( ScreenRecordingAudioSource.MIC_AND_INTERNAL, ) private const val DELAY_MS: Long = 3000 private const val NO_DELAY: Long = 100 private const val INTERVAL_MS: Long = 1000 } } Loading
packages/SystemUI/res/drawable/ic_sr_clock.xml 0 → 100644 +10 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="@android:color/white" android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM12.5,7L11,7v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z"/> </vector>
packages/SystemUI/res/layout/screen_record_options.xml +47 −0 Original line number Diff line number Diff line Loading @@ -179,4 +179,51 @@ style="@style/ScreenRecord.Switch" android:importantForAccessibility="yes" /> </LinearLayout> <LinearLayout android:id="@+id/show_skip_time" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:gravity="center_vertical" android:layout_marginTop="@dimen/screenrecord_option_padding"> <ImageView android:layout_width="@dimen/screenrecord_option_icon_size" android:layout_height="@dimen/screenrecord_option_icon_size" android:src="@drawable/ic_sr_clock" android:tint="?android:attr/textColorSecondary" android:layout_marginRight="@dimen/screenrecord_option_padding" android:importantForAccessibility="no"/> <LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:minHeight="48dp" android:layout_weight="1" android:orientation="vertical"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:fontFamily="@*android:string/config_bodyFontFamily" android:text="@string/screenrecord_skip_time_label" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="?android:attr/textColorPrimary" android:contentDescription="@string/screenrecord_skip_time_label"/> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:importantForAccessibility="no" android:fontFamily="@*android:string/config_bodyFontFamily" android:text="@string/screenrecord_skip_time_summary" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:textColorSecondary"/> </LinearLayout> <Switch android:layout_width="wrap_content" android:minWidth="48dp" android:layout_height="48dp" android:id="@+id/screenrecord_skip_time_switch" android:contentDescription="@string/screenrecord_skip_time_label" style="@style/ScreenRecord.Switch" android:importantForAccessibility="yes" /> </LinearLayout> </LinearLayout> No newline at end of file
packages/SystemUI/res/values/cm_strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,8 @@ <string name="screenrecord_lowquality_summary">For smaller file size</string> <string name="screenrecord_longer_timeout_switch_label">Larger file size limit</string> <string name="screenrecord_longer_timeout_switch_summary">Limit recording size to 15 GB</string> <string name="screenrecord_skip_time_label">Skip timer</string> <string name="screenrecord_skip_time_summary">Remove the 3 second wait</string> <!-- Channel name for Battery notifications --> <string name="battery_notification_channel_tv">Battery warning</string> Loading
packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionDialogDelegate.kt +6 −1 Original line number Diff line number Diff line Loading @@ -119,6 +119,7 @@ class ScreenRecordPermissionDialogDelegate( private lateinit var audioSwitch: Switch private lateinit var lowQualitySwitch: Switch private lateinit var longerDurationSwitch: Switch private lateinit var skipTimeSwitch: Switch private lateinit var options: Spinner override fun createViewBinder(): BaseMediaProjectionPermissionViewBinder { Loading Loading @@ -182,6 +183,7 @@ class ScreenRecordPermissionDialogDelegate( tapsSwitch = dialog.requireViewById(R.id.screenrecord_taps_switch) lowQualitySwitch = dialog.requireViewById(R.id.screenrecord_lowquality_switch) longerDurationSwitch = dialog.requireViewById(R.id.screenrecord_longer_timeout_switch) skipTimeSwitch = dialog.requireViewById(R.id.screenrecord_skip_time_switch) // Add these listeners so that the switch only responds to movement // within its target region, to meet accessibility requirements Loading @@ -189,6 +191,7 @@ class ScreenRecordPermissionDialogDelegate( tapsSwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE } lowQualitySwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE } longerDurationSwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE } skipTimeSwitch.setOnTouchListener { _, event -> event.action == ACTION_MOVE } options = dialog.requireViewById(R.id.screen_recording_options) val a: ArrayAdapter<*> = Loading Loading @@ -257,7 +260,8 @@ class ScreenRecordPermissionDialogDelegate( RecordingService.getStopIntent(userContext), PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE, ) controller.startCountdown(DELAY_MS, INTERVAL_MS, startIntent, stopIntent) controller.startCountdown(if (skipTimeSwitch.isChecked) NO_DELAY else DELAY_MS, INTERVAL_MS, startIntent, stopIntent) } private inner class CaptureTargetResultReceiver : Loading @@ -284,6 +288,7 @@ class ScreenRecordPermissionDialogDelegate( ScreenRecordingAudioSource.MIC_AND_INTERNAL, ) private const val DELAY_MS: Long = 3000 private const val NO_DELAY: Long = 100 private const val INTERVAL_MS: Long = 1000 } }