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 @@ -122,4 +122,6 @@ <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> </resources> packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionContentManager.kt +6 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ class ScreenRecordPermissionContentManager( private lateinit var audioSwitch: Switch private lateinit var lowQualitySwitch: Switch private lateinit var longerDurationSwitch: Switch private lateinit var skipTimeSwitch: Switch private lateinit var tapsView: View private lateinit var options: Spinner Loading Loading @@ -156,6 +157,7 @@ class ScreenRecordPermissionContentManager( tapsSwitch = containerView.requireViewById(R.id.screenrecord_taps_switch) lowQualitySwitch = containerView.requireViewById(R.id.screenrecord_lowquality_switch) longerDurationSwitch = containerView.requireViewById(R.id.screenrecord_longer_timeout_switch) skipTimeSwitch = containerView.requireViewById(R.id.screenrecord_skip_time_switch) tapsView = containerView.requireViewById(R.id.show_taps) updateTapsViewVisibility() Loading @@ -166,6 +168,7 @@ class ScreenRecordPermissionContentManager( 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 = containerView.requireViewById(R.id.screen_recording_options) val a: ArrayAdapter<*> = Loading Loading @@ -245,7 +248,8 @@ class ScreenRecordPermissionContentManager( 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 Loading @@ -273,6 +277,7 @@ class ScreenRecordPermissionContentManager( ) private const val DELAY_MS: Long = 3000 private const val NO_DELAY: Long = 100 private const val INTERVAL_MS: Long = 1000 fun createOptionList(displayManager: DisplayManager): List<ScreenShareOption> { Loading 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 @@ -122,4 +122,6 @@ <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> </resources>
packages/SystemUI/src/com/android/systemui/screenrecord/ScreenRecordPermissionContentManager.kt +6 −1 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ class ScreenRecordPermissionContentManager( private lateinit var audioSwitch: Switch private lateinit var lowQualitySwitch: Switch private lateinit var longerDurationSwitch: Switch private lateinit var skipTimeSwitch: Switch private lateinit var tapsView: View private lateinit var options: Spinner Loading Loading @@ -156,6 +157,7 @@ class ScreenRecordPermissionContentManager( tapsSwitch = containerView.requireViewById(R.id.screenrecord_taps_switch) lowQualitySwitch = containerView.requireViewById(R.id.screenrecord_lowquality_switch) longerDurationSwitch = containerView.requireViewById(R.id.screenrecord_longer_timeout_switch) skipTimeSwitch = containerView.requireViewById(R.id.screenrecord_skip_time_switch) tapsView = containerView.requireViewById(R.id.show_taps) updateTapsViewVisibility() Loading @@ -166,6 +168,7 @@ class ScreenRecordPermissionContentManager( 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 = containerView.requireViewById(R.id.screen_recording_options) val a: ArrayAdapter<*> = Loading Loading @@ -245,7 +248,8 @@ class ScreenRecordPermissionContentManager( 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 Loading @@ -273,6 +277,7 @@ class ScreenRecordPermissionContentManager( ) private const val DELAY_MS: Long = 3000 private const val NO_DELAY: Long = 100 private const val INTERVAL_MS: Long = 1000 fun createOptionList(displayManager: DisplayManager): List<ScreenShareOption> { Loading