本文整理匯總了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();
}
}