Skip to content

Commit

Permalink
[Cleanup] Cleanup volune key code
Browse files Browse the repository at this point in the history
Signed-off-by: androidacy <admin@androidacy.com>
  • Loading branch information
androidacy-user committed May 14, 2021
1 parent daed597 commit 0b750a2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions common/addon/Volume-Key-Selector/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ chooseport() {
local count=0
while true; do
timeout $delay /system/bin/getevent -lqc 1 2>&1 > $TMPDIR/events &
sleep 0.5; count=$((count + 1))
sleep 0.25; count=$((count + 1))
if (`grep -q 'KEY_VOLUMEUP *DOWN' $TMPDIR/events`); then
return 0
elif (`grep -q 'KEY_VOLUMEDOWN *DOWN' $TMPDIR/events`); then
Expand All @@ -41,7 +41,7 @@ chooseport() {
done
if $error; then
# abort "Volume key not detected!"
echo "Volume key not detected. Trying keycheck method"
echo "Volume key not detected. Trying legacy method"
export chooseport=chooseport_legacy VKSEL=chooseport_legacy
chooseport_legacy $delay
return $?
Expand Down
20 changes: 10 additions & 10 deletions common/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ vol_sel() {
sleep 2
ui_print "-> Do you wnat to install only webview?"
unset INSTALL
if chooseport 5; then
if chooseport; then
INSTALL=0
fi
if [[ -z $INSTALL ]]; then
ui_print "-> How about only browser?"
if chooseport 5; then
if chooseport; then
INSTALL=1
fi
fi
if [[ -z $INSTALL ]]; then
ui_print "-> How about both browser and webview?"
if chooseport 5; then
if chooseport; then
INSTALL=2
fi
fi
Expand All @@ -71,18 +71,18 @@ vol_sel() {
unset WEBVIEW
ui_print "-> Please choose your webview."
ui_print " 1. Bromite"
if chooseport 5; then
if chooseport; then
WEBVIEW=0
fi
if [[ -z $WEBVIEW ]]; then
ui_print " 2. Chromium"
if chooseport 5; then
if chooseport; then
WEBVIEW=1
fi
fi
if [[ -z $WEBVIEW ]]; then
ui_print " 3. Ungoogled Chromium"
if chooseport 5; then
if chooseport; then
WEBVIEW=2
fi
fi
Expand All @@ -95,24 +95,24 @@ vol_sel() {
unset BROWSER
ui_print "-> Please choose your browser."
ui_print " 1. Bromite"
if chooseport 5; then
if chooseport; then
WEBVIEW=0
fi
if [[ -z $BROWSER ]]; then
ui_print " 2. Chromium"
if chooseport 5; then
if chooseport; then
BROWSER=1
fi
fi
if [[ -z $BROWSER ]]; then
ui_print " 3. Ungoogled Chromium"
if chooseport 5; then
if chooseport; then
BROWSER=2
fi
fi
if [[ -z $BROWSER ]]; then
ui_print " 4. Ungoogled Chromium (extensions support version)?"
if chooseport 5; then
if chooseport; then
BROWSER=3
fi
fi
Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id=bromitewebview
name=Webview Manager
version=9.1.1
versionCode=4059
version=9.1.3
versionCode=4061
author=Androidacy
description=Change System WebView and default browser systemless-ly, on any ROM. You can block ads and fingerprinting, increase privacy, and more. Website: www.androidacy.com.

0 comments on commit 0b750a2

Please sign in to comment.