Pocket mode is an android app that detects when the phone is in your pocket and disable the fingerprint when active, it helps save the battery and avoid accident unlock while on pocket.
NOTE : This is a privilged app, it needs be signed by the platform certificate and installed in system/priv-app
- Detect when the phone screen is off.
- Check if the device is in Pocket.
- Disable fingerprint when device is in pocket.
- Check if the device is stationary (implemented but not used).
Clone this repository and include in your AOSP device folder:
git clone https://github.com/islem19/Pocket-Mode-App.git
Include the package name on the main makefile device_common.mk
:
#Pocket mode App
PRODUCT_PACKAGES += AospPocketMode
Build Your device again with:
#make the whole AOSP
cd $(ROOT_AOSP)
make
or
#make the module
cd $(POCKED_APP_FOLDER)
mm
- because the app request Device Admin privileges and permissions, it won't be able to disable/enable the fingerprint if the user doesn't explicitly enable it and give it the permission.
Pull request alert: if you can bypass this permission or you have a better way to do it, feel free to contribute and send a pull request :)
The App requires the following permissions:
- Request Device Administrator (To enable the app to enable/disable fingerprint).
- Bind quick settings tile (create a quick tile for the app in Quick Settings)
- Android Support Library.
This project is mantained by:
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -m 'Add some feature')
- Push your branch (git push origin my-new-feature)
- Create a new Pull Request
This application is released under GNU GPLv3 (see LICENSE). Some of the used libraries are released under different licenses.