GithubHelp home page GithubHelp logo

sanaurasif / locationindicatorwhitelist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gilbsgilbs/locationindicatorwhitelist

0.0 0.0 0.0 325 KB

An XPosed / LSPosed module that prevents applications from spamming the annoying location notification dot on Android 12 + LineageOS.

License: GNU Lesser General Public License v3.0

Kotlin 100.00%

locationindicatorwhitelist's Introduction

Location Indicator Whitelist

This LSPosed module is supposed to prevent selected packages from spamming the annoying location notification dot.

How

  • Install Magisk/Riru/LSPosed
  • Install and enable this module
  • Open the main activity and select the packages you want to whitelist
  • Reboot

Why

  • Some apps do access the location in background for legitimate reasons, and the user may not want to be interrupted because of that.
  • Some location providers packages aren't whitelisted by ROMs.
  • The "Status bar location indicator" switch in developer options has a lot of drawbacks:
    • It disables all notifications when the user might actually find the notification dot useful
    • It doesn't survive a reboot, meaning that you consistently have to switch it off
    • It's buggy: if you disable it at the wrong moment, you may get the notification dot stuck on your screen until you reboot. On LOS20, it seems that it even doesn't prevent the location notification dot from showing at all.

Caveats

  • Currently only tested on OnePlus 8 (instantnoodle) running LineageOS 20. Please note that I do not plan on adding support for all ROMs and devices, and I might not even read or respond to issues requesting new supports. However, I'll gladly review PRs adding support for new ROMs or devices.
  • The current hook is very weak and dirty. I would have preferred hooking into the core framework directly, but none of my attempts were successful. I had to hook into SystemUI instead. If you find a way to hook into android framework directly, please let me know. Here's a sneak peek of my unsuccessful hook attempts:
    • android.permission.PermissionUsageHelper => shouldShowLocationIndicator
    • android.provider.DeviceConfig => get/setBoolean("location_indicators_enabled")
    • android.permission.PermissionManager => getIndicatorExemptedPackages
    • Patching resource config_locationExtraPackageNames
    • Systemizing whitelisted apps
    • com.android.systemui.statusbar.phone.PhoneStatusBarPolicy => onLocationActiveChanged
    • a combination of all those
  • UI is clunky but simple and straight to the point.

Contributing

Please open issues and PRs on the upstream repo, not on the XPosed-Module-Repo.

locationindicatorwhitelist's People

Contributors

renovate[bot] avatar gilbsgilbs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.