Repository navigation
Add a Copy command action to the speaker switch while it needs adb - #196
Merged
Merged
Conversation
While Backtalk lacks MANAGE_ONGOING_CALLS, the "Speaker when away from your ear" switch has a "Copy command" action that copies the adb command from its summary to the clipboard. The action is removed once the permission is granted. Below Android 13, a "Command copied" toast confirms the copy; from Android 13 the system confirms it. The switch stays disabled until the permission is granted, and Backtalk does not speak the actions hint on disabled items, so the action is found through the Actions reading control. - CommandSwitchPreference: a switch with an optional adb command and the Copy command action, for any setting that needs a permission granted with adb.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Speaker when away from your ear needs MANAGE_ONGOING_CALLS, which is granted with adb or Shizuku. Until then the switch's summary shows the command, which then has to be typed out on a computer.
While the permission is missing, the switch now has a Copy command action that copies the command to the clipboard. The action works on the disabled switch, and it is removed once the permission is granted. Below Android 13, a "Command copied" toast confirms the copy. From Android 13 the system confirms it.
Changes:
CommandSwitchPreference: a switch with an optional adb command and the Copy command action, for any setting that needs a permission granted with adb. Fix stuck touch exploration (Fix touch exploration when Android leaves touches down #194) will use it for the DUMP command once this is merged.sound_and_vibration_preferences.xmlfiles uses it, andSoundAndVibrationFragmentsets the command while the permission is missing.lint-baseline.xmlentries.differences.mdmentions the action.Tested on an Android 16 emulator. Without the permission, Actions > Copy command put
adb shell appops set fyi.quin.backtalk MANAGE_ONGOING_CALLS allowon the clipboard. After granting it, the action was gone.