Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ Versions after 2.17 are `MAJOR.MINOR.PATCH` (2.17 is followed by 2.17.1 or 2.18.
`docs/testing.md`, "Versions and releases"); the headings below keep the numbers as they
were released.

## 2.24.1 — 2026-11-17

- The snapshot's note in a black cell is shorter and on two lines ("black in the copy:" / "a
dark picture, or video this device cannot copy"): in 2.24.0 one line was cut off in a 2×2
grid.

## 2.24.0 — 2026-11-17

- **Network** has a **Web page password** (the last field, empty by default): when set, the page
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ android {
applicationId "com.openipc.decoder"
minSdk 21
targetSdk 36
versionCode 57
versionName "2.24.0"
versionCode 58
versionName "2.24.1"
// Keep only these locales of the libraries' resources, as in the other OpenIPC apps
resourceConfigurations += ['en', 'ru', 'zh-rCN']

Expand Down
21 changes: 13 additions & 8 deletions android/app/src/main/java/com/openipc/decoder/Snapshots.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ static byte[] render(List<Cell> cells, int side, int width, boolean labels) {
}

/** Said in a cell whose copy came out black. */
static final String NOT_COPIED =
"black in the copy: a dark picture, or video this device does not let be copied";
static final String[] NOT_COPIED = {
"black in the copy:", "a dark picture, or video this device cannot copy"};

/**
* Whether a copied frame is black all over: at least 98 % of a sample of its pixels darker
Expand Down Expand Up @@ -236,15 +236,20 @@ static boolean dark(int argb) {
return ((argb >> 16) & 0xFF) <= 8 && ((argb >> 8) & 0xFF) <= 8 && (argb & 0xFF) <= 8;
}

private static void drawNote(Canvas canvas, String note, int x, int y, int cw, int ch,
/** Lines centred in the cell, smaller than a label (a sentence), each cut to the cell. */
private static void drawNote(Canvas canvas, String[] note, int x, int y, int cw, int ch,
TextPaint text) {
float size = text.getTextSize();
text.setTextSize(Math.max(12, size * 0.6f)); // a sentence, not a label
String line = TextUtils.ellipsize(note, text, cw - 8, TextUtils.TruncateAt.END).toString();
text.setTextSize(Math.max(12, size * 0.6f));
text.setColor(0xFFB0B0B0);
float w = text.measureText(line);
canvas.drawText(line, x + Math.max(4, (cw - w) / 2), y + (ch + text.getTextSize()) / 2f,
text);
float lineH = text.getTextSize() * 1.3f;
float top = y + (ch - lineH * note.length) / 2f + text.getTextSize();
for (int i = 0; i < note.length; i++) {
String line = TextUtils.ellipsize(note[i], text, cw - 8,
TextUtils.TruncateAt.END).toString();
float w = text.measureText(line);
canvas.drawText(line, x + Math.max(4, (cw - w) / 2), top + i * lineH, text);
}
text.setTextSize(size);
}

Expand Down
2 changes: 1 addition & 1 deletion docs/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The device's addresses are in `addresses` of `/stats.json`, and the [U cell](usa

A JPEG laid out like the screen, at the screen's resolution (at most 1920 wide, at least 640), made from the frames the app shows now. A cell without video is black with its status. With labels (the default) the text of each cell is drawn in; `?labels=0` gives the frames only, which is what the page uses. It is taken only when asked for and reused for 1 s, so several viewers cost one capture. `503` when there is nothing to show. Needs Android 7.0+ (PixelCopy).

A device may show some cells on a hardware video plane that no copy can read (on the SberBox, Amlogic, two of four cells, which two is up to the device; `adb shell screencap` sees them black too). Such a cell, live on the screen but black in the copy, says *black in the copy: a dark picture, or video this device does not let be copied*, labels or not.
A device may show some cells on a hardware video plane that no copy can read (on the SberBox, Amlogic, two of four cells, which two is up to the device; `adb shell screencap` sees them black too). Such a cell, live on the screen but black in the copy, says *black in the copy: a dark picture, or video this device cannot copy* (two lines), labels or not.

## Stream checks in the single view

Expand Down
Loading