Closed vemacs closed 7 years ago
Turns out I was toggling a non-Xposed preference (one where chmod 644 isn't run) after toggling the Xposed preference. Maybe run chmod 644 regardless of the preference being chosen if the Xposed preference is on?
run chmod
It is run when you toggle the setting on/off: https://github.com/theblixguy/ForceDoze/blob/master/app/src/main/java/com/suyashsrijan/forcedoze/SettingsActivity.java#L294
I am closing this issue as it seems like you no longer have this issue.
After two restarts, Xposed can't read the preferences file and always returns the default values:
ForceDozeXposed: usePermanentDoze: false, useXposedSensorWorkaround: false, serviceEnabled: false
Needless to say, this makes the module not work at all after a set period of restarts. Manually changing sharedpref permissions to 0664 fixes it for the next restart, but not the one after that (I'm assuming ForceDoze resets file permissions on start, as I checked and it's back to 0660).
According to the xposed author, changing a PreferenceManager setting should fix it: https://github.com/rovo89/XposedBridge/issues/56#issuecomment-137236354
Other modules do the same: https://github.com/wasdennnoch/AndroidN-ify/blob/3504b3e461873dc091127b24aa5f85dc22679a76/app/src/main/java/tk/wasdennnoch/androidn_ify/ui/SettingsActivity.java#L127