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