当前位置: 首页>>代码示例>>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;未经允许,请勿转载。