Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
disable while in call
Browse files Browse the repository at this point in the history
  • Loading branch information
lucky committed Jan 25, 2022
1 parent d6c2266 commit fe31350
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "me.lucky.volta"
minSdk 23
targetSdk 31
versionCode 1
versionName "1.0.0"
versionCode 2
versionName "1.0.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/me/lucky/volta/AccessibilityService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ class AccessibilityService : AccessibilityService() {
override fun onKeyEvent(event: KeyEvent?): Boolean {
if (event == null
|| !prefs.isServiceEnabled
|| audioManager?.isMusicActive != true) return false
|| audioManager?.isMusicActive != true
|| audioManager?.mode != AudioManager.MODE_NORMAL) return false
when (event.keyCode) {
KeyEvent.KEYCODE_VOLUME_DOWN -> return previousTrack(event)
KeyEvent.KEYCODE_VOLUME_UP -> return nextTrack(event)
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable while in call

0 comments on commit fe31350

Please sign in to comment.