diff options
Diffstat (limited to 'app/src/main/res')
| -rw-r--r-- | app/src/main/res/drawable/ic_launcher_foreground.xml | 13 | ||||
| -rw-r--r-- | app/src/main/res/drawable/ic_settings.xml | 10 | ||||
| -rw-r--r-- | app/src/main/res/layout/device_row.xml | 28 | ||||
| -rw-r--r-- | app/src/main/res/layout/licenses.xml | 20 | ||||
| -rw-r--r-- | app/src/main/res/layout/main.xml | 264 | ||||
| -rw-r--r-- | app/src/main/res/layout/mirror.xml | 46 | ||||
| -rw-r--r-- | app/src/main/res/layout/settings.xml | 60 | ||||
| -rw-r--r-- | app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 5 | ||||
| -rw-r--r-- | app/src/main/res/values/ids.xml | 10 | ||||
| -rw-r--r-- | app/src/main/res/values/strings.xml | 40 | ||||
| -rw-r--r-- | app/src/main/res/values/styles.xml | 2 | ||||
| -rw-r--r-- | app/src/main/res/xml/data_extraction_rules.xml | 14 |
12 files changed, 305 insertions, 207 deletions
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml index e5b7400..ba62f39 100644 --- a/app/src/main/res/drawable/ic_launcher_foreground.xml +++ b/app/src/main/res/drawable/ic_launcher_foreground.xml @@ -1,16 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Foreground: a fresh take on wireless screen mirroring. - 1. A small phone (source) and a larger phone (target display). - 2. Cyan wireless arcs rising from the small phone toward the large - one - the wireless ADB link / casting direction. - 3. A play triangle on the large screen - references scrcpy's - upstream identity ("playing what the device is showing"). - Geometry mirrors the AI-generated reference 1:1. The arcs carry the - one accent colour; everything else is the light foreground tone. - For the Android 13+ themed (monochrome) icon the same drawable is - reused: the system tints by coverage, so the colours here are - irrelevant in that mode. Adaptive viewport is 108x108; all content - stays inside the inner safe zone. --> +<!-- Wireless screen-mirroring glyph for the adaptive launcher icon. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="108dp" android:height="108dp" diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml index 696f6c2..9e50804 100644 --- a/app/src/main/res/drawable/ic_settings.xml +++ b/app/src/main/res/drawable/ic_settings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Gear glyph for the Settings action in the Main header. --> +<!-- Sliders glyph for the Settings action in the Main header. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" @@ -7,6 +7,12 @@ android:viewportHeight="24" android:tint="@color/on_surface_muted"> <path + android:fillColor="@android:color/transparent" + android:strokeColor="#FFFFFF" + android:strokeLineCap="round" + android:strokeWidth="2" + android:pathData="M4,7h16M4,12h16M4,17h16"/> + <path android:fillColor="#FFFFFF" - android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94l-0.36,-2.54c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41l-0.36,2.54c-0.59,0.24 -1.13,0.57 -1.62,0.94l-2.39,-0.96c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.82,11.69 4.82,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/> + android:pathData="M8,5a2,2 0,1 0,0 4a2,2 0,1 0,0 -4M16,10a2,2 0,1 0,0 4a2,2 0,1 0,0 -4M10,15a2,2 0,1 0,0 4a2,2 0,1 0,0 -4"/> </vector> diff --git a/app/src/main/res/layout/device_row.xml b/app/src/main/res/layout/device_row.xml index f06ab20..0471639 100644 --- a/app/src/main/res/layout/device_row.xml +++ b/app/src/main/res/layout/device_row.xml @@ -1,28 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Saved-device row: phone glyph + "host:port" label, with the platform - touch ripple. Bound by an ArrayAdapter via R.id.device_label. --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<!-- Saved-device row with a platform touch ripple. --> +<TextView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/device_label" + style="@style/DeviceLabel" android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" android:gravity="center_vertical" android:minHeight="56dp" android:paddingHorizontal="@dimen/space_sm" android:paddingVertical="@dimen/space_md" - android:background="?android:attr/selectableItemBackground"> - - <ImageView - android:layout_width="24dp" - android:layout_height="24dp" - android:src="@drawable/ic_device" - android:contentDescription="@null"/> - - <TextView - android:id="@+id/device_label" - style="@style/DeviceLabel" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - android:layout_marginStart="@dimen/space_md"/> - -</LinearLayout> + android:drawableStart="@drawable/ic_device" + android:drawablePadding="@dimen/space_md" + android:foreground="?android:attr/selectableItemBackground"/> diff --git a/app/src/main/res/layout/licenses.xml b/app/src/main/res/layout/licenses.xml new file mode 100644 index 0000000..6ca02ab --- /dev/null +++ b/app/src/main/res/layout/licenses.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Plain scrolling text. The notices are wrapped at 78 columns in the + asset, so they are shown in a monospace face at a size that does not + re-wrap them into nonsense. --> +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/root" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="@dimen/space_lg"> + + <TextView + android:id="@+id/notices" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textColor="@color/on_surface" + android:textSize="12sp" + android:fontFamily="monospace" + android:textIsSelectable="true"/> + +</ScrollView> diff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml index 0b1273b..15b1c90 100644 --- a/app/src/main/res/layout/main.xml +++ b/app/src/main/res/layout/main.xml @@ -1,161 +1,177 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Root padding is the base; Ui.padForInsets() adds the system bar and +<!-- One scroll for the whole page. The saved-device rows are built into + the LinearLayout below rather than a ListView, because a ListView + inside a ScrollView cannot measure itself and splitting the screen + into two independently scrolling halves left one of them unusable at + some sizes. The list is a handful of rows; it does not need + recycling. + + Root padding is the base; Ui.padForInsets() adds the system bar and IME insets to it at runtime (the window is edge-to-edge). --> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical" + android:fillViewport="true" android:padding="@dimen/space_lg"> - <!-- Header: app glyph + name, Settings on the right. --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:orientation="horizontal" - android:gravity="center_vertical" - android:layout_marginBottom="@dimen/space_lg"> + android:orientation="vertical"> - <ImageView - android:layout_width="40dp" - android:layout_height="40dp" - android:src="@drawable/ic_launcher_foreground" - android:scaleType="fitCenter" - android:contentDescription="@null"/> - - <TextView - android:layout_width="0dp" + <!-- Header: app glyph + name, Settings on the right. --> + <LinearLayout + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:layout_marginStart="@dimen/space_sm" - android:text="@string/app_name" - android:textColor="@color/on_surface" - android:textSize="22sp" - android:textStyle="bold"/> - - <ImageButton - android:id="@+id/settings" - android:layout_width="48dp" - android:layout_height="48dp" - android:src="@drawable/ic_settings" - android:scaleType="centerInside" - android:background="?android:attr/selectableItemBackgroundBorderless" - android:contentDescription="@string/settings"/> - - </LinearLayout> - - <!-- Pairing form. Each field is one value the target already prints, - copied verbatim: the Wireless debugging screen shows the device - address as a single "ip:port" string, and the pairing dialog adds - its own port plus the code. --> - <LinearLayout - style="@style/Card" - android:layout_width="match_parent" - android:layout_height="wrap_content"> + android:orientation="horizontal" + android:gravity="center_vertical" + android:layout_marginBottom="@dimen/space_lg"> - <TextView - style="@style/SectionHeader" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/pair_a_device"/> + <ImageView + android:layout_width="40dp" + android:layout_height="40dp" + android:src="@drawable/ic_launcher_foreground" + android:scaleType="fitCenter" + android:contentDescription="@null"/> - <TextView - style="@style/Caption" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/pair_help"/> + <TextView + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginStart="@dimen/space_sm" + android:text="@string/app_name" + android:textColor="@color/on_surface" + android:textSize="22sp" + android:textStyle="bold"/> + + <ImageButton + android:id="@+id/settings" + android:layout_width="48dp" + android:layout_height="48dp" + android:src="@drawable/ic_settings" + android:scaleType="centerInside" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:contentDescription="@string/settings"/> - <TextView - style="@style/FieldLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/label_address"/> + </LinearLayout> - <TextView - style="@style/Caption" + <!-- Pairing form. Each field is one value the target already + prints, copied verbatim: the Wireless debugging screen shows + the device address as a single "ip:port" string, and the + pairing dialog adds its own port plus the code. --> + <LinearLayout + style="@style/Card" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sub_address"/> + android:layout_height="wrap_content"> - <EditText - android:id="@+id/device_address" - style="@style/Field" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/space_xs" - android:hint="@string/address_hint" - android:inputType="textUri" - android:autofillHints="postalAddress"/> + <TextView + style="@style/SectionHeader" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/pair_a_device"/> - <TextView - style="@style/FieldLabel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/label_pairing"/> + <TextView + style="@style/Caption" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/pair_help"/> - <TextView - style="@style/Caption" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sub_pairing"/> + <TextView + style="@style/FieldLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/label_address"/> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:layout_marginTop="@dimen/space_xs"> + <TextView + style="@style/Caption" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/sub_address"/> <EditText - android:id="@+id/pair_port" + android:id="@+id/device_address" style="@style/Field" - android:layout_width="0dp" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:layout_marginEnd="@dimen/space_sm" - android:hint="@string/pair_port_hint" - android:inputType="number" - android:autofillHints="off"/> + android:layout_marginTop="@dimen/space_xs" + android:hint="@string/address_hint" + android:inputType="textUri" + android:importantForAutofill="no"/> + + <TextView + style="@style/FieldLabel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="@string/label_pairing"/> - <EditText - android:id="@+id/pair_code" - style="@style/Field" - android:layout_width="0dp" + <TextView + style="@style/Caption" + android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:hint="@string/pair_code_hint" - android:inputType="numberPassword" - android:maxLength="6" - android:autofillHints="off"/> + android:text="@string/sub_pairing"/> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:layout_marginTop="@dimen/space_xs"> + + <EditText + android:id="@+id/pair_port" + style="@style/Field" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:layout_marginEnd="@dimen/space_sm" + android:hint="@string/pair_port_hint" + android:inputType="number" + android:importantForAutofill="no"/> + + <EditText + android:id="@+id/pair_code" + style="@style/Field" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1" + android:hint="@string/pair_code_hint" + android:inputType="numberPassword" + android:maxLength="6" + android:importantForAutofill="no"/> + + </LinearLayout> + + <TextView + style="@style/Caption" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/space_md" + android:text="@string/network_trust"/> + + <Button + android:id="@+id/pair" + style="@style/Button.Primary" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/space_lg" + android:text="@string/pair_and_save"/> </LinearLayout> - <Button - android:id="@+id/pair" - style="@style/Button.Primary" + <TextView + style="@style/SectionHeader" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/space_lg" - android:text="@string/pair_and_save"/> - - </LinearLayout> + android:text="@string/saved_devices"/> - <TextView - style="@style/SectionHeader" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/saved_devices"/> - - <FrameLayout - android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1"> - - <ListView + <LinearLayout android:id="@+id/devices" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" android:divider="@color/stroke" - android:dividerHeight="1dp"/> + android:showDividers="middle" + android:dividerPadding="0dp"/> <TextView android:id="@+id/devices_empty" @@ -166,6 +182,6 @@ android:paddingTop="@dimen/space_xl" android:text="@string/no_devices_yet"/> - </FrameLayout> + </LinearLayout> -</LinearLayout> +</ScrollView> diff --git a/app/src/main/res/layout/mirror.xml b/app/src/main/res/layout/mirror.xml index cf24e11..d2355a8 100644 --- a/app/src/main/res/layout/mirror.xml +++ b/app/src/main/res/layout/mirror.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Release Mirror layout: SurfaceView for the video pipeline plus a - floating top status pill with Record and a Reconnect button (visible - only when the session is in DISCONNECTED state). The debug layout - under src/debug/res/layout/mirror.xml shadows this with a TextureView - and extra stats overlay used by the e2e screen capture. --> +<!-- Video surface with optional target navigation and reconnect controls. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="#000000"> + tools:ignore="MergeRootFrame"> + <!-- Sized at runtime to the target's aspect ratio and centred, so the + black FrameLayout behind it shows as letterbox bars. --> <SurfaceView android:id="@+id/surface" android:layout_width="match_parent" @@ -39,16 +39,42 @@ android:ellipsize="end" android:text="@string/connecting"/> + + <Button + android:id="@+id/nav_back" + style="@style/Button.Secondary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/space_sm" + android:minWidth="0dp" + android:minHeight="@dimen/touch_min" + android:paddingHorizontal="@dimen/space_md" + android:paddingVertical="@dimen/space_xs" + android:text="@string/nav_back"/> + + <Button + android:id="@+id/nav_home" + style="@style/Button.Secondary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/space_sm" + android:minWidth="0dp" + android:minHeight="@dimen/touch_min" + android:paddingHorizontal="@dimen/space_md" + android:paddingVertical="@dimen/space_xs" + android:text="@string/nav_home"/> + <Button - android:id="@+id/record" + android:id="@+id/nav_recents" style="@style/Button.Secondary" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/space_sm" - android:minHeight="0dp" + android:minWidth="0dp" + android:minHeight="@dimen/touch_min" android:paddingHorizontal="@dimen/space_md" android:paddingVertical="@dimen/space_xs" - android:text="@string/record"/> + android:text="@string/nav_recents"/> <Button android:id="@+id/reconnect" @@ -56,7 +82,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/space_sm" - android:minHeight="0dp" + android:minHeight="@dimen/touch_min" android:paddingHorizontal="@dimen/space_md" android:paddingVertical="@dimen/space_xs" android:text="@string/reconnect" diff --git a/app/src/main/res/layout/settings.xml b/app/src/main/res/layout/settings.xml index 76f706b..aa2f117 100644 --- a/app/src/main/res/layout/settings.xml +++ b/app/src/main/res/layout/settings.xml @@ -51,21 +51,21 @@ style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="H.264 (default)"/> + android:text="@string/video_h264"/> <RadioButton android:id="@+id/video_h265" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="H.265"/> + android:text="@string/video_h265"/> <RadioButton android:id="@+id/video_av1" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="AV1 (requires target Android 14+)"/> + android:text="@string/video_av1"/> </RadioGroup> @@ -93,14 +93,14 @@ style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Raw PCM (1.5 Mbps, default)"/> + android:text="@string/audio_raw"/> <RadioButton android:id="@+id/audio_opus" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Opus (~128 kbps)"/> + android:text="@string/audio_opus"/> </RadioGroup> @@ -128,42 +128,42 @@ style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Original (default)"/> + android:text="@string/max_size_original"/> <RadioButton android:id="@+id/max_size_480" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="480"/> + android:text="@string/max_size_480"/> <RadioButton android:id="@+id/max_size_720" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="720"/> + android:text="@string/max_size_720"/> <RadioButton android:id="@+id/max_size_1080" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="1080"/> + android:text="@string/max_size_1080"/> <RadioButton android:id="@+id/max_size_1440" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="1440"/> + android:text="@string/max_size_1440"/> <RadioButton android:id="@+id/max_size_2160" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="2160"/> + android:text="@string/max_size_2160"/> </RadioGroup> @@ -191,35 +191,35 @@ style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="1 Mbps"/> + android:text="@string/bit_rate_1m"/> <RadioButton android:id="@+id/bit_rate_2m" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="2 Mbps"/> + android:text="@string/bit_rate_2m"/> <RadioButton android:id="@+id/bit_rate_4m" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="4 Mbps"/> + android:text="@string/bit_rate_4m"/> <RadioButton android:id="@+id/bit_rate_8m" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="8 Mbps (default)"/> + android:text="@string/bit_rate_8m"/> <RadioButton android:id="@+id/bit_rate_16m" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="16 Mbps"/> + android:text="@string/bit_rate_16m"/> </RadioGroup> @@ -247,35 +247,35 @@ style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Unlimited (default)"/> + android:text="@string/max_fps_unlimited"/> <RadioButton android:id="@+id/max_fps_30" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="30"/> + android:text="@string/max_fps_30"/> <RadioButton android:id="@+id/max_fps_60" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="60"/> + android:text="@string/max_fps_60"/> <RadioButton android:id="@+id/max_fps_90" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="90"/> + android:text="@string/max_fps_90"/> <RadioButton android:id="@+id/max_fps_120" style="@style/RadioOption" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="120"/> + android:text="@string/max_fps_120"/> </RadioGroup> @@ -294,6 +294,13 @@ android:text="@string/display"/> <CheckBox + android:id="@+id/clipboard_sync" + style="@style/RadioOption" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/clipboard_sync"/> + + <CheckBox android:id="@+id/show_status_bar" style="@style/RadioOption" android:layout_width="match_parent" @@ -302,6 +309,17 @@ </LinearLayout> + <!-- Required, not decorative: the bundled SPAKE2 library is + LGPL-3.0 and the combined work has to give the user prominent + notice of that and of where to get the source. --> + <Button + android:id="@+id/licenses" + style="@style/Button.Secondary" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/space_lg" + android:text="@string/licenses"/> + </LinearLayout> </ScrollView> diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index 93542a7..9378d4c 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> +<!-- Adaptive icons require a version-qualified resource directory. --> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + tools:ignore="ObsoleteSdkInt"> <background android:drawable="@drawable/ic_launcher_background"/> <foreground android:drawable="@drawable/ic_launcher_foreground"/> <monochrome android:drawable="@drawable/ic_launcher_foreground"/> diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml deleted file mode 100644 index f551102..0000000 --- a/app/src/main/res/values/ids.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- IDs referenced from Mirror.java that live only in the debug - layout (src/debug/res/layout/mirror.xml). Declaring them here - means R.id.* is stable across both build types; findViewById - returns null in release where the views are absent. --> -<resources> - <item name="overlay_target" type="id"/> - <item name="overlay_stats" type="id"/> - <item name="overlay_event" type="id"/> -</resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d7c45ac..9b7e03b 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<resources> +<resources xmlns:tools="http://schemas.android.com/tools"> <string name="app_name">scrcpy</string> <string name="address_hint">192.168.1.42:41234</string> <string name="pair_port_hint">37123</string> @@ -12,26 +12,56 @@ <string name="bad_address">Enter the device address as 192.168.1.42:41234</string> <string name="bad_pair_port">Pairing port must be a number from 1 to 65535</string> <string name="bad_pair_code">Enter the 6-digit pairing code</string> + <string name="device_not_paired">This target is not paired. Pair it again from the device list.</string> + <string name="device_list_unreadable">The paired-device list could not be read; it was left unchanged.</string> + <string name="network_trust">Use only on a network you trust, or over a VPN. ADB cannot verify the target\'s identity, so anything answering this address could receive what you type.</string> <string name="pair_and_save">Pair and save</string> <string name="pair_a_device">Pair a device</string> <string name="saved_devices">Saved devices</string> <string name="notif_session_active">Mirroring active</string> <string name="settings">Settings</string> + <string name="licenses">Open-source licenses</string> + <string name="licenses_unavailable">Notices unavailable.</string> <string name="video_codec">Video codec</string> <string name="audio_codec">Audio codec</string> + <string name="video_h264">H.264 (default)</string> + <string name="video_h265">H.265</string> + <string name="video_av1" tools:ignore="Typos">AV1 (target Android 14+)</string> + <string name="audio_raw">Raw PCM (1.5 Mbps)</string> + <string name="audio_opus">Opus (~128 kbps, default)</string> <string name="forget_device">Forget device?</string> <string name="max_size">Max size (long edge, px)</string> + <string name="max_size_original">Original</string> + <string name="max_size_480">480</string> + <string name="max_size_720">720</string> + <string name="max_size_1080">1080 (default)</string> + <string name="max_size_1440">1440</string> + <string name="max_size_2160">2160</string> <string name="video_bit_rate">Video bit rate</string> + <string name="bit_rate_1m">1 Mbps</string> + <string name="bit_rate_2m">2 Mbps</string> + <string name="bit_rate_4m">4 Mbps (default)</string> + <string name="bit_rate_8m">8 Mbps</string> + <string name="bit_rate_16m">16 Mbps</string> <string name="max_fps">Max fps</string> + <string name="max_fps_unlimited">Unlimited (default)</string> + <string name="max_fps_30">30</string> + <string name="max_fps_60">60</string> + <string name="max_fps_90">90</string> + <string name="max_fps_120">120</string> <string name="reconnect">Reconnect</string> + <string name="nav_back">Back</string> + <string name="nav_home">Home</string> + <string name="nav_recents">Recents</string> <string name="connecting">connecting…</string> <string name="disconnected">disconnected</string> - <string name="record">Record</string> - <string name="record_on">Stop recording</string> - <string name="hint_long_press_back">Long-press Back to send it to the target device.</string> + <string name="session_error">Session error: %1$s</string> + <string name="session_stop_timeout">The old session did not stop. Reconnect was cancelled.</string> + <string name="hint_back">Back goes to the target. Press Back twice to leave. Home and Recents are in the bar above.</string> <string name="pairing">Pairing…</string> <string name="settings_apply_on_reconnect">Changes apply on the next connection.</string> <string name="display">Display</string> - <string name="show_status_bar">Show status bar (IP, resolution, Record) while mirroring</string> + <string name="clipboard_sync">Sync clipboard with the target</string> + <string name="show_status_bar">Show status bar (IP and resolution) while mirroring</string> <string name="no_devices_yet">No devices paired yet - fill the fields above and tap Pair.</string> </resources> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index d0b07ac..6e81bf1 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -45,7 +45,7 @@ <item name="android:textSize">15sp</item> <item name="android:paddingTop">@dimen/space_sm</item> <item name="android:paddingBottom">@dimen/space_sm</item> - <item name="android:minHeight">44dp</item> + <item name="android:minHeight">@dimen/touch_min</item> </style> <style name="Note"> diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 0000000..54630d1 --- /dev/null +++ b/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- The app's private files hold the ADB private key and the list of + paired targets. Neither may leave this device: allowBackup="false" + already blocks cloud backup, but Android 12's device-to-device + transfer is a separate path and would otherwise clone an identity + the target has authorised onto another phone. --> +<data-extraction-rules> + <cloud-backup> + <exclude domain="root"/> + </cloud-backup> + <device-transfer> + <exclude domain="root"/> + </device-transfer> +</data-extraction-rules> |