Java Code Examples for de.robv.android.xposed.XposedHelpers#setLongField()

The following examples show how to use de.robv.android.xposed.XposedHelpers#setLongField() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XposedHelpersWraper.java    From MIUIAnesthetist with MIT License 5 votes vote down vote up
public static void setLongField(Object obj, String fieldName, long value) {
    try {
        XposedHelpers.setLongField(obj, fieldName, value);
    } catch (Throwable t) {
        log(t);
    }
}
 
Example 2
Source File: RevokeMsgHook.java    From XposedWechatHelper with GNU General Public License v2.0 5 votes vote down vote up
private static void handleMessageRecall(ContentValues contentValues) {
    long msgId = contentValues.getAsLong("msgId");
    Object msg = msgCacheMap.get(msgId);
    if (msg != null) {
        long createTime = XposedHelpers.getLongField(msg, "field_createTime");
        XposedHelpers.setIntField(msg, "field_type", contentValues.getAsInteger("type"));
        XposedHelpers.setObjectField(msg, "field_content",
                contentValues.getAsString("content") + "(已被阻止)");
        XposedHelpers.setLongField(msg, "field_createTime", createTime + 1L);
        XposedHelpers.callMethod(storageInsertObject,
                ApiFactory.getCurrent().storage_MsgInfoStorage_insert_method, msg, false);
    }
}
 
Example 3
Source File: AntiRevoke.java    From WechatEnhancement with GNU General Public License v3.0 5 votes vote down vote up
private void handleMessageRecall(ContentValues contentValues) {
    long msgId = contentValues.getAsLong("msgId");
    Object msg = msgCacheMap.get(msgId);
    long createTime = XposedHelpers.getLongField(msg, "field_createTime");
    XposedHelpers.setIntField(msg, "field_type", contentValues.getAsInteger("type"));
    XposedHelpers.setObjectField(msg, "field_content",
            contentValues.getAsString("content") + "(已被阻止)");

    XposedHelpers.setLongField(msg, "field_createTime", createTime + 1L);
    XposedHelpers.callMethod(storageInsertClazz, HookParams.getInstance().MsgInfoStorageInsertMethod, msg, false);

}