本文整理汇总了Java中de.robv.android.xposed.XSharedPreferences.reload方法的典型用法代码示例。如果您正苦于以下问题:Java XSharedPreferences.reload方法的具体用法?Java XSharedPreferences.reload怎么用?Java XSharedPreferences.reload使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.robv.android.xposed.XSharedPreferences
的用法示例。
在下文中一共展示了XSharedPreferences.reload方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePreference
import de.robv.android.xposed.XSharedPreferences; //导入方法依赖的package包/类
private static void updatePreference(final XSharedPreferences prefs) {
prefs.reload();
allowSkipTrack = prefs.getBoolean(GravityBoxSettings.PREF_KEY_VOL_MUSIC_CONTROLS, false);
mShoudTriggerWakeUp = "enabled".equals(
prefs.getString(GravityBoxSettings.PREF_KEY_VOLUME_ROCKER_WAKE, "default")) &&
prefs.getBoolean(GravityBoxSettings.PREF_KEY_VOLUME_ROCKER_WAKE_ALLOW_MUSIC, false);
if (DEBUG) log("allowSkipTrack = " + allowSkipTrack + "; " +
"mShoudTriggerWakeUp=" + mShoudTriggerWakeUp);
}
示例2: reloadPrefs
import de.robv.android.xposed.XSharedPreferences; //导入方法依赖的package包/类
private static void reloadPrefs(XSharedPreferences prefs) {
if ((System.currentTimeMillis() - mPrefsReloadedTstamp) > 10000) {
if (DEBUG) log("Reloading preferences");
prefs.reload();
mPrefsReloadedTstamp = System.currentTimeMillis();
}
}
示例3: handleLoadPackage
import de.robv.android.xposed.XSharedPreferences; //导入方法依赖的package包/类
@Override
public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
sPrefs = new XSharedPreferences(new File(PREFERENCE_PATH));
sPrefs.reload();
String target = lpparam.packageName;
//bypass various apps depending on preferences
String[] bypass = getBypassList();
String packageNameFilter = sPrefs.getString("package_filter", "");
for (String bypassElement : bypass) {
/* check if package filter does not equal this package
NOTE: this is a special condition in order to overwrite the hook_system_switch;
However, the packageNameFilter has to exactly match exactly the target package.
*/
if (target.matches(bypassElement) && !target.equals(packageNameFilter)){
return;
}
}
//disable strict mode in order to prevent unclosed connections file usage
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().build());
HookingManager hookingManager = new HookingManager(lpparam, target);
int port = getRandomPort();
//updating current app's meta data
AppInformation.Instance.packageName = lpparam.packageName;
AppInformation.Instance.port = port;
Log.d(TAG, "Hooking package:" + target + " port: " + port);
if (hookingManager.continueHooking()) {
BaseHook base = hookingManager.getBaseHook();
ParcelProxyHooks parcelProxyHooks = new ParcelProxyHooks(base, port);
parcelProxyHooks.hookParcel();
TransactionHooks transactionHooks = new TransactionHooks(base, sPrefs, port);
transactionHooks.hookBinder();
LogHooks logHooks = new LogHooks(base, sPrefs, port);
logHooks.hookLogs();
}
}