mirror of https://github.com/termux/termux-app
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
|
@ -761,6 +761,7 @@ public final class TerminalView extends View {
|
|||
if (mEmulator == null) {
|
||||
canvas.drawColor(0XFF000000);
|
||||
} else {
|
||||
setContentDescription(getText());
|
||||
mRenderer.render(mEmulator, canvas, mTopRow, mSelY1, mSelY2, mSelX1, mSelX2);
|
||||
|
||||
if (mIsSelectingText) {
|
||||
|
@ -915,4 +916,8 @@ public final class TerminalView extends View {
|
|||
return mTermSession;
|
||||
}
|
||||
|
||||
private CharSequence getText() {
|
||||
return mEmulator.getScreen().getSelectedText(0, mTopRow, mEmulator.mColumns, mTopRow +mEmulator.mRows);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue