-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue where screenoff toggle rapidly fires
- Loading branch information
Showing
6 changed files
with
90 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,24 @@ | |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
/* | ||
* Copyright (C) 2017 Merbin J Anselm <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
/* | ||
* Copyright (C) 2016 Merbin J Anselm <[email protected]> | ||
* | ||
|
@@ -84,7 +102,7 @@ android { | |
applicationId "in.blogspot.anselmbros.torchie" | ||
minSdkVersion 15 | ||
targetSdkVersion 28 | ||
versionCode 31 | ||
versionCode 33 | ||
versionName "3.2" | ||
} | ||
buildTypes { | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,24 @@ | |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
/* | ||
* Copyright (C) 2017 Merbin J Anselm <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, write to the Free Software Foundation, Inc., | ||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
*/ | ||
|
||
/* | ||
* Copyright (C) 2016 Merbin J Anselm <[email protected]> | ||
* | ||
|
@@ -80,7 +98,7 @@ protected boolean isKeyComboPerformed() { | |
for (int i = 0; i < current_ptr; i++) { | ||
if (i > 0) { | ||
int a = buffer[i], b = buffer[i - 1]; | ||
if (a == (-1 * b)) { | ||
if ((a == -1 && b == 1) || (a == 1 && b == -1)) { | ||
this.clearBuffer(); | ||
keyComboPerformed = true; | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
<!-- | ||
~ Copyright (C) 2017 Merbin J Anselm <[email protected]> | ||
~ | ||
~ This program is free software; you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation; either version 2 of the License, or | ||
~ (at your option) any later version. | ||
~ | ||
~ This program is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License along | ||
~ with this program; if not, write to the Free Software Foundation, Inc., | ||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
--> | ||
|
||
<!-- | ||
~ Copyright (C) 2016 Merbin J Anselm <[email protected]> | ||
~ | ||
|
@@ -56,9 +74,9 @@ | |
<string name="welcome_note">Make your life easier with <b>Torchie</b>! \n\nEnable <b>\'Torchie functionality\'</b> to turn on/off torch just by <b>holding volume buttons together</b>!\n\nTweak more in Torchie <b>Settings</b>!</string> | ||
<string name="got_it">Got It</string> | ||
<string name="permission_note">Enable <b>\'Torchie Quick\'</b> from Accessibility <b>Services</b> to experience Torchie.</string> | ||
<string name="permission_summary"><b>Usage of Accessibility Service </b> \nTorchie requires a service to run in background to intercept PHYSICAL VOLUME BUTTON KEY presses. Since a normal \'Service\' cannot intercept Physical Hardware Key presses, an \'Accessibility Service\' is used for this purpose. It does not do anything apart from intercepting Volume Key presses! I promise! </string> | ||
<string name="permission_warn"><b>About the PERMISSION - </b> \"<i>...observe text that you type & observe your actions...</i>\"\nAlas! It\'s threatening! Android throws a \'Key Event\' only when a HARDWARE KEY is pressed. It is by this way, Torchie captures Volume Key presses. But It is Android\'s <i>flaw</i>, showing the same WARNING even for NON-HARDWARE KEYBOARD ENABLED PHONES (except very old Android devices and Blackberry Priv which had/have hardware keyboard for typing). It is impossible to design Torchie Functionality without this permission | ||
\nAlso, Torchie <b>DOES NOT HAVE INTERNET PERMISSION</b>, so it is impossible to <i>send</i> anything to anyone\n\nTorchie CANNOT <i>COLLECT</i> anything from anyone. Feel free to enable Torchie functionality! <a href="https://torchieapp.wordpress.com/help/">Learn more</a> </string> | ||
<string name="permission_summary"><b>Usage of Accessibility Service </b> \nTorchie requires a service to run in background. An \'Accessibility Service\' can intercept Physical Hardware Key presses while a normal background \'Service\' can\'t. It does not do anything apart from intercepting Volume Key presses! I promise! </string> | ||
<string name="permission_warn"><b>About the PERMISSION - </b> \"<i>...observe text that you type & observe your actions...</i>\"\nIt\'s threatening! Android throws a \'Key Event\' only when a HARDWARE KEY is pressed. It is by this way, Torchie captures Volume Key presses. But It is Android\'s <i>flaw</i>, showing the same WARNING even for NON-HARDWARE KEYBOARD ENABLED PHONES (except very old Android devices and Blackberry Priv which had hardware keyboard for typing). | ||
\nAlso, Torchie <b>DOES NOT HAVE INTERNET PERMISSION</b>, so it is impossible to <i>send</i> anything to anyone\n\nTorchie DOES NOT <i>COLLECT</i> anything from anyone. <a href="https://torchieapp.wordpress.com/help/">Learn more</a> </string> | ||
<string name="permission">Enable Torchie Functionality?</string> | ||
|
||
<string name="about_note"><b>Torchie</b> is made by two brothers\nMerbin J Anselm and Rebin J Anselm\[email protected]\n\nMany thanks to following great hearts, who helped to translate Torchie</string> | ||
|
@@ -68,7 +86,7 @@ | |
<string name="facebook">Facebook</string> | ||
<string name="google_plus">Google+</string> | ||
|
||
<string name="donation_note">We\'ve spent lot\'s of <b>hours</b> making Torchie, that you may not <b>lose a second</b> turning on torch!\nSupport the work of Torchie by donating us</string> | ||
<string name="donation_note">We\'ve spent lots of <b>hours</b> making Torchie, that you may not <b>lose a second</b> turning on torch!\nSupport the work of Torchie by donating us</string> | ||
<string name="thank_you_note">Your care motivates us!\n\nShare a word about Torchie with your family and friends!</string> | ||
<string name="donation_error">Oops! Error while sharing love with us!</string> | ||
<string name="proceed_paypal">Proceed to Paypal?</string> | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
<!-- | ||
~ Copyright (C) 2017 Merbin J Anselm <[email protected]> | ||
~ | ||
~ This program is free software; you can redistribute it and/or modify | ||
~ it under the terms of the GNU General Public License as published by | ||
~ the Free Software Foundation; either version 2 of the License, or | ||
~ (at your option) any later version. | ||
~ | ||
~ This program is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU General Public License along | ||
~ with this program; if not, write to the Free Software Foundation, Inc., | ||
~ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
--> | ||
|
||
<!-- | ||
~ Copyright (C) 2016 Merbin J Anselm <[email protected]> | ||
~ | ||
|
@@ -22,4 +40,4 @@ | |
android:canRequestFilterKeyEvents="true" | ||
android:description="@string/accessibility_service_description_2" | ||
android:settingsActivity="in.blogspot.anselmbros.torchie.SettingsActivity" | ||
android:summary="@string/permission_summary" /> | ||
android:summary="@string/accessibility_service_description" /> |