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