feat(mmp): 独立红包领取台(手机+PC)、同步、筛选与功能说明
隔离通用消息台;支持设置/手气摘要/电脑同步;忽略临时逆向脚本与运行时 JSON。
This commit is contained in:
@@ -10,6 +10,7 @@ import com.miraclegarden.smsmessage.Activity.NotificationActivity;
|
||||
import com.miraclegarden.smsmessage.App;
|
||||
import com.miraclegarden.smsmessage.AppConfig;
|
||||
import com.miraclegarden.smsmessage.MessageInfo;
|
||||
import com.miraclegarden.smsmessage.mmp.MmpPacketStore;
|
||||
import com.miraclegarden.smsmessage.network.DebugForwarder;
|
||||
|
||||
/**
|
||||
@@ -58,6 +59,26 @@ public class HookMessageReceiver extends BroadcastReceiver {
|
||||
Log.i(TAG, "hook received: pkg=" + packageName + " source=" + source + " title=" + title);
|
||||
|
||||
final String finalTitle = title;
|
||||
final boolean isMmp = MmpPacketStore.isMmpContent(content, source);
|
||||
|
||||
// 红包统计:只进领取台,不混入「情况」监听台 / 正式上传
|
||||
if (isMmp) {
|
||||
try {
|
||||
MmpPacketStore.ingest(context.getApplicationContext(), finalTitle, content, source);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "mmp ingest failed", e);
|
||||
}
|
||||
Context appContext = context.getApplicationContext();
|
||||
PendingResult pendingResult = goAsync();
|
||||
Runnable finish = pendingResult::finish;
|
||||
if (AppConfig.ENABLE_DEBUG_FORWARD) {
|
||||
DebugForwarder.forward(appContext, messageInfo, finalTitle, content, timestamp, source, finish);
|
||||
} else {
|
||||
finish.run();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
NotificationActivity.sendMessage("[Hook/" + source + "] " + finalTitle + " " + content);
|
||||
|
||||
Context appContext = context.getApplicationContext();
|
||||
|
||||
Reference in New Issue
Block a user