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

Commit

Permalink
fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
XJIOP committed Dec 18, 2019
1 parent 6658f5f commit 0adb9cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class KeyService extends AccessibilityService {

private final String TAG = "KeyService";
private final String TAG = "DBG | KeyService";

private long CLICK_DELAY;

Expand All @@ -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() {
Expand All @@ -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();
}
Expand Down

0 comments on commit 0adb9cb

Please sign in to comment.