本文整理汇总了Java中de.robv.android.xposed.XposedHelpers.setObjectField方法的典型用法代码示例。如果您正苦于以下问题:Java XposedHelpers.setObjectField方法的具体用法?Java XposedHelpers.setObjectField怎么用?Java XposedHelpers.setObjectField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.robv.android.xposed.XposedHelpers
的用法示例。
在下文中一共展示了XposedHelpers.setObjectField方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: recreateTiles
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private void recreateTiles() {
try {
mPrefs.reload();
if (Utils.isXperiaDevice()) {
XposedHelpers.setObjectField(mHost, "mQuickSettingsTilesDefault", "");
XposedHelpers.callMethod(mHost, "onConfigurationChanged");
} else {
XposedHelpers.callMethod(mHost, "onTuningChanged",
ModQsTiles.TILES_SETTING, (String) null);
}
} catch (Throwable t) {
XposedBridge.log(t);
}
}
示例3: 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;
}
}
示例4: 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;
}
}
示例5: set
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
void set(String var, Object value) {
XposedHelpers.setObjectField(obj, var, value);
}
示例6: 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");
}
示例7: setObj
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private static void setObj(String field, Object value) {
XposedHelpers.setObjectField(mPhoneWindowManager, field, value);
}