automatically try get wakelock
This commit is contained in:
parent
403a377374
commit
6cffcf3f11
1 changed files with 2 additions and 1 deletions
3
s.py
3
s.py
|
@ -11,7 +11,8 @@ import json
|
|||
is_termux = os.environ.get('TERMUX_APP__PACKAGE_NAME') or os.environ.get('TERMUX_APK_RELEASE')
|
||||
if is_termux:
|
||||
logger.info('Termux detected, checking permissions...')
|
||||
logger.info('If you want prevent killing termux by android, get wake lock: check your notifications, find termux app and press "ACQUIRE WAKELOCK"')
|
||||
logger.info('Prevent killing termux by android, getting wakelock...')
|
||||
os.system('termux-wake-lock')
|
||||
logger.warning('This can cause battery drain!')
|
||||
if (os.environ.get('TERMUX_APP__APK_RELEASE') or os.environ.get('TERMUX_APK_RELEASE')) not in ('F_DROID', 'GITHUB'):
|
||||
logger.warning('You use not f-droid/github apk release, it may have problems...')
|
||||
|
|
Loading…
Reference in a new issue