本文整理汇总了Java中de.robv.android.xposed.XposedHelpers.setBooleanField方法的典型用法代码示例。如果您正苦于以下问题:Java XposedHelpers.setBooleanField方法的具体用法?Java XposedHelpers.setBooleanField怎么用?Java XposedHelpers.setBooleanField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.robv.android.xposed.XposedHelpers
的用法示例。
在下文中一共展示了XposedHelpers.setBooleanField方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: beforeHookedMethod
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
@Override
protected void beforeHookedMethod(final MethodHookParam param) throws Throwable {
if (mScreenOnDueToActiveScreen) {
try {
XposedHelpers.setBooleanField(param.thisObject, "mScreenOn", false);
if (DEBUG) log("updateLightsLocked: Screen on due to active screen - pretending it's off");
} catch (Throwable t) {
XposedBridge.log(t);
}
}
}
示例2: setKeyguardDisabled
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
public void setKeyguardDisabled(boolean disabled) {
try {
mIsKeyguardDisabled = disabled;
XposedHelpers.callMethod(mMediator, "setKeyguardEnabled", !disabled);
if (mIsKeyguardDisabled) {
XposedHelpers.setBooleanField(mMediator, "mNeedToReshowWhenReenabled", false);
}
} catch (Throwable t) {
XposedBridge.log(t);
}
}
示例3: setShowPercentage
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
public void setShowPercentage(boolean showPercentage) {
if (mBattery != null) {
try {
XposedHelpers.setBooleanField(getDrawable(), "mShowPercent", showPercentage);
getDrawable().invalidateSelf();
mBattery.invalidate();
} catch (Throwable t) {
log("Error setting percentage: " + t.getMessage());
}
}
}
示例4: applyTo
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
public void applyTo(Object state) {
XposedHelpers.setBooleanField(state, "visible", visible);
XposedHelpers.setObjectField(state, "icon", getResourceIcon());
XposedHelpers.setObjectField(state, "label", label);
XposedHelpers.setBooleanField(state, "autoMirrorDrawable", autoMirrorDrawable);
XposedHelpers.setBooleanField(state, "value", booleanValue);
}
示例5: handleUpdateState
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
@Override
public void handleUpdateState(Object state, Object arg) {
final boolean visible = mEnabled &&
(!mLocked || !mKgMonitor.isShowing()) &&
(!mLockedOnly || mKgMonitor.isShowing()) &&
(!mSecured || !(mKgMonitor.isShowing() && mKgMonitor.isLocked()));
XposedHelpers.setBooleanField(state, "visible", visible);
}
示例6: beforeLockPatternDraw
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
@SuppressWarnings({"unchecked", "rawtypes"})
private static void beforeLockPatternDraw(final Class<? extends Enum> displayModeEnum, final Object thisObject) {
final Object patternDisplayMode = XposedHelpers.getObjectField(thisObject, "mPatternDisplayMode");
final Boolean inStealthMode = XposedHelpers.getBooleanField(thisObject, "mInStealthMode");
if (!mPrefs.getBoolean(GravityBoxSettings.PREF_KEY_LOCKSCREEN_SHOW_PATTERN_ERROR, true) &&
mPatternDisplayMode == null && patternDisplayMode == Enum.valueOf(displayModeEnum, "Wrong")) {
mInStealthMode = inStealthMode;
mPatternDisplayMode = patternDisplayMode;
XposedHelpers.setBooleanField(thisObject, "mInStealthMode", true);
XposedHelpers.setObjectField(thisObject, "mPatternDisplayMode", Enum.valueOf(displayModeEnum, "Correct"));
} else {
mPatternDisplayMode = null;
}
}
示例7: afterLockPatternDraw
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private static void afterLockPatternDraw(final Object thisObject) {
if (null != mPatternDisplayMode) {
XposedHelpers.setBooleanField(thisObject, "mInStealthMode", mInStealthMode);
XposedHelpers.setObjectField(thisObject, "mPatternDisplayMode", mPatternDisplayMode);
mInStealthMode = false;
mPatternDisplayMode = null;
}
}
示例8: doubleHomeHook
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private static void doubleHomeHook(XC_MethodHook.MethodHookParam param) {
if (!isTaskLocked() && getActionFor(HwKeyTrigger.HOME_DOUBLETAP).actionId !=
GravityBoxSettings.HWKEY_ACTION_DEFAULT) {
XposedHelpers.setBooleanField(param.thisObject, "mHomeConsumed", true);
performAction(HwKeyTrigger.HOME_DOUBLETAP);
param.setResult(null);
}
}
示例9: adjustLongPressPowerWhenNonInteractive
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private static void adjustLongPressPowerWhenNonInteractive() {
try {
if (mSupportLongPressPowerWhenNonInteractiveOrig == null) {
mSupportLongPressPowerWhenNonInteractiveOrig =
XposedHelpers.getBooleanField(mPhoneWindowManager,
"mSupportLongPressPowerWhenNonInteractive");
}
XposedHelpers.setBooleanField(mPhoneWindowManager,
"mSupportLongPressPowerWhenNonInteractive",
mLockscreenTorch == GravityBoxSettings.HWKEY_TORCH_POWER_LONGPRESS ?
true : mSupportLongPressPowerWhenNonInteractiveOrig);
} catch (Throwable t) {
XposedBridge.log(t);
}
}
示例10: updateAutobrightnessConfig
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private static void updateAutobrightnessConfig(int[] lux, int[] brightness) {
if (mDisplayPowerController == null || mContext == null) return;
if (DEBUG) log("updateAutobrightnessConfig called");
Resources res = mContext.getResources();
boolean mtkVirtualValuesSupport = false;
boolean mtkVirtualValues = false;
int screenBrightnessDim = res.getInteger(res.getIdentifier(
"config_screenBrightnessDim", "integer", "android"));
int screenBrightnessMinimum = res.getInteger(res.getIdentifier(
"config_screenBrightnessSettingMinimum", "integer", "android"));
screenBrightnessMinimum = Math.min(screenBrightnessDim, screenBrightnessMinimum);
boolean useSwAutobrightness = XposedHelpers.getBooleanField(
mDisplayPowerController, "mUseSoftwareAutoBrightnessConfig");
if (useSwAutobrightness) {
// brightness array must have one more element than lux array
int[] brightnessAdj = new int[lux.length + 1];
for (int i = 0; i < brightnessAdj.length; i++) {
if (i < brightness.length) {
brightnessAdj[i] = brightness[i];
} else {
brightnessAdj[i] = 255;
}
}
if (DEBUG) log("updateAutobrightnessConfig: lux=" + Utils.intArrayToString(lux) +
"; brightnessAdj=" + Utils.intArrayToString(brightnessAdj));
if (Utils.isMtkDevice()) {
try {
mtkVirtualValues = (boolean) XposedHelpers.getStaticBooleanField(
mDisplayPowerController.getClass(), "MTK_ULTRA_DIMMING_SUPPORT");
int resId = res.getIdentifier("config_screenBrightnessVirtualValues",
"bool", "android");
if (resId != 0) {
mtkVirtualValues &= res.getBoolean(resId);
}
mtkVirtualValuesSupport = true;
if (DEBUG) log("MTK brightness virtual values: " + mtkVirtualValues);
} catch (Throwable t) {
if (DEBUG) log("Couldn't detect MTK virtual values feature");
}
}
Object autoBrightnessSpline = mtkVirtualValuesSupport ? XposedHelpers.callMethod(
mDisplayPowerController, "createAutoBrightnessSpline",
lux, brightnessAdj, mtkVirtualValues) :
XposedHelpers.callMethod(mDisplayPowerController,
"createAutoBrightnessSpline", lux, brightnessAdj);
if (autoBrightnessSpline != null) {
Object abrCtrl = XposedHelpers.getObjectField(mDisplayPowerController,
"mAutomaticBrightnessController");
XposedHelpers.setObjectField(abrCtrl,
"mScreenAutoBrightnessSpline", autoBrightnessSpline);
if (brightnessAdj[0] < screenBrightnessMinimum) {
screenBrightnessMinimum = brightnessAdj[0];
}
} else {
XposedHelpers.setBooleanField(mDisplayPowerController, "mUseSoftwareAutoBrightnessConfig", false);
log("Error computing auto-brightness spline: lux=" + Utils.intArrayToString(lux) +
"; brightnessAdj=" + Utils.intArrayToString(brightnessAdj));
}
}
int screenBrightnessRangeMinimum = mtkVirtualValuesSupport ?
(Integer) XposedHelpers.callMethod(mDisplayPowerController, "clampAbsoluteBrightness",
screenBrightnessMinimum, mtkVirtualValues) :
(Integer) XposedHelpers.callMethod(
mDisplayPowerController, "clampAbsoluteBrightness", screenBrightnessMinimum);
XposedHelpers.setIntField(mDisplayPowerController, "mScreenBrightnessRangeMinimum",
screenBrightnessRangeMinimum);
if (DEBUG) log("Autobrightness config updated");
}
示例11: setBool
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private static void setBool(String field, boolean value) {
XposedHelpers.setBooleanField(mPhoneWindowManager, field, value);
}