pylerSM / XInstaller

[Xposed module] Various tweaks for Package Installer
http://repo.xposed.info/module/com.pyler.xinstaller
BSD 2-Clause "Simplified" License
152 stars 61 forks source link

Change preferences => not world readable preferences #28

Closed pylerSM closed 8 years ago

pylerSM commented 8 years ago

If we change any setting, then prefs file lose "world readable" attribute and XInstaller (and any other Xposed modules) can't load other than word readable preferences.

pylerSM commented 8 years ago
    @Override
    public void onPause() {
        super.onPause();

        // Set preferences file permissions to be world readable
        File prefsDir = new File(getActivity().getApplicationInfo().dataDir, "shared_prefs");
        File prefsFile = new File(prefsDir, getPreferenceManager().getSharedPreferencesName() + ".xml");
        if (prefsFile.exists()) {
            prefsFile.setReadable(true, false);
        }
    }
pylerSM commented 8 years ago

I will test this code

pylerSM commented 8 years ago

Okey, good