本文整理汇总了Java中de.robv.android.xposed.XposedHelpers.setAdditionalInstanceField方法的典型用法代码示例。如果您正苦于以下问题:Java XposedHelpers.setAdditionalInstanceField方法的具体用法?Java XposedHelpers.setAdditionalInstanceField怎么用?Java XposedHelpers.setAdditionalInstanceField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.robv.android.xposed.XposedHelpers
的用法示例。
在下文中一共展示了XposedHelpers.setAdditionalInstanceField方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getResourceIcon
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private Object getResourceIcon() {
if (sResourceIconClass == null || icon == null)
return null;
try {
Object resourceIcon = XposedHelpers.callStaticMethod(
sResourceIconClass, "get", icon.hashCode());
XposedHelpers.setAdditionalInstanceField(resourceIcon, TILE_KEY_NAME, mKey);
if (DEBUG) log("getting resource icon for " + mKey);
return resourceIcon;
} catch (Throwable t) {
log("Error creating resource icon:");
XposedBridge.log(t);
return null;
}
}
示例2: prepareNotificationRow
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
private static void prepareNotificationRow(Resources res) {
try {
XposedHelpers.callMethod(mVolumePanel, "addRow",
AudioManager.STREAM_NOTIFICATION,
mIconNotifResId, mIconNotifMuteResId, true);
List<?> rows = (List<?>) XposedHelpers.getObjectField(mVolumePanel, "mRows");
Object row = rows.get(rows.size() - 1);
XposedHelpers.setAdditionalInstanceField(row, "gbNotifSlider", true);
} catch (Throwable t) {
XposedBridge.log(t);
}
}
示例3: onCreateTileView
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
@Override
public void onCreateTileView(View tileView) throws Throwable {
XposedHelpers.setAdditionalInstanceField(tileView, TILE_KEY_NAME, mKey);
mScalingFactor = QsPanel.getScalingFactor(Integer.valueOf(mPrefs.getString(
GravityBoxSettings.PREF_KEY_QUICK_SETTINGS_TILES_PER_ROW, "0")),
mPrefs.getInt(GravityBoxSettings.PREF_KEY_QS_SCALE_CORRECTION, 0));
if (mScalingFactor != 1f) {
int iconSizePx = XposedHelpers.getIntField(tileView, "mIconSizePx");
XposedHelpers.setIntField(tileView, "mIconSizePx", Math.round(iconSizePx*mScalingFactor));
int tileSpacingPx = XposedHelpers.getIntField(tileView, "mTileSpacingPx");
XposedHelpers.setIntField(tileView, "mTileSpacingPx", Math.round(tileSpacingPx*mScalingFactor));
int tilePaddingBelowIconPx = XposedHelpers.getIntField(tileView, "mTilePaddingBelowIconPx");
XposedHelpers.setIntField(tileView, "mTilePaddingBelowIconPx",
Math.round(tilePaddingBelowIconPx*mScalingFactor));
int dualTileVerticalPaddingPx = XposedHelpers.getIntField(tileView, "mDualTileVerticalPaddingPx");
XposedHelpers.setIntField(tileView, "mDualTileVerticalPaddingPx",
Math.round(dualTileVerticalPaddingPx*mScalingFactor));
updateLabelLayout(tileView);
updatePaddingTop(tileView);
if (tileView.getClass().getName().equals(CLASS_SIGNAL_TILE_VIEW) &&
Utils.isMotoXtDevice()) {
updateMotoXtSignalIconLayout(tileView);
}
}
}
示例4: QsTile
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
protected QsTile(Object host, String key, XSharedPreferences prefs,
QsTileEventDistributor eventDistributor) throws Throwable {
super(host, key, prefs, eventDistributor);
mState = new State(mKey);
mTile = createTileObject();
XposedHelpers.setAdditionalInstanceField(mTile, TILE_KEY_NAME, mKey);
if (sResourceIconClass == null) {
sResourceIconClass = getResourceIconClass(mContext.getClassLoader());
}
}
示例5: AospTile
import de.robv.android.xposed.XposedHelpers; //导入方法依赖的package包/类
protected AospTile(Object host, String key, Object tile, XSharedPreferences prefs,
QsTileEventDistributor eventDistributor) throws Throwable {
super(host, key, prefs, eventDistributor);
mTile = tile;
XposedHelpers.setAdditionalInstanceField(tile, BaseTile.TILE_KEY_NAME, mKey);
createHooks();
if (DEBUG) log(mKey + ": aosp tile wrapper created");
}