diff --git a/app/build.gradle b/app/build.gradle index e9e39ce..30603de 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "org.xjiop.oneplusaoddoubletapmod" minSdkVersion 21 targetSdkVersion 29 - versionCode 11 - versionName "1.1" + versionCode 12 + versionName "1.2" } buildTypes { release { diff --git a/app/src/main/java/org/xjiop/oneplusaoddoubletapmod/KeyService.java b/app/src/main/java/org/xjiop/oneplusaoddoubletapmod/KeyService.java index bf09bdf..dd0a780 100644 --- a/app/src/main/java/org/xjiop/oneplusaoddoubletapmod/KeyService.java +++ b/app/src/main/java/org/xjiop/oneplusaoddoubletapmod/KeyService.java @@ -9,7 +9,7 @@ public class KeyService extends AccessibilityService { - private final String TAG = "KeyService"; + private final String TAG = "DBG | KeyService"; private long CLICK_DELAY; @@ -32,7 +32,7 @@ protected boolean onKeyEvent(KeyEvent event) { if(event.getKeyCode() == KeyEvent.KEYCODE_F4) result = doubleClick(); - return result; + return result || super.onKeyEvent(event); } private boolean doubleClick() { @@ -47,7 +47,7 @@ private boolean doubleClick() { PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE); if(powerManager != null) { - PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, getPackageName() + ":double_tap"); + PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.ACQUIRE_CAUSES_WAKEUP | PowerManager.SCREEN_DIM_WAKE_LOCK, getPackageName() + ":double_tap"); wakeLock.acquire(500L); wakeLock.release(); }