Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
26a27dc
Push to GitHub 2024-10-17
Oct 17, 2024
229212f
Push to GitHub 2026-03-18
Mar 19, 2026
1b5b38a
use Java 17 source/target
thestinger Nov 16, 2021
af8d34b
update Android gradle plugin, build tools and SDK
thestinger Mar 10, 2021
a88afee
add gradle wrapper
thestinger Mar 10, 2021
c5222c7
disable aborting on lint errors
thestinger Mar 10, 2021
02c1232
remove unused build script
PatrykMis Apr 13, 2026
f87193d
configure version information
PatrykMis Apr 13, 2026
fb04572
drop TfP from app name
thestinger Sep 14, 2021
d2fd7d1
set app label to TalkBack
PatrykMis Apr 13, 2026
02d536a
add GitHub dependabot and CI configuration
thestinger Nov 16, 2021
8b5c4db
avoid deprecated gradle functionality
PatrykMis Apr 13, 2026
01e0fff
Remove unused dependencies and module
PatrykMis Apr 13, 2026
b7faeee
Bump all dependencies
PatrykMis Apr 13, 2026
3484723
Polish translation improvements and fixes
PatrykMis Apr 13, 2026
6bca4d0
Remove network permission explicitly
PatrykMis Mar 12, 2024
68b023d
Interchange google() and mavenCentral()
PatrykMis Mar 24, 2024
a624f11
Drop not needed and not working functionalities
PatrykMis Apr 14, 2026
68211df
Security: update URLs to https
PatrykMis Apr 14, 2026
027ef40
Hide TOS and Privacy Policy since this app does not send data due to …
PatrykMis Apr 14, 2026
9206c46
Remove DynamicFeature stub
PatrykMis Mar 26, 2024
593b07a
Remove Wear flavor
PatrykMis Apr 14, 2026
03d490a
Remove not needed Play Core library
PatrykMis Mar 26, 2024
d5b9df5
Fix theming
PatrykMis Jun 13, 2024
0a2d126
Don't ship libraries for 32-bit ABIs
PatrykMis Jul 9, 2024
8f84d2d
make translation table zip reproducible
thestinger Jan 26, 2025
3e65d31
Replace javax.annotation.Nullable with Checker Framework
PatrykMis Apr 14, 2026
f956b85
remove use of __DATE__ and __TIME__
thestinger Jan 26, 2025
40ccc5f
chore: Fix layout overlap with status bar
althafvly Oct 31, 2025
f7889f1
Migrate to kotlin 2 and Compose Compiler plugin
PatrykMis Apr 14, 2026
bbc401b
Add missing dependencies
PatrykMis Apr 14, 2026
5e3324c
Remove unused AppDoctorReceiver from manifest
PatrykMis Apr 15, 2026
80a75a3
stub GoogleApiAvailabilityManager (always SERVICE_MISSING)
PatrykMis Apr 15, 2026
e1ba91d
Gemini/GeminEye: unconfigure due to no network permission and GMS int…
PatrykMis Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
target-branch: main
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
target-branch: main
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build application

on: [pull_request, push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: gradle
- name: Build with Gradle
run: ./gradlew build --no-daemon
11 changes: 11 additions & 0 deletions .github/workflows/validate-gradle-wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Validate Gradle Wrapper

on: [pull_request, push]

jobs:
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: gradle/actions/wrapper-validation@v6
4 changes: 4 additions & 0 deletions braille/brailledisplay/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
apply plugin: 'com.android.library'
apply from: "../../shared.gradle"

android {
namespace = "com.google.android.accessibility.braille.brailledisplay"
}

dependencies {
implementation project(':proguard')
implementation project(':utils')
Expand Down
4 changes: 0 additions & 4 deletions braille/brailledisplay/src/main/AndroidManifest.xml

This file was deleted.

30 changes: 17 additions & 13 deletions braille/brailledisplay/src/phone/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.accessibility.braille.brailledisplay">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-sdk
android:minSdkVersion="26"
Expand All @@ -24,19 +23,16 @@
android:name="com.google.android.accessibility.braille.brailledisplay.settings.BrailleDisplaySettingsActivity"
android:label="@string/bd_preferences_title"
android:theme="@style/BrailleSettingsTheme"
android:configChanges="orientation|screenSize"
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout"
android:exported="false"
android:launchMode="singleTop" >
<intent-filter>
<action android:name=".BrailleDisplayPreferencesActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity
android:name="com.google.android.accessibility.braille.brailledisplay.settings.BrailleGradeActivity"
android:label="@string/pref_preferred_braille_grade_title"
android:exported="true"
android:configChanges="keyboard|keyboardHidden"
android:theme="@style/BrailleSettingsTheme" >
<!-- TODO: Currently, braille grade is placed in braille display folder and share with braille keyboard. If we're going separate them into different settings. This intent filter can be removed. -->
<intent-filter>
Expand All @@ -48,40 +44,48 @@
<activity
android:name="com.google.android.accessibility.braille.brailledisplay.settings.KeyBindingsActivity"
android:label="@string/bd_preference_key_bindings_title"
android:configChanges="keyboard|keyboardHidden"
android:exported="false"
android:theme="@style/BrailleSettingsTheme" />

<activity
android:name="com.google.android.accessibility.braille.brailledisplay.settings.KeyBindingsCommandActivity"
android:exported="true"
android:configChanges="keyboard|keyboardHidden"
android:exported="false"
android:theme="@style/BrailleSettingsTheme" >
<intent-filter>
<action android:name=".KeyBindingsCommandActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity
android:name="com.google.android.accessibility.braille.brailledisplay.settings.BrailleElementsActivity"
android:label="@string/bd_preference_key_braille_elements_title"
android:configChanges="keyboard|keyboardHidden"
android:exported="false"
android:theme="@style/BrailleSettingsTheme" />

<activity
android:name="com.google.android.accessibility.braille.brailledisplay.settings.BrailleLearningModeActivity"
android:label="@string/bd_preference_key_learning_mode_title"
android:exported="false"
android:theme="@style/BrailleSettingsTheme" />

<activity
android:name="com.google.android.accessibility.braille.brailledisplay.BrailleDisplayImeUnavailableActivity"
android:configChanges="keyboard|keyboardHidden"
android:label="@string/bd_ime_unavailable_activity_name"
android:exported="false"
android:excludeFromRecents="true"
android:theme="@style/Theme.Transparent" />

<activity
android:name="com.google.android.accessibility.braille.brailledisplay.settings.AutoScrollActivity"
android:configChanges="keyboard|keyboardHidden"
android:label="@string/bd_preference_key_auto_scroll_title"
android:exported="false"
android:theme="@style/BrailleSettingsTheme" />

<activity
android:name="com.google.android.accessibility.braille.brailledisplay.settings.AdvancedSettingsActivity"
android:configChanges="keyboard|keyboardHidden"
android:label="@string/bd_preference_key_advanced_settings_title"
android:exported="false"
android:theme="@style/BrailleSettingsTheme" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
/*
* Copyright (C) 2023 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

package com.google.android.accessibility.braille.brailledisplay;

import android.accessibilityservice.AccessibilityService;
import android.view.KeyEvent;
import android.view.accessibility.AccessibilityEvent;
import com.google.android.accessibility.braille.brailledisplay.controller.BdController;
import com.google.android.accessibility.braille.brailledisplay.platform.BrailleDisplayManager;
import com.google.android.accessibility.braille.brltty.BrlttyEncoder;
import com.google.android.accessibility.braille.brltty.Encoder;
import com.google.android.accessibility.braille.common.BrailleCommonTalkBackSpeaker;
import com.google.android.accessibility.braille.interfaces.BrailleDisplayForBrailleIme;
import com.google.android.accessibility.braille.interfaces.BrailleDisplayForTalkBack;
import com.google.android.accessibility.braille.interfaces.BrailleImeForBrailleDisplay;
import com.google.android.accessibility.braille.interfaces.TalkBackForBrailleCommon;
import com.google.android.accessibility.braille.interfaces.TalkBackForBrailleDisplay;
import com.google.errorprone.annotations.CanIgnoreReturnValue;

/** Entry point between TalkBack and the braille display feature. */
public class BrailleDisplay implements BrailleDisplayForTalkBack, BrailleDisplayForBrailleIme {
private static final String TAG = "BrailleDisplay";
public static final Encoder.Factory ENCODER_FACTORY = new BrlttyEncoder.BrlttyFactory();

private boolean isRunning;
private BrailleDisplayManager brailleDisplayManager;
private final BdController controller;
Expand All @@ -29,13 +45,17 @@ public interface BrailleImeProvider {
public BrailleDisplay(
AccessibilityService accessibilityService,
TalkBackForBrailleDisplay talkBackForBrailleDisplay,
TalkBackForBrailleCommon talkBackForBrailleCommon,
BrailleImeProvider brailleImeProvider) {
this.controller =
new BdController(accessibilityService, talkBackForBrailleDisplay, brailleImeProvider);
new BdController(
accessibilityService,
talkBackForBrailleDisplay,
talkBackForBrailleCommon,
brailleImeProvider);
this.accessibilityService = accessibilityService;
this.brailleDisplayManager =
new BrailleDisplayManager(accessibilityService, controller, ENCODER_FACTORY);
BrailleDisplayTalkBackSpeaker.getInstance().initialize(talkBackForBrailleDisplay);
this.brailleDisplayManager = new BrailleDisplayManager(accessibilityService, controller);
BrailleCommonTalkBackSpeaker.getInstance().initialize(talkBackForBrailleCommon);
}

/** Starts braille display. */
Expand Down Expand Up @@ -65,33 +85,76 @@ public void onAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
}
}

@CanIgnoreReturnValue
@Override
public void onReadingControlChanged(CharSequence readingControlDescription) {
controller.onReadingControlChanged(readingControlDescription);
public boolean onKeyEvent(KeyEvent keyEvent) {
if (isRunning) {
return brailleDisplayManager.onKeyEvent(keyEvent);
}
return false;
}

@Override
public void onReadingControlSettingsChanged(CharSequence readingControlDescription) {
if (isRunning) {
controller.onReadingControlSettingsChanged(readingControlDescription);
}
}

@Override
public void onReadingControlValueChanged() {
if (isRunning) {
controller.onReadingControlValueChanged();
}
}

@Override
public void switchBrailleDisplayOnOrOff() {
controller.switchBrailleDisplayOnOrOff();
if (isRunning) {
controller.switchBrailleDisplayOnOrOff();
}
}

@Override
public void toggleBrailleContractedMode() {
if (isRunning) {
controller.toggleBrailleContractedMode();
}
}

@Override
public void toggleBrailleOnScreenOverlay() {
if (isRunning) {
controller.toggleBrailleOnScreenOverlay();
}
}

@Override
public void onImeVisibilityChanged(boolean visible) {
controller.getBrailleDisplayForBrailleIme().onImeVisibilityChanged(visible);
if (isRunning) {
controller.getBrailleDisplayForBrailleIme().onImeVisibilityChanged(visible);
}
}

@Override
public void showOnDisplay(ResultForDisplay result) {
controller.getBrailleDisplayForBrailleIme().showOnDisplay(result);
if (isRunning) {
controller.getBrailleDisplayForBrailleIme().showOnDisplay(result);
}
}

@Override
public boolean isBrailleDisplayConnectedAndNotSuspended() {
return controller.getBrailleDisplayForBrailleIme().isBrailleDisplayConnectedAndNotSuspended();
if (isRunning) {
return controller.getBrailleDisplayForBrailleIme().isBrailleDisplayConnectedAndNotSuspended();
}
return false;
}

@Override
public void suspendInFavorOfBrailleKeyboard() {
controller.getBrailleDisplayForBrailleIme().suspendInFavorOfBrailleKeyboard();
if (isRunning) {
controller.getBrailleDisplayForBrailleIme().suspendInFavorOfBrailleKeyboard();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package com.google.android.accessibility.braille.brailledisplay;

import static com.google.android.accessibility.utils.AccessibilityServiceCompatUtils.Constants.BRAILLE_KEYBOARD;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
Expand Down Expand Up @@ -98,14 +96,14 @@ public void onWindowFocusChanged(boolean hasFocus) {

/** Whether this Activity is necessary to start. */
public static boolean necessaryToStart(Context context) {
return !BrailleCommonUtils.isInputMethodEnabled(context, BRAILLE_KEYBOARD)
|| !BrailleCommonUtils.isInputMethodDefault(context, BRAILLE_KEYBOARD);
return !BrailleCommonUtils.isBrailleKeyboardEnabled(context)
|| !BrailleCommonUtils.isBrailleKeyboardDefault(context);
}

private void checkStatus() {
if (!BrailleCommonUtils.isInputMethodEnabled(this, BRAILLE_KEYBOARD)) {
if (!BrailleCommonUtils.isBrailleKeyboardEnabled(this)) {
showNotifyEnabledKeyboardDialog();
} else if (!BrailleCommonUtils.isInputMethodDefault(this, BRAILLE_KEYBOARD)) {
} else if (!BrailleCommonUtils.isBrailleKeyboardDefault(this)) {
showNotifySwitchToKeyboardDialog();
} else {
finish();
Expand All @@ -129,6 +127,7 @@ private void showNotifyEnabledKeyboardDialog() {
R.string.bd_ime_disabled_dialog_title_positive,
(dialog, which) -> {
final Intent intent = new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
finish();
})
Expand Down Expand Up @@ -172,8 +171,8 @@ private AlertDialog.Builder getAlertDialogBuilder() {
new ContentObserver(handler) {
@Override
public void onChange(boolean selfChange) {
if (BrailleCommonUtils.isInputMethodDefault(
BrailleDisplayImeUnavailableActivity.this, BRAILLE_KEYBOARD)) {
if (BrailleCommonUtils.isBrailleKeyboardDefault(
BrailleDisplayImeUnavailableActivity.this)) {
finish();
}
}
Expand Down
Loading