Skip to content

Commit

Permalink
Add a feature to view communication contents
Browse files Browse the repository at this point in the history
  • Loading branch information
Chipppppppppp committed Mar 9, 2024
1 parent a205df0 commit 8b524a0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public Option(String name, int id, boolean checked) {
public Option deleteKeepUnread = new Option("delete_keep_unread", R.string.switch_delete_keep_unread, false);
public Option blockTracking = new Option("block_tracking", R.string.switch_block_tracking, false);
public Option unlockThemes = new Option("unlock_themes", R.string.switch_unlock_themes, false);
public Option outputCommunication = new Option("output_communication", R.string.switch_output_communication, false);

public Option[] options = {
deleteVoom,
Expand All @@ -46,6 +47,7 @@ public Option(String name, int id, boolean checked) {
sendMuteMessage,
deleteKeepUnread,
blockTracking,
unlockThemes
unlockThemes,
outputCommunication
};
}
16 changes: 16 additions & 0 deletions app/src/main/java/io/github/chipppppppppp/lime/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,22 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
}
});
}

if (limeOptions.outputCommunication.checked) {
hookTarget = lparam.classLoader.loadClass("org.apache.thrift.n");
XposedBridge.hookAllMethods(hookTarget, "a", new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log(param.args[0].toString() + ": " + param.args[1].toString());
}
});
XposedBridge.hookAllMethods(hookTarget, "b", new XC_MethodHook() {
@Override
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
XposedBridge.log(param.args[0].toString() + ": " + param.args[1].toString());
}
});
}
}

@Override
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
<string name="switch_delete_keep_unread">トーク画面右上のメニューにある「未読のまま閲覧」スイッチを削除</string>
<string name="switch_block_tracking">トラッキング通信をブロック (ベータ)</string>
<string name="switch_unlock_themes">着せ替えをアンロック (自己責任です)</string>
<string name="switch_output_communication">通信内容をログに出力 (開発者用)</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
<string name="switch_delete_keep_unread">Delete the \"Keep unread\" switch from the menu in the top right corner of the chat tab</string>
<string name="switch_block_tracking">Block tracking communications (beta)</string>
<string name="switch_unlock_themes">Unlock themes (at your own risk)</string>
<string name="switch_output_communication">Output communication contents to log (for developers)</string>
</resources>

0 comments on commit 8b524a0

Please sign in to comment.