當前位置: 首頁>>代碼示例>>Java>>正文


Java XSharedPreferences.reload方法代碼示例

本文整理匯總了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);
}
 
開發者ID:WrBug,項目名稱:GravityBox,代碼行數:10,代碼來源:ModVolumeKeySkipTrack.java

示例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();
    }
}
 
開發者ID:WrBug,項目名稱:GravityBox,代碼行數:8,代碼來源:ModDialer25.java

示例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();
    }
}
 
開發者ID:mateuszk87,項目名稱:BadIntent,代碼行數:42,代碼來源:AppAnalyzer.java


注:本文中的de.robv.android.xposed.XSharedPreferences.reload方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。