本文整理汇总了Java中de.robv.android.xposed.XSharedPreferences.makeWorldReadable方法的典型用法代码示例。如果您正苦于以下问题:Java XSharedPreferences.makeWorldReadable方法的具体用法?Java XSharedPreferences.makeWorldReadable怎么用?Java XSharedPreferences.makeWorldReadable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.robv.android.xposed.XSharedPreferences
的用法示例。
在下文中一共展示了XSharedPreferences.makeWorldReadable方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initZygote
import de.robv.android.xposed.XSharedPreferences; //导入方法依赖的package包/类
@Override
public void initZygote(StartupParam startupParam) throws Throwable {
pref = new XSharedPreferences("tk.navideju.darkthemefixer","fix_states");
pref.makeWorldReadable();
File test = pref.getFile();
Boolean a = pref.getBoolean("com.android.chrome.toolbar_phone.location_bar",true);
XposedBridge.log(LOG_PRE+"From zygote: "+a+" can read?: "+test.canRead());
MODULE_PATH = startupParam.modulePath;
}
示例2: Settings
import de.robv.android.xposed.XSharedPreferences; //导入方法依赖的package包/类
public Settings() {
xSharedPreferences = new XSharedPreferences("tk.specher.huaji");
xSharedPreferences.makeWorldReadable();
}
示例3: initAndroid
import de.robv.android.xposed.XSharedPreferences; //导入方法依赖的package包/类
public static void initAndroid(final XSharedPreferences mainPrefs, final ClassLoader classLoader) {
mPrefs = new XSharedPreferences(GravityBox.PACKAGE_NAME, "ledcontrol");
mPrefs.makeWorldReadable();
mQhPrefs = new XSharedPreferences(GravityBox.PACKAGE_NAME, "quiet_hours");
mQhPrefs.makeWorldReadable();
mQuietHours = new QuietHours(mQhPrefs);
mProximityWakeUpEnabled = mainPrefs.getBoolean(GravityBoxSettings.PREF_KEY_POWER_PROXIMITY_WAKE, false);
try {
final Class<?> nmsClass = XposedHelpers.findClass(CLASS_NOTIFICATION_MANAGER_SERVICE, classLoader);
XposedBridge.hookAllConstructors(nmsClass, new XC_MethodHook() {
@Override
protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
if (mNotifManagerService == null) {
mNotifManagerService = param.thisObject;
mContext = (Context) XposedHelpers.callMethod(param.thisObject, "getContext");
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(LedSettings.ACTION_UNC_SETTINGS_CHANGED);
intentFilter.addAction(Intent.ACTION_USER_PRESENT);
intentFilter.addAction(QuietHoursActivity.ACTION_QUIET_HOURS_CHANGED);
intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
intentFilter.addAction(ACTION_CLEAR_NOTIFICATIONS);
intentFilter.addAction(GravityBoxSettings.ACTION_PREF_POWER_CHANGED);
mContext.registerReceiver(mBroadcastReceiver, intentFilter);
toggleActiveScreenFeature(!mPrefs.getBoolean(LedSettings.PREF_KEY_LOCKED, false) &&
mPrefs.getBoolean(LedSettings.PREF_KEY_ACTIVE_SCREEN_ENABLED, false));
hookNotificationDelegate();
if (DEBUG) log("Notification manager service initialized");
}
}
});
XposedHelpers.findAndHookMethod(CLASS_NOTIFICATION_MANAGER_SERVICE, classLoader,
"enqueueNotificationInternal", String.class, String.class,
int.class, int.class, String.class,
int.class, Notification.class, int[].class, int.class, notifyHook);
XposedHelpers.findAndHookMethod(CLASS_NOTIFICATION_MANAGER_SERVICE, classLoader,
"applyZenModeLocked", CLASS_NOTIFICATION_RECORD, applyZenModeHook);
XposedHelpers.findAndHookMethod(CLASS_NOTIFICATION_MANAGER_SERVICE, classLoader,
"updateLightsLocked", updateLightsLockedHook);
XposedBridge.hookAllMethods(XposedHelpers.findClass(CLASS_VIBRATOR_SERVICE, classLoader),
"startVibrationLocked", startVibrationHook);
} catch (Throwable t) {
XposedBridge.log(t);
}
}
示例4: initZygote
import de.robv.android.xposed.XSharedPreferences; //导入方法依赖的package包/类
@Override
public void initZygote(StartupParam startupParam) throws Throwable {
MODULE_PATH = startupParam.modulePath;
prefs = new XSharedPreferences(PACKAGE_NAME);
prefs.makeWorldReadable();
if (!startupParam.startsSystemServer) return;
XposedBridge.log("GB:Hardware: " + Build.HARDWARE);
XposedBridge.log("GB:Product: " + Build.PRODUCT);
XposedBridge.log("GB:Device manufacturer: " + Build.MANUFACTURER);
XposedBridge.log("GB:Device brand: " + Build.BRAND);
XposedBridge.log("GB:Device model: " + Build.MODEL);
XposedBridge.log("GB:Device type: " + (Utils.isTablet() ? "tablet" : "phone"));
XposedBridge.log("GB:Is MTK device: " + Utils.isMtkDevice());
XposedBridge.log("GB:Is Xperia device: " + Utils.isXperiaDevice());
XposedBridge.log("GB:Is Moto XT device: " + Utils.isMotoXtDevice());
XposedBridge.log("GB:Is OxygenOS 4.5 ROM: " + Utils.isOxygenOs45Rom());
XposedBridge.log("GB:Has Lenovo custom UI: " + Utils.hasLenovoCustomUI());
if (Utils.hasLenovoCustomUI()) {
XposedBridge.log("GB:Lenovo UI is VIBE: " + Utils.hasLenovoVibeUI());
XposedBridge.log("GB:Lenovo ROM is ROW: " + Utils.isLenovoROW());
}
XposedBridge.log("GB:Has telephony support: " + Utils.hasTelephonySupport());
XposedBridge.log("GB:Has Gemini support: " + Utils.hasGeminiSupport());
XposedBridge.log("GB:Android SDK: " + Build.VERSION.SDK_INT);
XposedBridge.log("GB:Android Release: " + Build.VERSION.RELEASE);
XposedBridge.log("GB:ROM: " + Build.DISPLAY);
if (!ArrayUtils.arrayHas(SUPPORT_SDK, Build.VERSION.SDK_INT)) {
XposedBridge.log("!!! GravityBox you are running is not designed for "
+ "Android SDK " + Build.VERSION.SDK_INT + " !!!");
return;
}
SystemWideResources.initResources(prefs);
// Common
ModInputMethod.initZygote(prefs);
PhoneWrapper.initZygote(prefs);
ModTelephony.initZygote(prefs);
// MTK (deprecated)
// if (Utils.isMtkDevice()) {
// if (prefs.getBoolean(GravityBoxSettings.PREF_KEY_MTK_FIX_DEV_OPTS, false)) {
// MtkFixDevOptions.initZygote();
// }
// }
}
示例5: initZygote
import de.robv.android.xposed.XSharedPreferences; //导入方法依赖的package包/类
@Override
public void initZygote(StartupParam startupParam) throws Throwable {
prefs = new XSharedPreferences("lantian.nolitter");
prefs.makeWorldReadable();
}
示例6: init
import de.robv.android.xposed.XSharedPreferences; //导入方法依赖的package包/类
public static void init(IXposedHookZygoteInit.StartupParam startupParam) throws Throwable {
XSharedPreferences pre = new XSharedPreferences(BuildConfig.APPLICATION_ID, "xpnavbar");
pre.makeWorldReadable();
String json = pre.getString(ConstantStr.SHORT_CUT_DATA, "");
XpLog.i("short_cut_data " + json);
expandStatusBarWithRoot = pre.getBoolean(SPUtil.ROOT_DOWN, false);
clearMenLevel = pre.getInt(SPUtil.CLEAR_MEM_LEVEL, 200);
//获取主导行栏小点的位置
homePointPosition = pre.getInt(ConstantStr.HOME_POINT, 0);
chameleonNavbar = pre.getBoolean(SPUtil.CHAMELEON_NAVBAR, false);
rootDown = pre.getBoolean(SPUtil.ROOT_DOWN, false);
vibrate = pre.getBoolean(SPUtil.NAVBAR_VIBRATE, false);
//获取快捷按钮设置数据
Gson gson = new Gson();
//在第一次激活重新启动的时候,可能因为没有设置任何快捷按钮,导致这里报错
try {
shortCutList = gson.fromJson(json, ShortCutData.class).getData();
} catch (Exception e) {
shortCutList = new ArrayList<>();
}
//获取图片缩放大小
iconScale = pre.getInt(ConstantStr.ICON_SIZE, 40);
navbarHeight = pre.getInt(SPUtil.NAVBAR_HEIGHT, 100);
//加载图片资源文件
Resources res = XModuleResources.createInstance(startupParam.modulePath, null);
byte[] backImg = XposedHelpers.assetAsByteArray(res, "back.png");
byte[] clearMenImg = XposedHelpers.assetAsByteArray(res, "clear_mem.png");
byte[] clearNotificationImg = XposedHelpers.assetAsByteArray(res, "clear_notification.png");
byte[] downImg = XposedHelpers.assetAsByteArray(res, "down.png");
byte[] lightImg = XposedHelpers.assetAsByteArray(res, "light.png");
byte[] quickNoticesImg = XposedHelpers.assetAsByteArray(res, "quick_notices.png");
byte[] screenOffImg = XposedHelpers.assetAsByteArray(res, "screenoff.png");
// byte[] upImg = XposedHelpers.assetAsByteArray(res, "up.png");
byte[] volume = XposedHelpers.assetAsByteArray(res, "volume.png");
byte[] smallPonit = XposedHelpers.assetAsByteArray(res, "small_point.png");
byte[] home = XposedHelpers.assetAsByteArray(res, "ic_home.png");
byte[] startActs = XposedHelpers.assetAsByteArray(res, "start_acts.png");
byte[] playMusic = XposedHelpers.assetAsByteArray(res, "ic_music.png");
byte[] pauseMusic = XposedHelpers.assetAsByteArray(res, "ic_pause.png");
byte[] previousMusic = XposedHelpers.assetAsByteArray(res, "ic_previous.png");
byte[] nextMusic = XposedHelpers.assetAsByteArray(res, "ic_next.png");
byte[] scanWeChat = XposedHelpers.assetAsByteArray(res, "wechat_qr.png");
byte[] scanAlipay = XposedHelpers.assetAsByteArray(res, "alipay_qr.png");
byte[] screenshot = XposedHelpers.assetAsByteArray(res, "ic_image.png");
byte[] navBack = XposedHelpers.assetAsByteArray(res, "ic_sysbar_back.png");
byte[] navHome = XposedHelpers.assetAsByteArray(res, "ic_sysbar_home.png");
byte[] navRecent = XposedHelpers.assetAsByteArray(res, "ic_sysbar_recent.png");
byte[] clipBoard = XposedHelpers.assetAsByteArray(res, "ic_clipboard.png");
byte[] command = XposedHelpers.assetAsByteArray(res, "ic_command.png");
byte[] navHide = XposedHelpers.assetAsByteArray(res, "ic_nav_down.png");
mapImgRes.put(ConstantStr.FUNC_BACK_CODE, backImg);
mapImgRes.put(ConstantStr.FUNC_CLEAR_MEM_CODE, clearMenImg);
mapImgRes.put(ConstantStr.FUNC_CLEAR_NOTIFICATION_CODE, clearNotificationImg);
mapImgRes.put(ConstantStr.FUNC_DOWN_CODE, downImg);
mapImgRes.put(ConstantStr.FUNC_LIGHT_CODE, lightImg);
mapImgRes.put(ConstantStr.FUNC_QUICK_NOTICE_CODE, quickNoticesImg);
mapImgRes.put(ConstantStr.FUNC_SCREEN_OFF_CODE, screenOffImg);
// mapImgRes.put(ConstantStr.UP, upImg);
mapImgRes.put(ConstantStr.FUNC_VOLUME_CODE, volume);
mapImgRes.put(ConstantStr.FUNC_SMALL_POINT_CODE, smallPonit);
mapImgRes.put(ConstantStr.FUNC_HOME_CODE, home);
mapImgRes.put(ConstantStr.FUNC_START_ACTS_CODE, startActs);
mapImgRes.put(ConstantStr.FUNC_PLAY_MUSIC_CODE, playMusic);
mapImgRes.put(ConstantStr.FUNC_NEXT_PLAY_CODE, nextMusic);
mapImgRes.put(ConstantStr.FUNC_PREVIOUS_PLAY_CODE, previousMusic);
mapImgRes.put(ConstantStr.FUNC_WECHAT_SACNNER_CODE, scanWeChat);
mapImgRes.put(ConstantStr.FUNC_ALIPAY_SACNNER_CODE, scanAlipay);
mapImgRes.put(ConstantStr.FUNC_SCREEN_SHOT_CODE, screenshot);
mapImgRes.put(ConstantStr.FUNC_NAV_BACK_CODE, navBack);
mapImgRes.put(ConstantStr.FUNC_NAV_HOME_CODE, navHome);
mapImgRes.put(ConstantStr.FUNC_NAV_RECENT_CODE, navRecent);
mapImgRes.put(ConstantStr.FUNC_CLIPBOARD_CODE, clipBoard);
mapImgRes.put(ConstantStr.FUNC_COMMAND_CODE, command);
mapImgRes.put(ConstantStr.FUNC_NAV_HIDE_CODE, navHide);
}