mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-04 16:11:11 +01:00
terminalview: add contentDescription to the view so accessibility
services can get the text currently being shown.
This commit is contained in:
parent
2b6a10712b
commit
35a9101f84
1 changed files with 5 additions and 0 deletions
|
|
@ -761,6 +761,7 @@ public final class TerminalView extends View {
|
||||||
if (mEmulator == null) {
|
if (mEmulator == null) {
|
||||||
canvas.drawColor(0XFF000000);
|
canvas.drawColor(0XFF000000);
|
||||||
} else {
|
} else {
|
||||||
|
setContentDescription(getText());
|
||||||
mRenderer.render(mEmulator, canvas, mTopRow, mSelY1, mSelY2, mSelX1, mSelX2);
|
mRenderer.render(mEmulator, canvas, mTopRow, mSelY1, mSelY2, mSelX1, mSelX2);
|
||||||
|
|
||||||
if (mIsSelectingText) {
|
if (mIsSelectingText) {
|
||||||
|
|
@ -915,4 +916,8 @@ public final class TerminalView extends View {
|
||||||
return mTermSession;
|
return mTermSession;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private CharSequence getText() {
|
||||||
|
return mEmulator.getScreen().getSelectedText(0, mTopRow, mEmulator.mColumns, mTopRow +mEmulator.mRows);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue