FORUMS
Remove All Ads from XDA

[MOD][XPOSED] Sticky Location Icon Fix

41 posts
Thanks Meter: 4
 
By polygonal, Member on 3rd September 2015, 01:50 AM
Post Reply Email Thread
Xposed module to fix the bug in some devices that location icon is shown in the status bar even when there is no app requesting location.

The location notification icon in the status bar is designed only to show when an app is accessing the GPS (a.k.a. high powered location); however, this is broken on some devices where the icon is shown all the time, whether or not there is actually an app requesting high powered location. This Xposed module makes sure that the location icon shows up only when it should.

Should work on Android 5.0+.

(As a side benefit, you can check the Xposed log for which packages had accessed or are still accessing high powered location ).

Get it in the Xposed repo:
http://repo.xposed.info/module/com.x...ation_icon_fix

Source code URL:
https://github.com/xinluh/Xposed-StickyLocationIconFix

Some technical details of the fix:
The icon change is trigger by an intent from the LocationManagerService, but whether the icon is visible or not is determined by whether any app is currently using the high powered location permission in the AppOps package. I spent a long time tracking down if LocationManagerService is sloppy in forgeting to tell AppOps that a location request is no longer active, but the problem seems to stem from other packages requesting the location permission directly from AppOps without shutting it down properly. So, in essense, whenever the status bar is checking for high powered location requests, there are always active requests in the AppOps package which did not come from LocationManagerService.

The fix, without figuring out where those AppOps requests come from (they seem to come from close source Google services), is to keep track of the intent sent from LocationManagerService without invoking AppOps; to do that, I modified the intent sending code to send also package name and the on/off status. The side effect is that the android.location.HIGH_POWER_REQUEST_CHANGE broadcast is now sent twice, once without and once with the extra information. This side effect can easily be fixed by changing the intent action, but no other packages seem to use it (and it is a system level broadcast, so no user app should be using it).
The Following 2 Users Say Thank You to polygonal For This Useful Post: [ View ] Gift polygonal Ad-Free
 
 
23rd March 2016, 11:51 AM |#2  
Senior Member
Thanks Meter: 35
 
More
Excellent.
Thanks a lot.
8th July 2016, 07:21 PM |#3  
Nergal di Cuthah's Avatar
Senior Member
Thanks Meter: 642
 
More
Ceased working with xPosed 86. Logs forthcoming once ROVO89 tells me what to look for. But I kinda worry this project is abandonware? Can I get a confirm/denial?

Details of why xPosed v86 stops can be found in this info.

Quote:
Originally Posted by rovo89


Finally, a word to all module developers: In v84, I added a warning when a module's APK includes the Xposed API classes instead of just referencing them. I have also sent an email to the developers of all modules I could identify. With v86, I will turn the warning into an error and prevent the module from loading, as it could causes strange issues otherwise. Please update your module as soon as possible.

8th July 2016, 08:30 PM |#4  
Nergal di Cuthah's Avatar
Senior Member
Thanks Meter: 642
 
More
Error log, proving 86 difference has broken module

Code:
07-08 11:13:37.659 I/Xposed  (  383): -----------------
07-08 11:13:37.659 I/Xposed  (  383): Starting Xposed version 86, compiled for SDK 23
07-08 11:13:37.659 I/Xposed  (  383): Device: Nexus 6 (motorola), Android version 6.0.1 (SDK 23)
07-08 11:13:37.659 I/Xposed  (  383): ROM: N6XShamuM  v2.2.3 - MOB30M - HeckNoTechnO
07-08 11:13:37.659 I/Xposed  (  383): Build fingerprint: google/shamu/shamu:6.0.1/MOB30M/2862625:user/release-keys
07-08 11:13:37.659 I/Xposed  (  383): Platform: armeabi-v7a, 32-bit binary, system server: yes
07-08 11:13:37.659 I/Xposed  (  383): SELinux enabled: yes, enforcing: no
07-08 11:13:39.979 I/Xposed  (  383): -----------------
07-08 11:13:39.981 I/Xposed  (  383): Added Xposed (/system/framework/XposedBridge.jar) to CLASSPATH
07-08 11:14:11.057 I/Xposed  (  383): Detected ART runtime
07-08 11:14:11.062 I/Xposed  (  383): Found Xposed class 'de/robv/android/xposed/XposedBridge', now initializing
cut
07-08 11:14:36.137 I/Xposed  (  383): Loading modules from /data/app/com.xinlu.location_icon_fix-1/base.apk
07-08 11:14:36.381 E/Xposed  (  383):   Cannot load module:
07-08 11:14:36.381 E/Xposed  (  383):   The Xposed API classes are compiled into the module's APK.
07-08 11:14:36.381 E/Xposed  (  383):   This may cause strange issues and must be fixed by the module developer.
07-08 11:14:36.382 E/Xposed  (  383):   For details, see: http://api.xposed.info/using.html
Post Reply Subscribe to Thread

Tags
xposed

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes