首页
社区
课程
招聘
[原创]知名社交App(Wx)监控用户输入?逆向源码看看
发表于: 2021-5-4 17:53 4478

[原创]知名社交App(Wx)监控用户输入?逆向源码看看

2021-5-4 17:53
4478

App名称:Wx,想必大家都知道
工具:Apktool、Jadx-gui、IDA
系统平台:MacOs

 

步骤:

 

1 Apktool解码软件包,得到 AndroidManifest.xml,寻找关键模块,发现几个可疑之处:

1
<activity android:configChanges="keyboardHidden|orientation|screenSize" android:name="com.tencent.mm.ui.chatting.ChattingUI" android:windowSoftInputMode="adjustNothing"/>

用Jadx-gui直接打开apk文件,文本搜索上述包名得到如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
package com.tencent.p364mm.p2166ui.chatting;
 
@AbstractC12418j
@SuppressLint({"DefaultLocale", "ValidFragment"})
@TargetApi(11)
/* renamed from: com.tencent.mm.ui.chatting.ChattingUI */
public class ChattingUI extends MMSecDataFragmentActivity {
    public ChattingUIFragment Rti;
    public MMHandler Rtj = new MMHandler();
 
    @Override // androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.tencent.p364mm.p2166ui.component.glocom.GloUIComponentActivity, com.tencent.p364mm.p2166ui.component.UIComponentActivity, com.tencent.p364mm.p2166ui.component.UIComponentActivity, com.tencent.p364mm.plugin.secdata.p1722ui.MMSecDataFragmentActivity, com.tencent.p364mm.hellhoundlib.activities.HellActivity, com.tencent.p364mm.p2166ui.MMFragmentActivity
    public void onWindowFocusChanged(boolean z) {
        super.onWindowFocusChanged(z);
        AppMethodBeat.m18333at(this, z);
    }
 
    public ChattingUI() {
        AppMethodBeat.m18334i(34694);
        AppMethodBeat.m18335o(34694);
    }
 
    @Override // androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.tencent.p364mm.p2166ui.component.UIComponentActivity, com.tencent.p364mm.hellhoundlib.activities.HellActivity, com.tencent.p364mm.p2166ui.MMFragmentActivity
    public void onCreate(Bundle bundle) {
        AppMethodBeat.m18334i(34695);
        getWindow().setFormat(-2);
        if (!C68561at.hrO() && !C68561at.hrP()) {
            C64911h.m98158aW(this);
        }
        super.onCreate(null);
        if (C69545c.m109506bE(getIntent())) {
            finish();
            AppMethodBeat.m18335o(34695);
            return;
        }
        setContentView(C6760R.C6765layout.f11845u8);
        this.Rti = huN();
        Bundle extras = getIntent().getExtras();
        extras.putBoolean("FROM_CHATTING_ACTIVITY", true);
        this.Rti.setArguments(extras);
        getSupportFragmentManager().beginTransaction().mo3425a(C6760R.C6763id.fgf, this.Rti).mo3446ic();
        getSupportActionBar().show();
        if (getIntent().getBooleanExtra("resend_fail_messages", false)) {
            MMHandlerThread.postToMainThreadDelayed(new Runnable() {
                /* class com.tencent.p364mm.p2166ui.chatting.ChattingUI.RunnableC690751 */
 
                public final void run() {
                    AppMethodBeat.m18334i(34692);
                    C68769h.m108143c(ChattingUI.this, ChattingUI.this.getString(C6760R.string.ffz), "", ChattingUI.this.getString(C6760R.string.fg0), ChattingUI.this.getString(C6760R.string.f12842sz), new DialogInterface.OnClickListener() {
                        /* class com.tencent.p364mm.p2166ui.chatting.ChattingUI.RunnableC690751.DialogInterface$OnClickListenerC690761 */
 
                        public final void onClick(DialogInterface dialogInterface, int i) {
                            AppMethodBeat.m18334i(34690);
                            EventCenter.instance.publish(new C10872sz());
                            AppMethodBeat.m18335o(34690);
                        }
                    }, new DialogInterface.OnClickListener() {
                        /* class com.tencent.p364mm.p2166ui.chatting.ChattingUI.RunnableC690751.DialogInterface$OnClickListenerC690772 */
 
                        public final void onClick(DialogInterface dialogInterface, int i) {
                            AppMethodBeat.m18334i(34691);
                            EventCenter.instance.publish(new C10646ow());
                            AppMethodBeat.m18335o(34691);
                        }
                    });
                    AppMethodBeat.m18335o(34692);
                }
            }, 500);
            getIntent().putExtra("is_need_resend_sns", false);
        }
        initNavigationSwipeBack();
        this.Rtj.post(new Runnable() {
            /* class com.tencent.p364mm.p2166ui.chatting.ChattingUI.RunnableC690782 */
 
            public final void run() {
                AppMethodBeat.m18334i(34693);
                if (ChattingUI.this.Rti != null && !C68561at.hrO() && !C68561at.hrP()) {
                    C64911h.m98157a((MMFragmentActivity) ChattingUI.this, ChattingUI.this.Rti.getBodyView());
                }
                C8846b.m22295cF(ChattingUI.this.Rti.getContext());
                AppMethodBeat.m18335o(34693);
            }
        });
        AppMethodBeat.m18335o(34695);
    }
 
    @Override // androidx.fragment.app.FragmentActivity, com.tencent.p364mm.p2166ui.component.UIComponentActivity, com.tencent.p364mm.hellhoundlib.activities.HellActivity, com.tencent.p364mm.p2166ui.MMFragmentActivity
    public void onResume() {
        AppMethodBeat.m18334i(259169);
        super.onResume();
        if (C68561at.hrO()) {
            C13869bg.getNotification().mo26811dA(true);
        }
        AppMethodBeat.m18335o(259169);
    }
 
    @Override // androidx.fragment.app.FragmentActivity, com.tencent.p364mm.p2166ui.component.UIComponentActivity, com.tencent.p364mm.hellhoundlib.activities.HellActivity, com.tencent.p364mm.p2166ui.MMFragmentActivity
    public void onPause() {
        AppMethodBeat.m18334i(259170);
        super.onPause();
        if (C68561at.hrO()) {
            C13869bg.getNotification().mo26811dA(false);
        }
        AppMethodBeat.m18335o(259170);
    }
 
    /* access modifiers changed from: protected */
    public ChattingUIFragment huN() {
        AppMethodBeat.m18334i(34696);
        ChattingUIFragment chattingUIFragment = new ChattingUIFragment((byte) 0);
        AppMethodBeat.m18335o(34696);
        return chattingUIFragment;
    }
 
    @Override // com.tencent.p364mm.p2166ui.component.UIComponentActivity, com.tencent.p364mm.hellhoundlib.activities.HellActivity, com.tencent.p364mm.p2166ui.MMFragmentActivity
    public void finish() {
        AppMethodBeat.m18334i(259171);
        if (this.Rti != null && ((AbstractC69435ai) this.Rti.duI.mo99210aY(AbstractC69435ai.class)).hzb() && !((AbstractC69435ai) this.Rti.duI.mo99210aY(AbstractC69435ai.class)).hze()) {
            int hzg = ((AbstractC69435ai) this.Rti.duI.mo99210aY(AbstractC69435ai.class)).hzg();
            getIntent().putExtra("select_record_msg_num", hzg);
            Set<Long> hwy = ((AbstractC69459k) this.Rti.duI.mo99210aY(AbstractC69459k.class)).hwy();
            if (hwy != null) {
                long j = MAlarmHandler.NEXT_FIRE_INTERVAL;
                for (Long l : hwy) {
                    if (l.longValue() < j) {
                        j = l.longValue();
                    } else {
                        j = j;
                    }
                }
                getIntent().putExtra("select_record_min_msg_id", j);
            }
            CopyOnWriteArraySet<Long> hzf = ((AbstractC69435ai) this.Rti.duI.mo99210aY(AbstractC69435ai.class)).hzf();
            if (hzf != null) {
                ArrayList<String> arrayList = new ArrayList<>();
                for (Long l2 : hzf) {
                    arrayList.add(String.valueOf(l2.longValue()));
                }
                getIntent().putStringArrayListExtra("key_select_record_msg_black_list", arrayList);
            }
            Log.m105219i("MicroMsg.ChattingUI", "select record msg %s", Integer.valueOf(hzg));
            setResult(-1, getIntent());
        }
        super.finish();
        AppMethodBeat.m18335o(259171);
    }
 
    @Override // androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, com.tencent.p364mm.p2166ui.MMFragmentActivity
    public boolean dispatchKeyEvent(KeyEvent keyEvent) {
        AppMethodBeat.m18334i(34697);
        Log.m105213d("MicroMsg.ChattingUI", "chatting ui dispatch key event %s", keyEvent);
        if (this.Rti == null || !this.Rti.onKeyDown(keyEvent.getKeyCode(), keyEvent)) {
            boolean dispatchKeyEvent = super.dispatchKeyEvent(keyEvent);
            AppMethodBeat.m18335o(34697);
            return dispatchKeyEvent;
        }
        AppMethodBeat.m18335o(34697);
        return true;
    }
 
    @Override // com.tencent.p364mm.p2166ui.component.UIComponentActivity
    public boolean onKeyUp(int i, KeyEvent keyEvent) {
        AppMethodBeat.m18334i(34698);
        Log.m105212d("MicroMsg.ChattingUI", "chatting ui on key up");
        boolean onKeyUp = super.onKeyUp(i, keyEvent);
        AppMethodBeat.m18335o(34698);
        return onKeyUp;
    }
 
    @Override // androidx.appcompat.app.AppCompatActivity, com.tencent.p364mm.p2166ui.component.UIComponentActivity
    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        AppMethodBeat.m18334i(34699);
        Log.m105213d("MicroMsg.ChattingUI", "chatting ui on key down, %d, %s", Integer.valueOf(i), keyEvent);
        boolean onKeyDown = super.onKeyDown(i, keyEvent);
        AppMethodBeat.m18335o(34699);
        return onKeyDown;
    }
 
    @Override // androidx.fragment.app.FragmentActivity, com.tencent.p364mm.p2166ui.component.UIComponentActivity, androidx.core.app.C0475a.AbstractC0477a
    public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
        AppMethodBeat.m18334i(34700);
        Log.m105218i("MicroMsg.ChattingUI", "chatting onRequestPermissionsResult");
        this.Rti.onRequestPermissionsResult(i, strArr, iArr);
        AppMethodBeat.m18335o(34700);
    }
 
    @Override // androidx.fragment.app.FragmentActivity, com.tencent.p364mm.p2166ui.component.UIComponentActivity, com.tencent.p364mm.p2166ui.MMFragmentActivity
    public void onActivityResult(int i, int i2, Intent intent) {
        AppMethodBeat.m18334i(34701);
        super.onActivityResult(i, i2, intent);
        this.Rti.onActivityResult(i, i2, intent);
        AppMethodBeat.m18335o(34701);
    }
 
    @Override // androidx.fragment.app.FragmentActivity, com.tencent.p364mm.p2166ui.component.UIComponentActivity, com.tencent.p364mm.hellhoundlib.activities.HellActivity, com.tencent.p364mm.p2166ui.MMFragmentActivity
    public void startActivityForResult(Intent intent, int i, Bundle bundle) {
        AppMethodBeat.m18334i(259172);
        if (!(intent == null || intent.getComponent() == null)) {
            C72100x xVar = C72100x.SIV;
            C72100x.bvO(intent.getComponent().getClassName());
        }
        super.startActivityForResult(intent, i, bundle);
        AppMethodBeat.m18335o(259172);
    }
}

以上是处理聊天界面的核心代码,注意第57行处的C69545c类代码调用,下面贴出过程代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
package com.tencent.p364mm.p2166ui.chatting.p2176d;
 
@AbstractC69257a(hzT = AbstractC69452d.class)
/* renamed from: com.tencent.mm.ui.chatting.d.c */
public class C69545c extends C69256a implements AbstractC7135p, AbstractC69452d {
    private C7207c CHz;
    public C7054k CJj;
    private DialogC72358d CJs = null;
    public C7033c RjU;
    private C7034d.AbstractC7036a RkE = new C7034d.AbstractC7036a() {
        /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.C6954911 */
 
        @Override // com.tencent.p364mm.p385am.p386a.C7034d.AbstractC7036a
        /* renamed from: a */
        public final void mo24948a(C7034d.AbstractC7036a.C7038b bVar) {
            AppMethodBeat.m18334i(35092);
            if (C69545c.this.tFk && bVar != null && bVar.jiR == C69545c.this.hxn()) {
                if (!C69545c.this.duI.div) {
                    Log.m105218i("MicroMsg.ChattingUI.BizComponent", "onNotifyChange fragment not foreground, return");
                    AppMethodBeat.m18335o(35092);
                    return;
                } else if (bVar.jjb != C7034d.AbstractC7036a.EnumC7037a.DELETE) {
                    Log.m105218i("MicroMsg.ChattingUI.BizComponent", "bizChatExtension bizChat change");
                    C69545c.this.RjU = C7080ag.bij().mo24947bF(C69545c.this.hxn());
                    if (!C69545c.this.Rxe) {
                        C7054k gi = C7080ag.bil().mo24973gi(C69545c.this.RjU.field_bizChatServId);
                        if (gi != null) {
                            C69545c.this.CJj = gi;
                        }
                    } else {
                        C69545c.this.Rxm = C7039e.m19061c(C69545c.this.RjU);
                        ((AbstractC69427aa) C69545c.this.duI.mo99210aY(AbstractC69427aa.class)).hyC();
                    }
                    ((AbstractC69427aa) C69545c.this.duI.mo99210aY(AbstractC69427aa.class)).hxG();
                    AppMethodBeat.m18335o(35092);
                    return;
                } else if (C69545c.this.Rxe) {
                    Toast.makeText(MMApplicationContext.getContext(), C69545c.this.duI.RGA.getMMResources().getString(C6760R.string.g75), 1).show();
                    C69545c.this.duI.RGA.hvn();
                }
            }
            AppMethodBeat.m18335o(35092);
        }
    };
    protected final ChatFooter.AbstractC65562g RnN = new ChatFooter.AbstractC65562g() {
        /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.C6954810 */
 
        @Override // com.tencent.p364mm.pluginsdk.p2127ui.chat.ChatFooter.AbstractC65562g
        /* renamed from: Cs */
        public final boolean mo92826Cs(boolean z) {
            AppMethodBeat.m18334i(35091);
            if (C69545c.this.CHz == null) {
                AppMethodBeat.m18335o(35091);
                return false;
            }
            C7207c.C7209b cY = C69545c.this.CHz.mo25199cY(false);
            if (cY == null) {
                AppMethodBeat.m18335o(35091);
                return false;
            }
            C7207c.C7209b.C7212c ZM = cY.mo25212ZM();
            if (ZM == null || ZM.dou == null || ZM.dou.isEmpty()) {
                AppMethodBeat.m18335o(35091);
                return false;
            }
            try {
                JSONObject jSONObject = new JSONObject(ZM.dou.get(0).value);
                AppBrandStatObject appBrandStatObject = new AppBrandStatObject();
                appBrandStatObject.scene = 1083;
                appBrandStatObject.dIW = C69545c.this.CHz.field_username;
                ((AbstractC24562r) C12403h.m27078U(AbstractC24562r.class)).mo43898a(MMApplicationContext.getContext(), jSONObject.optString("userName"), null, 0, 0, jSONObject.optString("pagePath"), appBrandStatObject, C69545c.this.CHz.field_appId);
                AppMethodBeat.m18335o(35091);
                return true;
            } catch (JSONException e) {
                AppMethodBeat.m18335o(35091);
                return false;
            }
        }
    };
    protected final AbstractC69565a RoJ = new AbstractC69565a() {
        /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.C695461 */
 
        @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.AbstractC69565a
        public final boolean hxq() {
            AppMethodBeat.m18334i(35086);
            if (C69545c.this.Rxg == null) {
                C69629m.m109571a(C69545c.this.duI.RGA, (int) C6760R.C6763id.j7r);
                C69545c.this.Rxg = (RelativeLayout) C69545c.this.duI.findViewById(C6760R.C6763id.a_h);
                C69545c.this.Rxh = (TextView) C69545c.this.duI.findViewById(C6760R.C6763id.a_i);
                C69545c.this.Rxh.setText(C6760R.string.aw4);
            }
            C69545c.this.Rxg.setVisibility(0);
            C69724a.hAd().postDelayed(new Runnable() {
                /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.C695461.RunnableC695471 */
 
                public final void run() {
                    AppMethodBeat.m18334i(35085);
                    if (!(C69545c.this.Rxg == null || C69545c.this.Rxg.getVisibility() == 8)) {
                        C69545c.this.Rxg.setVisibility(8);
                    }
                    if (C69545c.this.duI == null) {
                        Log.m105214e("MicroMsg.ChattingUI.BizComponent", "[onProcecssClick] mChattingContext is null!");
                        AppMethodBeat.m18335o(35085);
                        return;
                    }
                    ((AbstractC69427aa) C69545c.this.duI.mo99210aY(AbstractC69427aa.class)).hxG();
                    C69545c.this.duI.cwD();
                    AppMethodBeat.m18335o(35085);
                }
            }, 5000);
            AppMethodBeat.m18335o(35086);
            return true;
        }
    };
    private C7416a Rxb;
    private long Rxc = 0;
    private C67851ca Rxd;
    public boolean Rxe = false;
    private long Rxf = -1;
    private RelativeLayout Rxg;
    private TextView Rxh;
    private int Rxi;
    private boolean Rxj = false;
    private boolean Rxk = false;
    private C7111f.AbstractC7113a Rxl = new C7111f.AbstractC7113a() {
        /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.C6955012 */
 
        @Override // com.tencent.p364mm.p385am.C7111f.AbstractC7113a
        /* renamed from: a */
        public final void mo24986a(final C7111f.AbstractC7113a.C7115b bVar) {
            AppMethodBeat.m18334i(35094);
            if (bVar != null && bVar.jhv == C7111f.AbstractC7113a.EnumC7114a.UPDATE && bVar.jhj != null && bVar.jhj.equals(C69545c.this.duI.getTalkerUserName())) {
                C13869bg.bdt();
                final C67792as Pg = C13921c.baz().mo95180Pg(bVar.jhj);
                if (Pg == null || ((int) Pg.hcf) == 0) {
                    Log.m105219i("MicroMsg.ChattingUI.BizComponent", "Get contact from db return null.(username : %s)", bVar.jhj);
                    AppMethodBeat.m18335o(35094);
                    return;
                }
                MMHandlerThread.postToMainThread(new Runnable() {
                    /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.C6955012.RunnableC695511 */
 
                    public final void run() {
                        AppMethodBeat.m18334i(35093);
                        if (C69545c.this.Rxj && bVar.jhj.equals(C69545c.this.duI.getTalkerUserName())) {
                            Log.m105218i("MicroMsg.ChattingUI.BizComponent", "try to refresh footer.");
                            C69545c.this.CHz = C7116g.m19200gq(bVar.jhj);
                            if (C69545c.this.duI != null && C69545c.this.Rxk) {
                                ((AbstractC69469u) C69545c.this.duI.mo99210aY(AbstractC69469u.class)).mo99028at(Pg);
                            }
                        }
                        AppMethodBeat.m18335o(35093);
                    }
                });
            }
            AppMethodBeat.m18335o(35094);
        }
    };
    private boolean Rxm = false;
    private ecd jhN = null;
    private IListener pQP = new IListener<C11034w>() {
        /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.C6955213 */
 
        {
            AppMethodBeat.m18334i(161524);
            AppMethodBeat.m18335o(161524);
        }
 
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [com.tencent.mm.sdk.event.IEvent] */
        @Override // com.tencent.p364mm.sdk.event.IListener
        public final /* synthetic */ boolean callback(C11034w wVar) {
            AppMethodBeat.m18334i(35095);
            Log.m105219i("MicroMsg.ChattingUI.BizComponent", "AppMsgRelatedInfoUpdateEvent scene %d", Integer.valueOf(wVar.dJp.scene));
            C69545c.this.duI.cwD();
            AppMethodBeat.m18335o(35095);
            return false;
        }
    };
    public boolean tFk = false;
 
    /* renamed from: com.tencent.mm.ui.chatting.d.c$a */
    public interface AbstractC69565a {
        boolean hxq();
    }
 
    public C69545c() {
        AppMethodBeat.m18334i(35100);
        AppMethodBeat.m18335o(35100);
    }
 
    /* renamed from: f */
    static /* synthetic */ void m109511f(C69545c cVar) {
        AppMethodBeat.m18334i(35127);
        cVar.hxp();
        AppMethodBeat.m18335o(35127);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final C7207c hwX() {
        return this.CHz;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final C7033c hwY() {
        return this.RjU;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final C7054k hwZ() {
        return this.CJj;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final boolean hxa() {
        return this.tFk;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final boolean hxb() {
        return this.Rxe;
    }
 
    /* renamed from: bE */
    public static boolean m109506bE(Intent intent) {
        AppMethodBeat.m18334i(35101);
        String stringExtra = intent.getStringExtra("Chat_User");
        boolean booleanExtra = intent.getBooleanExtra("key_is_biz_chat", false);
        if (!booleanExtra && stringExtra == null) {
            Log.m105214e("MicroMsg.ChattingUI.BizComponent", "talker is null !!!");
            AppMethodBeat.m18335o(35101);
            return true;
        } else if (!booleanExtra || intent.getLongExtra("key_biz_chat_id", -1) != -1) {
            AppMethodBeat.m18335o(35101);
            return false;
        } else {
            Log.m105214e("MicroMsg.ChattingUI.BizComponent", "bizChatId is null !!");
            AppMethodBeat.m18335o(35101);
            return true;
        }
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final boolean hxc() {
        AppMethodBeat.m18334i(35102);
        if (this.tFk) {
            if (this.Rxe) {
                int Fb = C7039e.m19045Fb(hxn());
                if (!Util.isNullOrNil(this.RjU.field_chatName)) {
                    ((AbstractC69427aa) this.duI.mo99210aY(AbstractC69427aa.class)).setMMTitle(this.duI.RGA.getMMResources().getString(C6760R.string.dea, this.RjU.field_chatName, Integer.valueOf(Fb)));
                } else if (Fb == 0) {
                    this.duI.RGA.setMMTitle(this.duI.RGA.getMMResources().getString(C6760R.string.b25));
                } else {
                    this.duI.RGA.setMMTitle(this.duI.RGA.getMMResources().getString(C6760R.string.dea, this.duI.RGA.getMMResources().getString(C6760R.string.b25), Integer.valueOf(Fb)));
                }
            } else {
                this.duI.RGA.setMMTitle(this.CJj.field_userName);
            }
            AppMethodBeat.m18335o(35102);
            return true;
        }
        AppMethodBeat.m18335o(35102);
        return false;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final AbstractC69565a hxd() {
        return this.RoJ;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final ChatFooter.AbstractC65562g hxe() {
        return this.RnN;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    /* renamed from: SD */
    public final String mo98961SD(String str) {
        AppMethodBeat.m18334i(35103);
        C7054k Sx = this.RjU.mo24936Sx(str);
        if (Sx != null) {
            String str2 = Sx.field_headImageUrl;
            AppMethodBeat.m18335o(35103);
            return str2;
        }
        AppMethodBeat.m18335o(35103);
        return null;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final List<C67851ca> hxf() {
        int i = 100;
        AppMethodBeat.m18334i(35104);
        C7025a EV = C7080ag.bik().mo24916EV(hxn());
        if (EV.field_unReadCount <= 100) {
            i = EV.field_unReadCount;
        }
        C13869bg.bdt();
        List<C67851ca> t = C13921c.baD().mo95726t(this.duI.IRh.field_username, hxn(), i);
        AppMethodBeat.m18335o(35104);
        return t;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final boolean hxg() {
        return this.Rxm;
    }
 
    private void gTQ() {
        int i;
        AppMethodBeat.m18334i(35105);
        C13906br.m29242J("bizflag", false);
        this.pQP.dead();
        if (this.tFk) {
            hxp();
            C7080ag.biv();
            C7033c cVar = this.RjU;
            if (C12343b.m26994sN(C12403h.aGC().hGk)) {
                String format = String.format("%s;%s;%d", cVar.field_brandUserName, cVar.field_bizChatServId, Long.valueOf(System.currentTimeMillis() / 1000));
                C14311ab.m29931b(cVar.field_brandUserName, 8, "EnterpriseChatStatus", format);
                Log.m105213d("MicroMsg.BizChatStatusNotifyService", "quitChat:arg:%s", format);
            }
        }
        if (this.Rxc != 0) {
            i = ((int) (System.currentTimeMillis() - this.Rxc)) / 1000;
        } else {
            i = 0;
        }
        if (C13869bg.aGz()) {
            if (this.tFk) {
                C7080ag.bij().mo24943a(this.RkE);
            }
            if (this.duI.IRh != null && this.duI.IRh.hhp()) {
                C7080ag.bih().mo25016a(this.Rxl);
            }
            if (C9004d.m22488ru(this.duI.IRh.field_type) && this.duI.IRh.hhp() && !C7116g.m19185It(this.duI.getTalkerUserName())) {
                if (this.CHz != null && this.CHz.mo25186Zk()) {
                    if (this.jhN == null) {
                        this.jhN = new ecd();
                    }
                    this.jhN.PbQ = i;
                    this.jhN.PbU = this.duI.RGA.getIntExtra("Main_IndexInSessionList", 0);
                    this.jhN.PbS = this.duI.RGA.getIntExtra("Main_UnreadCount", 0);
                    if (this.Rxd != null) {
                        this.jhN.PbT = this.Rxd.getType();
                        if (this.jhN.PbS > 0) {
                            this.jhN.PbR = ((int) (this.Rxc - this.Rxd.field_createTime)) / 1000;
                        }
                    }
                }
                C7080ag.bit().mo25044a(this.duI.getTalkerUserName(), this.jhN);
            }
        }
        if (C7416a.m19932d(this.CHz) && this.Rxb != null) {
            Log.m105219i("MicroMsg.ChattingUI.BizComponent", "hardevice brand account, init event : %s, notify exit chattingui", hxk());
            this.Rxb.mo25608a(2, this.CHz);
            this.duI.RGA.setMMSubTitle((String) null);
        }
        if (C9004d.m22488ru(this.duI.IRh.field_type) && this.duI.IRh.hhp() && i != 0) {
            EnumC50931h.INSTANCE.mo74796a(10638, this.duI.getTalkerUserName(), Integer.valueOf(i), Integer.valueOf(this.duI.RGA.getIntExtra("biz_click_item_unread_count", 0)), Integer.valueOf(this.duI.RGA.getIntExtra("biz_click_item_position", 0)), Integer.valueOf(this.duI.RGA.getIntExtra("specific_chat_from_scene", 0)), Integer.valueOf(C67748ab.getSessionId()));
        }
        if (this.Rxb != null) {
            C7416a aVar = this.Rxb;
            Log.m105212d("MicroMsg.exdevice.ChattingUIExDeviceLogic", "now release the event listener");
            if (aVar.duJ != null) {
                EventCenter.instance.removeListener(aVar.duJ);
                aVar.duJ = null;
                if (aVar.duM != null) {
                    aVar.duM.clear();
                }
            }
            aVar.duN = false;
            if (aVar.duK != null) {
                EventCenter.instance.removeListener(aVar.duK);
                aVar.duK = null;
            }
            this.Rxb = null;
        }
        C67748ab.bqH(null);
        this.Rxc = 0;
        AppMethodBeat.m18335o(35105);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final void hxh() {
        String string;
        AppMethodBeat.m18334i(35106);
        if (this.CHz == null) {
            AppMethodBeat.m18335o(35106);
            return;
        }
        final boolean z = !C14209d.bke() && !C14209d.bkf();
        if (this.CHz.field_hadAlert == 0 && z) {
            string = this.duI.RGA.getMMResources().getString(C6760R.string.axs, this.duI.IRh.axz());
        } else if (z) {
            string = this.duI.RGA.getMMResources().getString(C6760R.string.axt);
        } else {
            string = this.duI.RGA.getMMResources().getString(C6760R.string.axr, this.duI.IRh.axz());
        }
        this.CJs = C68769h.m108116a(this.duI.RGA.getContext(), string, this.duI.RGA.getMMResources().getString(C6760R.string.f13077zb), new DialogInterface.OnClickListener() {
            /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.DialogInterface$OnClickListenerC6955516 */
 
            public final void onClick(DialogInterface dialogInterface, int i) {
                AppMethodBeat.m18334i(35098);
                C69545c.this.CHz.field_hadAlert = 1;
                C7207c cVar = C69545c.this.CHz;
                if (cVar != null) {
                    cVar.field_brandFlag |= 4;
                    C7116g.m19202j(cVar);
                }
                if (z) {
                    Intent intent = new Intent("android.settings.LOCATION_SOURCE_SETTINGS");
                    BaseChattingUIFragment baseChattingUIFragment = C69545c.this.duI.RGA;
                    C12112a bm = new C12112a().mo32574bm(intent);
                    C12107a.m26668a(baseChattingUIFragment, bm.aEe(), "com/tencent/mm/ui/chatting/component/BizComponent$8", "onClick", "(Landroid/content/DialogInterface;I)V", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
                    baseChattingUIFragment.startActivity((Intent) bm.mo32575sq(0));
                    C12107a.m26673b(baseChattingUIFragment, "com/tencent/mm/ui/chatting/component/BizComponent$8", "onClick", "(Landroid/content/DialogInterface;I)V", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
                    AppMethodBeat.m18335o(35098);
                    return;
                }
                C7080ag.bit().mo25043Sn(C69545c.this.duI.getTalkerUserName());
                AppMethodBeat.m18335o(35098);
            }
        }, new DialogInterface.OnClickListener() {
            /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.DialogInterface$OnClickListenerC6955617 */
 
            public final void onClick(DialogInterface dialogInterface, int i) {
                AppMethodBeat.m18334i(35099);
                C69545c.this.CHz.field_hadAlert = 1;
                C7207c cVar = C69545c.this.CHz;
                if (cVar != null) {
                    cVar.field_brandFlag &= -5;
                    C7116g.m19202j(cVar);
                }
                C7080ag.bit().mo25043Sn(C69545c.this.duI.getTalkerUserName());
                AppMethodBeat.m18335o(35099);
            }
        });
        AppMethodBeat.m18335o(35106);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final void hxi() {
        AppMethodBeat.m18334i(35107);
        Intent intent = new Intent();
        intent.putExtra("Contact_User", this.duI.getTalkerUserName());
        intent.putExtra("key_start_biz_profile_setting_from_scene", 1);
        C8247c.m21410b(this.duI.RGA.getContext(), Scopes.PROFILE, ".ui.newbizinfo.NewBizInfoSettingUI", intent);
        AppMethodBeat.m18335o(35107);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final int hxj() {
        return this.Rxi;
    }
 
    /* renamed from: i */
    private boolean m109514i(KeyEvent keyEvent) {
        AppMethodBeat.m18334i(35108);
        if (keyEvent.getKeyCode() == 82 && keyEvent.getAction() == 1 && (this.CHz == null || this.CHz.mo25199cY(false) == null || this.CHz.mo25199cY(false).mo25212ZM() == null || this.CHz.mo25199cY(false).mo25212ZM().dou == null || this.CHz.mo25199cY(false).mo25212ZM().dou.isEmpty())) {
            ((AbstractC69469u) this.duI.mo99210aY(AbstractC69469u.class)).hyb().mo92678hu(null);
        }
        AppMethodBeat.m18335o(35108);
        return false;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final String hxk() {
        if (this.tFk) {
            if (this.Rxe) {
                if (this.RjU == null) {
                    return null;
                }
                return this.RjU.field_chatName;
            } else if (this.CJj != null) {
                return this.CJj.field_userName;
            } else {
                return null;
            }
        } else if (this.duI.IRh != null) {
            return this.duI.IRh.field_nickname;
        } else {
            return null;
        }
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final boolean hxl() {
        boolean z;
        AppMethodBeat.m18334i(35109);
        Intent intent = new Intent(this.duI.RGA.getContext(), ChatroomInfoUI.class);
        if ((this.duI.hzZ() || this.Rxe) && !this.tFk) {
            intent.putExtra("Chat_User", this.duI.IRh.field_username);
            intent.putExtra("RoomInfo_Id", this.duI.getTalkerUserName());
            intent.putExtra("Is_Chatroom", this.duI.hzZ());
            intent.putExtra("fromChatting", true);
            C69724a aVar = this.duI;
            C12112a bm = new C12112a().mo32574bm(intent);
            C12107a.m26668a(aVar, bm.aEe(), "com/tencent/mm/ui/chatting/component/BizComponent", "doRightBtnClick", "()Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
            aVar.startActivity((Intent) bm.mo32575sq(0));
            C12107a.m26673b(aVar, "com/tencent/mm/ui/chatting/component/BizComponent", "doRightBtnClick", "()Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
            AppMethodBeat.m18335o(35109);
            return true;
        } else if (this.tFk) {
            intent.setClass(this.duI.RGA.getContext(), BizChatroomInfoUI.class);
            intent.putExtra("Chat_User", this.duI.IRh.field_username);
            intent.putExtra("key_biz_chat_id", hxn());
            if (this.duI.RGA.thisActivity() instanceof ChattingUI) {
                intent.putExtra("key_biz_chat_info_from_scene", 1);
            } else {
                intent.putExtra("key_biz_chat_info_from_scene", 2);
            }
            BaseChattingUIFragment baseChattingUIFragment = this.duI.RGA;
            C12112a bm2 = new C12112a().mo32574bm(intent);
            C12107a.m26668a(baseChattingUIFragment, bm2.aEe(), "com/tencent/mm/ui/chatting/component/BizComponent", "doRightBtnClick", "()Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
            baseChattingUIFragment.startActivity((Intent) bm2.mo32575sq(0));
            C12107a.m26673b(baseChattingUIFragment, "com/tencent/mm/ui/chatting/component/BizComponent", "doRightBtnClick", "()Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
            AppMethodBeat.m18335o(35109);
            return true;
        } else if (C13808ab.m29005Ou(this.duI.getTalkerUserName()) || C67792as.bqU(this.duI.getTalkerUserName()) || C67792as.bqW(this.duI.getTalkerUserName()) || C13808ab.m29001Oq(this.duI.getTalkerUserName()) || C67792as.m105571NA(this.duI.getTalkerUserName()) || this.duI.IRh.hhp()) {
            Intent intent2 = new Intent();
            C71161e.m112322s(intent2, this.duI.getTalkerUserName());
            if (this.duI.RGA.getIntExtra("chat_from_scene", 0) == 2) {
                intent2.putExtra("Kdel_from", 2);
            } else {
                intent2.putExtra("Kdel_from", 0);
            }
            intent2.putExtra("chat_from_scene", this.duI.RGA.getIntExtra("chat_from_scene", 0));
            intent2.putExtra("preUsername", this.duI.getTalkerUserName());
            intent2.putExtra("preChatName", this.duI.getTalkerUserName());
            intent2.putExtra("preChatTYPE", this.duI.RGA.getIntExtra("preChatTYPE", (this.CHz == null || !this.CHz.mo25186Zk()) ? 7 : 6));
            Intent intent3 = this.duI.RGA.getContext().getIntent();
            int intExtra = intent3.getIntExtra("key_temp_session_scene", 5);
            if (intExtra == 16 || intExtra == 17 || intent3.getBooleanExtra("key_biz_profile_stay_after_follow_op", false)) {
                intent2.putExtra("Kdel_from", 1);
                z = true;
            } else {
                z = false;
            }
            intent2.putExtra("key_biz_profile_stay_after_follow_op", z);
            if (((AbstractC69431ae) this.duI.mo99210aY(AbstractC69431ae.class)).hza() && C69629m.buu(this.duI.getTalkerUserName())) {
                if (intExtra == 16) {
                    intent2.putExtra("Contact_Scene", 92);
                } else if (intExtra == 17) {
                    intent2.putExtra("Contact_Scene", 93);
                } else if (intExtra == 18) {
                    intent2.putExtra("Contact_Scene", 94);
                } else {
                    intent2.putExtra("Contact_Scene", 81);
                }
            }
            if (this.duI.getTalkerUserName().equals("gh_43f2581f6fd6")) {
                C55536d.m85204rQ(2);
                C47503a.eWu();
                if (C47510e.m74437Yr(C47509d.CgL)) {
                    C47503a.eWr();
                    C47516i.m74458Yt(C47509d.CgL);
                    intent2.putExtra("key_from_wesport_right_newtips", true);
                }
            }
            intent2.putExtra("KOpenArticleSceneFromScene", 0);
            C8247c.m21411b(this.duI.RGA.getContext(), Scopes.PROFILE, ".ui.ContactInfoUI", intent2, 213);
            AppMethodBeat.m18335o(35109);
            return true;
        } else {
            AppMethodBeat.m18335o(35109);
            return false;
        }
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final boolean hxm() {
        AppMethodBeat.m18334i(35110);
        if (this.duI == null) {
            Log.m105214e("MicroMsg.ChattingUI.BizComponent", "[writeOpLogAndMarkReadTContact] mChattingContext is null!");
            AppMethodBeat.m18335o(35110);
            return false;
        }
        if (this.duI.IRh.hhp() && this.CHz != null) {
            if (this.tFk) {
                boolean EX = C7080ag.bik().mo24918EX(hxn());
                AppMethodBeat.m18335o(35110);
                return EX;
            } else if (this.CHz.mo25190Zo()) {
                if (!(this.CHz.mo25199cY(false) == null || this.CHz.mo25199cY(false).mo25215ZP() == null || Util.isNullOrNil(this.CHz.mo25197Zv()))) {
                    C13869bg.bdt();
                    C67802az brV = C13921c.baF().brV(this.CHz.mo25197Zv());
                    if (brV != null && brV.field_username.equals(this.duI.getTalkerUserName()) && brV.field_unReadCount > 0) {
                        if (this.duI.RGA.getIntExtra("chat_from_scene", 0) == 2) {
                            AppMethodBeat.m18335o(35110);
                            return false;
                        }
                        C13869bg.bdt();
                        C13921c.baF().brJ(this.CHz.mo25197Zv());
                    }
                }
            } else if (!this.CHz.mo25186Zk() && !this.CHz.mo25188Zm()) {
                if (!C67748ab.cvg()) {
                    C13869bg.bdt();
                    C67802az hif = C13921c.baF().hif();
                    if (hif != null && hif.field_username.equals(this.duI.getTalkerUserName()) && hif.field_unReadCount > 0) {
                        C13869bg.bdt();
                        C13921c.baF().brJ("officialaccounts");
                    }
                } else if (C7080ag.bin().hgt() > 0) {
                    C67736aa bin = C7080ag.bin();
                    bin.iYG.execSQL("BizTimeLineInfo", "update BizTimeLineInfo set hasShow = 1 where hasShow < 1  and talker = '" + this.duI.getTalkerUserName() + "' ");
                    C67736aa.C67745a aVar = new C67736aa.C67745a();
                    aVar.PWt = C67736aa.EnumC67746b.UPDATE;
                    bin.mo95034a(aVar);
                }
            }
        }
        if (C13808ab.m28998On(this.duI.getTalkerUserName())) {
            AppMethodBeat.m18335o(35110);
            return true;
        }
        C13869bg.bdt();
        boolean brJ = C13921c.baF().brJ(this.duI.getTalkerUserName());
        AppMethodBeat.m18335o(35110);
        return brJ;
    }
 
    @Override // com.tencent.p364mm.p385am.AbstractC7135p
    /* renamed from: a */
    public final void mo25061a(int i, AbstractC6990q qVar) {
        AppMethodBeat.m18334i(35111);
        if (qVar.getType() == 1357) {
            this.duI.dismissDialog();
            if (i != 0) {
                Toast.makeText(MMApplicationContext.getContext(), this.duI.RGA.getMMResources().getString(C6760R.string.g6_), 0).show();
            }
        }
        AppMethodBeat.m18335o(35111);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final long hxn() {
        if (this.RjU == null) {
            return -1;
        }
        return this.RjU.field_bizChatLocalId;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final void hxo() {
        AppMethodBeat.m18334i(35112);
        C13869bg.aGH().postToWorkerDelayed(new Runnable() {
            /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.RunnableC695572 */
 
            public final void run() {
                AppMethodBeat.m18334i(35087);
                if (C69545c.this.duI == null) {
                    AppMethodBeat.m18335o(35087);
                    return;
                }
                boolean hwC = ((AbstractC69459k) C69545c.this.duI.mo99210aY(AbstractC69459k.class)).hwC();
                if (C69545c.this.tFk && !hwC) {
                    C7039e.m19062d(C69545c.this.RjU);
                }
                AppMethodBeat.m18335o(35087);
            }
        }, 500);
        AppMethodBeat.m18335o(35112);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final String buq(String str) {
        C7207c.C7209b cY;
        AppMethodBeat.m18334i(35113);
        if (!TextUtils.isEmpty(str) && str.contains(HttpWrapperBase.PROTOCAL_HTTP + WeChatHosts.domainString(C6760R.string.e2m) + "/emoticonstore/")) {
            String substring = str.substring(str.lastIndexOf(FilePathGenerator.ANDROID_DIR_SEP) + 1);
            if (C9004d.m22488ru(this.duI.IRh.field_type) && this.duI.IRh.hhp() && this.CHz != null && (cY = this.CHz.mo25199cY(false)) != null && !TextUtils.isEmpty(cY.mo25211ZL()) && substring.contains(cY.mo25211ZL())) {
                AppMethodBeat.m18335o(35113);
                return substring;
            }
        }
        AppMethodBeat.m18335o(35113);
        return null;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    /* renamed from: bV */
    public final void mo98964bV(LinkedList<String> linkedList) {
        AppMethodBeat.m18334i(35114);
        C7080ag.bij().mo24947bF(hxn());
        final LinkedList<String> linkedList2 = new LinkedList<>();
        List<String> bix = this.RjU.bix();
        Iterator<String> it = linkedList.iterator();
        while (it.hasNext()) {
            String next = it.next();
            if (bix != null && bix.contains(next)) {
                linkedList2.add(next);
            }
        }
        if (linkedList2.size() != 0) {
            C68769h.m108123a((Context) this.duI.RGA.getContext(), this.duI.RGA.getMMResources().getString(C6760R.string.g6q, m109507bW(linkedList2)), (String) null, this.duI.RGA.getMMResources().getString(C6760R.string.g6z), this.duI.RGA.getMMResources().getString(C6760R.string.f12842sz), true, (DialogInterface.OnClickListener) new DialogInterface.OnClickListener() {
                /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.DialogInterface$OnClickListenerC695605 */
 
                public final void onClick(DialogInterface dialogInterface, int i) {
                    AppMethodBeat.m18334i(35088);
                    C66824np npVar = new C66824np();
                    for (int i2 = 0; i2 < linkedList2.size(); i2++) {
                        C66823no noVar = new C66823no();
                        noVar.MRG = (String) linkedList2.get(i2);
                        npVar.MRH.add(noVar);
                    }
                    C69545c.m109503a(C69545c.this, npVar);
                    AppMethodBeat.m18335o(35088);
                }
            }, (DialogInterface.OnClickListener) new DialogInterface.OnClickListener() {
                /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.DialogInterface$OnClickListenerC695616 */
 
                public final void onClick(DialogInterface dialogInterface, int i) {
                }
            });
            AppMethodBeat.m18335o(35114);
        } else if (linkedList.size() == 1) {
            C68769h.m108121a(this.duI.RGA.getContext(), this.duI.RGA.getMMResources().getString(C6760R.string.g6x), (String) null, this.duI.RGA.getMMResources().getString(C6760R.string.g6y), new DialogInterface.OnClickListener() {
                /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.DialogInterface$OnClickListenerC695583 */
 
                public final void onClick(DialogInterface dialogInterface, int i) {
                }
            });
            AppMethodBeat.m18335o(35114);
        } else {
            C68769h.m108121a(this.duI.RGA.getContext(), this.duI.RGA.getMMResources().getString(C6760R.string.g6s), (String) null, this.duI.RGA.getMMResources().getString(C6760R.string.g6y), new DialogInterface.OnClickListener() {
                /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.DialogInterface$OnClickListenerC695594 */
 
                public final void onClick(DialogInterface dialogInterface, int i) {
                }
            });
            AppMethodBeat.m18335o(35114);
        }
    }
 
    /* renamed from: bW */
    private String m109507bW(LinkedList<String> linkedList) {
        AppMethodBeat.m18334i(35115);
        if (linkedList.size() <= 0) {
            AppMethodBeat.m18335o(35115);
            return null;
        }
        StringBuilder sb = new StringBuilder(this.RjU.mo24935Nl(linkedList.get(0)));
        for (int i = 1; i < linkedList.size(); i++) {
            sb.append(this.duI.RGA.getContext().getString(C6760R.string.awt)).append(this.RjU.mo24935Nl(linkedList.get(i)));
        }
        String sb2 = sb.toString();
        AppMethodBeat.m18335o(35115);
        return sb2;
    }
 
    private void hxp() {
        AppMethodBeat.m18334i(35116);
        if (!this.tFk) {
            AppMethodBeat.m18335o(35116);
            return;
        }
        C7080ag.biq();
        C7050h.m19083k(this.duI.getTalkerUserName(), this.RjU.field_bizChatServId, (int) (System.currentTimeMillis() / 1000));
        AppMethodBeat.m18335o(35116);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    public final long amA() {
        return this.Rxc;
    }
 
    @Override // com.tencent.p364mm.p2166ui.AbstractC71789p
    public final boolean onKeyDown(int i, KeyEvent keyEvent) {
        AppMethodBeat.m18334i(35117);
        boolean i2 = m109514i(keyEvent);
        AppMethodBeat.m18335o(35117);
        return i2;
    }
 
    @Override // com.tencent.p364mm.p2166ui.AbstractC71789p
    public final void onActivityResult(int i, int i2, Intent intent) {
        AppMethodBeat.m18334i(35118);
        super.onActivityResult(i, i2, intent);
        switch (i) {
            case 12001:
                if (this.Rxb != null) {
                    C7416a aVar = this.Rxb;
                    if (aVar.duI != null) {
                        if (i2 != -1) {
                            if (i2 == 0) {
                                Toast.makeText(aVar.duI.RGA.getContext(), (int) C6760R.string.c0v, 0).show();
                                break;
                            }
                        } else {
                            Toast.makeText(aVar.duI.RGA.getContext(), (int) C6760R.string.c0w, 0).show();
                            C10049ew ewVar = new C10049ew();
                            ewVar.dON.f14372op = 0;
                            ewVar.dON.userName = aVar.duI.getTalkerUserName();
                            ewVar.dON.context = aVar.duI.RGA.getContext();
                            EventCenter.instance.publish(ewVar);
                            AppMethodBeat.m18335o(35118);
                            return;
                        }
                    } else {
                        Log.m105214e("MicroMsg.exdevice.ChattingUIExDeviceLogic", "context is null, maybe has been released");
                        AppMethodBeat.m18335o(35118);
                        return;
                    }
                }
                break;
        }
        AppMethodBeat.m18335o(35118);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.C69256a, com.tencent.p364mm.p2166ui.AbstractC71792q
    public final void hqi() {
        boolean z = false;
        AppMethodBeat.m18334i(35119);
        this.Rxf = this.duI.RGA.getLongExtra("key_biz_chat_id", -1);
        this.tFk = this.duI.RGA.getBooleanExtra("key_is_biz_chat", false).booleanValue();
        Log.m105219i("MicroMsg.ChattingUI.BizComponent", "rawBizUserid %s %s", Long.valueOf(this.Rxf), Boolean.valueOf(this.tFk));
        if (this.tFk) {
            this.RjU = C7080ag.bij().mo24947bF(this.Rxf);
            this.RjU = C7039e.m19058a(this.RjU, this.Rxf);
            this.Rxi = C7080ag.bik().mo24916EV(hxn()).field_unReadCount;
        }
        if (this.tFk && C7039e.m19050SB(this.RjU.field_bizChatServId)) {
            z = true;
        }
        this.Rxe = z;
        if (this.tFk && !this.Rxe) {
            this.CJj = C7080ag.bil().mo24973gi(this.RjU.field_bizChatServId);
            this.CJj = C7039e.m19059a(this.CJj, this.RjU.field_bizChatServId);
        }
        if (this.Rxe) {
            this.Rxm = C7039e.m19061c(this.RjU);
        }
        this.CHz = C7116g.m19200gq(this.duI.getTalkerUserName());
        this.Rxj = true;
        AppMethodBeat.m18335o(35119);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.C69256a, com.tencent.p364mm.p2166ui.AbstractC71792q
    public final void hqk() {
        AppMethodBeat.m18334i(35121);
        if (C9004d.m22488ru(this.duI.IRh.field_type) && this.duI.IRh.hhp() && C9004d.m22488ru(this.duI.IRh.field_type) && this.duI.IRh.hhp() && !C7116g.m19185It(this.duI.getTalkerUserName())) {
            int intExtra = this.duI.RGA.getIntExtra("specific_chat_from_scene", 0);
            if (this.jhN == null) {
                this.jhN = new ecd();
            }
            this.jhN.PbU = this.duI.RGA.getIntExtra("Main_IndexInSessionList", 0);
            this.jhN.PbS = this.duI.RGA.getIntExtra("Main_UnreadCount", 0);
            if (this.Rxd != null) {
                this.jhN.PbT = this.Rxd.getType();
                if (this.jhN.PbS > 0) {
                    this.jhN.PbR = ((int) (this.Rxc - this.Rxd.field_createTime)) / 1000;
                }
            }
            C7080ag.bit().mo25045a(this.duI.getTalkerUserName(), this.Rxd, intExtra, this.jhN);
        }
        if (C13808ab.m29003Os(this.duI.getTalkerUserName())) {
            C4126h.Uhk.mo16496f(new Runnable() {
                /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.RunnableC695649 */
 
                public final void run() {
                    AppMethodBeat.m18334i(259290);
                    C69545c.m109513h(C69545c.this);
                    AppMethodBeat.m18335o(259290);
                }
            }, "ReportEnterNotifyMessage");
        }
        AppMethodBeat.m18335o(35121);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.C69256a, com.tencent.p364mm.p2166ui.AbstractC71792q
    public final void hql() {
        boolean z;
        C7207c.C7209b cY;
        AppMethodBeat.m18334i(35122);
        this.Rxk = true;
        C13906br.m29242J("bizflag", ((AbstractC69431ae) this.duI.mo99210aY(AbstractC69431ae.class)).hza());
        if (this.CHz == null || C7416a.m19932d(this.CHz)) {
            Log.m105219i("MicroMsg.ChattingUI.BizComponent", "hardevice brand account, onresume: %s, notify switch view enter chattingui", hxk());
            if (this.Rxb != null) {
                this.Rxb.mo25608a(1, this.CHz);
            }
        }
        C7207c cVar = this.CHz;
        if (cVar == null || cVar == null || (cY = cVar.mo25199cY(false)) == null || !cY.mo25217Zx()) {
            z = false;
        } else {
            z = true;
        }
        if (z) {
            C13869bg.aGH().postToWorker(new Runnable() {
                /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.RunnableC6955314 */
 
                public final void run() {
                    AppMethodBeat.m18334i(35096);
                    C10915tu tuVar = new C10915tu();
                    if (C69545c.this.CHz != null) {
                        tuVar.ehk.userName = C69545c.this.CHz.field_username;
                        EventCenter.instance.publish(tuVar);
                    }
                    AppMethodBeat.m18335o(35096);
                }
            });
        }
        if (C9004d.m22488ru(this.duI.IRh.field_type) && this.duI.IRh.hhp() && this.CHz != null) {
            C7207c.C7209b cY2 = this.CHz.mo25199cY(false);
            if (cY2 != null && cY2.mo25216Zj()) {
                if (this.CHz.field_hadAlert == 0) {
                    String string = this.duI.RGA.getContext().getResources().getString(C6760R.string.axu, this.duI.IRh.axz());
                    String string2 = this.duI.RGA.getContext().getResources().getString(C6760R.string.axv);
                    StringBuffer stringBuffer = new StringBuffer();
                    stringBuffer.append("<sysmsg type=\"reportbizlocation\">");
                    stringBuffer.append("<reportbizlocation>");
                    stringBuffer.append("<text><![CDATA[").append(string).append("]]></text>");
                    stringBuffer.append("<link>");
                    stringBuffer.append("<scene>reportbizlocation</scene>");
                    stringBuffer.append("<text><![CDATA[").append(string2).append("]]></text>");
                    stringBuffer.append("</link>");
                    stringBuffer.append("</reportbizlocation>");
                    stringBuffer.append("</sysmsg>");
                    C67851ca caVar = new C67851ca();
                    caVar.mo32341GY(this.duI.getTalkerUserName());
                    caVar.mo32378pU(2);
                    caVar.setType(10002);
                    caVar.setCreateTime(C13894bp.bdD());
                    caVar.setContent(stringBuffer.toString());
                    C13894bp.m29229x(caVar);
                    this.CHz.field_hadAlert = 1;
                    C7080ag.bih().update(this.CHz, new String[0]);
                } else {
                    C7080ag.bit().mo25043Sn(this.duI.getTalkerUserName());
                }
            }
            if (this.CHz.mo25183Zh() && (!this.duI.IRh.hhp() || !C7022a.bhz())) {
                AbstractC13845ay.C13846a.iWA.mo25860aQ(this.duI.IRh.field_username, "");
                C6896c.m18793QZ(this.duI.IRh.field_username);
            }
            if (this.CHz.field_status == 1) {
                this.CHz.field_status = 0;
                C7080ag.bih().mo25020h(this.CHz);
            }
        } else if (!this.duI.RGA.getBooleanExtra("key_has_add_contact", false).booleanValue() && !C9004d.m22488ru(this.duI.IRh.field_type) && this.duI.IRh.hhp()) {
            MMHandlerThread.postToMainThread(new Runnable() {
                /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.RunnableC6955415 */
 
                public final void run() {
                    AppMethodBeat.m18334i(35097);
                    if (!C9004d.m22488ru(C69545c.this.duI.IRh.field_type) && C69545c.this.duI.IRh.hhp()) {
                        C69545c.this.duI.RGA.setMMSubTitle(C6760R.string.axq);
                    }
                    AppMethodBeat.m18335o(35097);
                }
            });
        }
        hxo();
        AppMethodBeat.m18335o(35122);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.C69256a, com.tencent.p364mm.p2166ui.AbstractC71792q
    public final void hqm() {
        AppMethodBeat.m18334i(35123);
        this.Rxk = false;
        if (C9004d.m22488ru(this.duI.IRh.field_type) && this.duI.IRh.hhp() && this.CHz != null) {
            C7080ag.bit().bhU();
            if (this.CJs != null) {
                this.CJs.dismiss();
            }
        }
        C14635a.C14636a aVar = C14635a.jTe;
        Log.m105218i("MicroMsg.BaseSubscribeMsgService", "alvinluo clearNotifyCallback");
        C14635a.jTd.clear();
        AppMethodBeat.m18335o(35123);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.C69256a, com.tencent.p364mm.p2166ui.AbstractC71792q
    public final void hqn() {
        AppMethodBeat.m18334i(35124);
        this.Rxj = false;
        gTQ();
        AppMethodBeat.m18335o(35124);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.AbstractC69346ah, com.tencent.p364mm.p2166ui.chatting.p2176d.C69256a
    public final void hwV() {
        AppMethodBeat.m18334i(35125);
        super.hwV();
        gTQ();
        AppMethodBeat.m18335o(35125);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    /* renamed from: a */
    public final boolean mo98962a(C69724a aVar, C70661bu buVar) {
        String str;
        C17190g gVar;
        boolean z;
        AppMethodBeat.m18334i(259291);
        String bbL = C14093z.bbL();
        String str2 = buVar.userName;
        if (Util.isNullOrNil(buVar.Scl)) {
            str = "";
        } else {
            str = buVar.Scl;
        }
        int i = buVar.iXD;
        if (C7116g.m19186RW(str2)) {
            Log.m105213d("MicroMsg.ChattingUI.BizComponent", "alvinluo reportBizAvatarClick brand: %s, username: %s, kfWorker: %s, kfType: %d", str2, bbL, str, Integer.valueOf(i));
            EnumC50931h.INSTANCE.mo74796a(20008, Long.valueOf(this.Rxc), str2, 1, str, Integer.valueOf(i), Long.valueOf(System.currentTimeMillis()));
        }
        if (!Util.isNullOrNil(buVar.Scl) && !Util.isNullOrNil(buVar.userName) && C7080ag.bii() != null && C7080ag.bii().mo25029vR(buVar.iXD)) {
            C7118i bii = C7080ag.bii();
            String str3 = buVar.userName;
            String str4 = buVar.Scl;
            int i2 = buVar.iXD;
            Log.m105219i("MicroMsg.BizKFService", "alvinluo getKFGuideAppBrandOpenBundle username: %s, brandUsername: %s, kfOpenId: %s, kfType: %d", bbL, str3, str4, Integer.valueOf(i2));
            if (bii.mo25029vR(i2)) {
                C7118i.C7119a aVar2 = bii.jhx;
                if (Util.isNullOrNil(aVar2.appId) || aVar2.path == null) {
                    z = false;
                } else {
                    z = true;
                }
                if (z) {
                    gVar = new C17190g();
                    gVar.appId = bii.jhx.appId;
                    gVar.cFP = (BuildInfo.IS_FLAVOR_RED || BuildInfo.DEBUG) ? bii.jhx.cFP : 0;
                    gVar.scene = 1166;
                    gVar.dIW = str3;
                    Uri.Builder buildUpon = Uri.parse(bii.jhx.path).buildUpon();
                    buildUpon.appendQueryParameter(AbstractC11807ch.COL_USERNAME, bbL);
                    buildUpon.appendQueryParameter("brandUsername", str3);
                    buildUpon.appendQueryParameter("kfOpenId", str4);
                    buildUpon.appendQueryParameter("kfType", String.valueOf(i2));
                    gVar.ldF = buildUpon.build().toString();
                    Log.m105221v("MicroMsg.BizKFService", "alvinluo getKFGuideAppBrandOpenBundle enterPath: %s", gVar.ldF);
                    if (!(gVar == null || aVar.RGA.getContext() == null)) {
                        ((AbstractC24562r) C12403h.m27078U(AbstractC24562r.class)).mo43895a(aVar.RGA.getContext(), gVar);
                        AppMethodBeat.m18335o(259291);
                        return true;
                    }
                }
            }
            gVar = null;
            ((AbstractC24562r) C12403h.m27078U(AbstractC24562r.class)).mo43895a(aVar.RGA.getContext(), gVar);
            AppMethodBeat.m18335o(259291);
            return true;
        }
        AppMethodBeat.m18335o(259291);
        return false;
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.p2178b.AbstractC69452d
    /* renamed from: ht */
    public final void mo98966ht(String str, int i) {
        C67851ca caVar;
        int i2;
        String bbL;
        AppMethodBeat.m18334i(259292);
        if (!Util.isNullOrNil(str) && C7116g.m19186RW(str)) {
            AbstractC69459k kVar = (AbstractC69459k) this.duI.mo99210aY(AbstractC69459k.class);
            if (kVar.getCount() > 0) {
                caVar = kVar.asV(kVar.getCount() - 1);
            } else {
                caVar = null;
            }
            if (caVar == null) {
                i2 = 1;
            } else if (caVar.getType() == 285212721) {
                i2 = 2;
            } else if (caVar.getType() == 318767153) {
                i2 = 5;
            } else {
                if (!Util.isNullOrNil(caVar.gfi)) {
                    if (caVar.gfo == 1) {
                        i2 = 3;
                    } else if (caVar.gfo == 2) {
                        i2 = 4;
                    }
                }
                i2 = 0;
            }
            if (caVar == null) {
                bbL = "";
            } else if (!Util.isNullOrNil(caVar.gfi)) {
                bbL = caVar.gfi;
            } else if (caVar.field_isSend == 0) {
                bbL = caVar.field_talker;
            } else {
                bbL = C14093z.bbL();
            }
            Log.m105213d("MicroMsg.ChattingUI.BizComponent", "alvinluo onFooterSwitchInput talker: %s, switchType: %d, lastMsgType: %d, sender: %s", str, Integer.valueOf(i), Integer.valueOf(i2), bbL);
            EnumC50931h.INSTANCE.mo74796a(20018, Long.valueOf(this.Rxc), str, Integer.valueOf(i), Long.valueOf(System.currentTimeMillis()), Integer.valueOf(i2), bbL, 1);
        }
        AppMethodBeat.m18335o(259292);
    }
 
    @Override // com.tencent.p364mm.p2166ui.chatting.p2176d.C69256a, com.tencent.p364mm.p2166ui.AbstractC71792q
    public final void hqj() {
        AppMethodBeat.m18334i(35120);
        this.Rxc = System.currentTimeMillis();
        AbstractC69459k kVar = (AbstractC69459k) this.duI.mo99210aY(AbstractC69459k.class);
        this.Rxd = kVar.getCount() > 0 ? kVar.asV(kVar.getCount() - 1) : null;
        C67748ab.bqH(this.duI.getTalkerUserName());
        this.duI.RGA.getLongExtra("key_biz_chat_id", -1);
        if (this.tFk) {
            Log.m105212d("MicroMsg.ChattingUI.BizComponent", "getBizChatInfo");
            C13869bg.aGH().postToWorkerDelayed(new Runnable() {
                /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.RunnableC695638 */
 
                public final void run() {
                    AppMethodBeat.m18334i(35090);
                    long currentTimeMillis = System.currentTimeMillis();
                    if (!C69545c.this.tFk || C69545c.this.RjU == null || C69545c.this.duI.IRh == null) {
                        Log.m105219i("MicroMsg.ChattingUI.BizComponent", "bizChatInfo:%s  talker:%s", C69545c.this.RjU, C69545c.this.duI.IRh);
                    } else {
                        C69545c.m109511f(C69545c.this);
                        C7080ag.biv();
                        C7033c cVar = C69545c.this.RjU;
                        if (C12343b.m26994sN(C12403h.aGC().hGk)) {
                            String format = String.format("%s;%s;%d", cVar.field_brandUserName, cVar.field_bizChatServId, Long.valueOf(System.currentTimeMillis() / 1000));
                            C14311ab.m29931b(cVar.field_brandUserName, 7, "EnterpriseChatStatus", format);
                            Log.m105213d("MicroMsg.BizChatStatusNotifyService", "enterChat:arg:%s", format);
                        }
                        if (C69545c.this.Rxe) {
                            if (C69545c.this.RjU.biz()) {
                                C7080ag.biq();
                                C7050h.m19081bs(C69545c.this.RjU.field_bizChatServId, C69545c.this.duI.IRh.field_username);
                            } else {
                                C7039e.m19064f(C69545c.this.RjU);
                            }
                        }
                        C69545c.m109512g(C69545c.this);
                    }
                    Log.m105213d("MicroMsg.ChattingUI.BizComponent", "willen test  updateBizChatInfo use time:%s", Long.valueOf(System.currentTimeMillis() - currentTimeMillis));
                    AppMethodBeat.m18335o(35090);
                }
            }, 500);
        }
        if (this.duI.IRh != null && this.duI.IRh.hhp()) {
            C7080ag.biu().mo24913RH(this.duI.IRh.field_username);
        }
        this.pQP.alive();
        this.Rxf = this.duI.RGA.getLongExtra("key_biz_chat_id", -1);
        if (C7416a.m19932d(this.CHz) && this.Rxb == null) {
            Log.m105219i("MicroMsg.ChattingUI.BizComponent", "hardevice brand account, init event : %s", hxk());
            this.Rxb = new C7416a(this.duI);
        }
        if (this.duI.IRh.hhp()) {
            C8050d.chatType = 2;
        }
        if (this.tFk) {
            C7080ag.bij().mo24944a(this.RkE, Looper.getMainLooper());
        }
        if (this.duI.IRh != null && this.duI.IRh.hhp()) {
            C7080ag.bih().mo25017a(this.Rxl, Looper.getMainLooper());
        }
        AppMethodBeat.m18335o(35120);
    }
 
    /* renamed from: a */
    static /* synthetic */ void m109503a(C69545c cVar, C66824np npVar) {
        AppMethodBeat.m18334i(35126);
        Log.m105218i("MicroMsg.ChattingUI.BizComponent", "updateBizChatMemberList()");
        String string = cVar.duI.RGA.getMMResources().getString(C6760R.string.g6m);
        C7080ag.biq();
        final C7072y a = C7050h.m19075a(cVar.RjU.field_brandUserName, cVar.RjU.field_bizChatServId, null, npVar, cVar);
        cVar.duI.mo99215b(cVar.duI.RGA.getContext(), cVar.duI.RGA.getMMResources().getString(C6760R.string.f13077zb), string, new DialogInterface.OnCancelListener() {
            /* class com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.DialogInterface$OnCancelListenerC695627 */
 
            public final void onCancel(DialogInterface dialogInterface) {
                AppMethodBeat.m18334i(35089);
                C13869bg.aFW().mo24742a(a);
                AppMethodBeat.m18335o(35089);
            }
        });
        AppMethodBeat.m18335o(35126);
    }
 
    /* renamed from: g */
    static /* synthetic */ void m109512g(C69545c cVar) {
        boolean z = true;
        AppMethodBeat.m18334i(35128);
        if (!cVar.tFk || cVar.RjU == null || Util.isNullOrNil(cVar.RjU.field_brandUserName)) {
            AppMethodBeat.m18335o(35128);
            return;
        }
        String gj = C7080ag.bil().mo24974gj(cVar.RjU.field_brandUserName);
        C7054k gi = C7080ag.bil().mo24973gi(gj);
        Object[] objArr = new Object[3];
        objArr[0] = cVar.RjU.field_brandUserName;
        objArr[1] = gj;
        if (gi != null) {
            z = false;
        }
        objArr[2] = Boolean.valueOf(z);
        Log.m105219i("MicroMsg.ChattingUI.BizComponent", "updateBizChatMyUserInfo: %s:%s,myBizChatUserInfo is null:%s", objArr);
        if (Util.isNullOrNil(gj) || gi == null || gi.biz() || Util.isNullOrNil(gi.field_addMemberUrl)) {
            C7080ag.biq();
            C7050h.m19076a(cVar.RjU.field_brandUserName, cVar);
        }
        AppMethodBeat.m18335o(35128);
    }
 
    /* JADX WARNING: Removed duplicated region for block: B:24:0x00ab  */
    /* JADX WARNING: Removed duplicated region for block: B:8:0x0033  */
    /* renamed from: h */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    static /* synthetic */ void m109513h(com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c r14) {
        /*
        // Method dump skipped, instructions count: 174
        */
        throw new UnsupportedOperationException("Method not decompiled: com.tencent.p364mm.p2166ui.chatting.p2176d.C69545c.m109513h(com.tencent.mm.ui.chatting.d.c):void");
    }
}

主要完成聊天对象前的初始化、准备工作。

 

2 消息在内部是如何处理的:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
package com.tencent.p364mm.plugin.messenger;
 
/* renamed from: com.tencent.mm.plugin.messenger.PluginMessenger */
public class PluginMessenger extends AbstractC12355f implements AbstractC6976i, AbstractC12335c, AbstractC45209c {
    private AbstractC45212e.AbstractC45215c APA = new AbstractC45212e.AbstractC45215c() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4518312 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45215c
        /* renamed from: a */
        public final /* synthetic */ CharSequence mo27173a(final Map map, final String str, final Bundle bundle, final WeakReference weakReference, final WeakReference weakReference2) {
            AppMethodBeat.m18334i(257092);
            if (map == null) {
                AppMethodBeat.m18335o(257092);
                return null;
            }
            final String string = bundle != null ? bundle.getString("conv_talker_username") : "";
            PluginMessenger.access$000(PluginMessenger.this, map, str, bundle, weakReference, string, false);
            String nullAsNil = Util.nullAsNil((String) map.get(str + ".title"));
            SpannableString spannableString = new SpannableString(nullAsNil);
            spannableString.setSpan(new AbstractC45207a() {
                /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4518312.C451841 */
 
                @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45207a
                public final void onClickImp(View view) {
                    AppMethodBeat.m18334i(90711);
                    PluginMessenger.access$000(PluginMessenger.this, map, str, bundle, weakReference, string, true);
                    ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67427a("link_succeed_contact", map, bundle);
                    AppMethodBeat.m18335o(90711);
                }
            }, 0, nullAsNil.length(), 33);
            AppMethodBeat.m18335o(257092);
            return spannableString;
        }
    };
    private AbstractC45212e.AbstractC45215c APB = new AbstractC45212e.AbstractC45215c() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4518714 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45215c
        /* renamed from: a */
        public final /* synthetic */ CharSequence mo27173a(final Map map, final String str, final Bundle bundle, final WeakReference weakReference, final WeakReference weakReference2) {
            AppMethodBeat.m18334i(257095);
            if (map == null) {
                AppMethodBeat.m18335o(257095);
                return null;
            }
            String nullAsNil = Util.nullAsNil((String) map.get(str + ".title"));
            SpannableString spannableString = new SpannableString(nullAsNil);
            spannableString.setSpan(new AbstractC45207a() {
                /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4518714.C451881 */
 
                @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45207a
                public final void onClickImp(View view) {
                    AppMethodBeat.m18334i(90713);
                    try {
                        String string = bundle.getString("send_msg_username", "");
                        String nullAs = Util.nullAs((String) map.get(str + ".chatname"), "");
                        C11475il ilVar = new C11475il();
                        ilVar.mo31061yd(string);
                        ilVar.eWi = 2;
                        ilVar.eWj = 2;
                        ilVar.eWm = 1;
                        ilVar.bnV();
                        PluginMessenger.access$100(PluginMessenger.this, nullAs);
                        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67427a("link_jump_chat", map, bundle);
                        AppMethodBeat.m18335o(90713);
                    } catch (Throwable th) {
                        AppMethodBeat.m18335o(90713);
                    }
                }
            }, 0, nullAsNil.length(), 33);
            AppMethodBeat.m18335o(257095);
            return spannableString;
        }
    };
    private AbstractC45212e.AbstractC45213a APC = new AbstractC45212e.AbstractC45213a() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4518915 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45213a
        /* renamed from: f */
        public final String mo44391f(Map<String, String> map, String str) {
            AppMethodBeat.m18334i(90715);
            if (map == null) {
                AppMethodBeat.m18335o(90715);
                return null;
            }
            String nullAsNil = Util.nullAsNil(map.get(str + ".plain"));
            AppMethodBeat.m18335o(90715);
            return nullAsNil;
        }
    };
    private AbstractC45212e.AbstractC45213a APD = new AbstractC45212e.AbstractC45213a() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4519016 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45213a
        /* renamed from: f */
        public final String mo44391f(Map<String, String> map, String str) {
            AppMethodBeat.m18334i(90716);
            if (map == null) {
                AppMethodBeat.m18335o(90716);
                return null;
            }
            String nullAsNil = Util.nullAsNil(map.get(str + ".title"));
            AppMethodBeat.m18335o(90716);
            return nullAsNil;
        }
    };
    private AbstractC45212e.AbstractC45213a APF = new AbstractC45212e.AbstractC45213a() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4519117 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45213a
        /* renamed from: f */
        public final String mo44391f(Map<String, String> map, String str) {
            AppMethodBeat.m18334i(90717);
            if (map == null) {
                AppMethodBeat.m18335o(90717);
                return null;
            }
            String nullAsNil = Util.nullAsNil(map.get(str + ".title"));
            AppMethodBeat.m18335o(90717);
            return nullAsNil;
        }
    };
    private AbstractC45212e.AbstractC45213a APG = new AbstractC45212e.AbstractC45213a() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4519218 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45213a
        /* renamed from: f */
        public final String mo44391f(Map<String, String> map, String str) {
            AppMethodBeat.m18334i(90718);
            if (map == null) {
                AppMethodBeat.m18335o(90718);
                return null;
            }
            String nullAsNil = Util.nullAsNil(map.get(str + ".title"));
            AppMethodBeat.m18335o(90718);
            return nullAsNil;
        }
    };
    private AbstractC45212e.AbstractC45213a APH = new AbstractC45212e.AbstractC45213a() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4519319 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45213a
        /* renamed from: f */
        public final String mo44391f(Map<String, String> map, String str) {
            AppMethodBeat.m18334i(90719);
            if (map == null) {
                AppMethodBeat.m18335o(90719);
                return null;
            }
            String nullAsNil = Util.nullAsNil(map.get(str + ".title"));
            AppMethodBeat.m18335o(90719);
            return nullAsNil;
        }
    };
    private AbstractC45212e.AbstractC45213a APJ = new AbstractC45212e.AbstractC45213a() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4519520 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45213a
        /* renamed from: f */
        public final String mo44391f(Map<String, String> map, String str) {
            AppMethodBeat.m18334i(90720);
            StringBuilder sb = new StringBuilder();
            String nullAs = Util.nullAs(map.get(str + ".separator"), "、");
            int i = 0;
            while (true) {
                String str2 = str + ".memberlist.member" + (i != 0 ? Integer.valueOf(i) : "");
                if (map.get(str2) != null) {
                    if (i != 0) {
                        sb.append(nullAs);
                    }
                    String str3 = map.get(str2 + ".nickname");
                    if (Util.isNullOrNil(str3)) {
                        Log.m105222w("MicroMsg.PluginMessenger", "hy: can not resolve username or nickname");
                    } else {
                        sb.append(str3);
                    }
                    i++;
                } else {
                    String sb2 = sb.toString();
                    AppMethodBeat.m18335o(90720);
                    return sb2;
                }
            }
        }
    };
    private AbstractC45212e.AbstractC45213a APK = new AbstractC45212e.AbstractC45213a() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C451942 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45213a
        /* renamed from: f */
        public final String mo44391f(Map<String, String> map, String str) {
            AppMethodBeat.m18334i(257078);
            if (map == null) {
                AppMethodBeat.m18335o(257078);
                return null;
            }
            String nullAsNil = Util.nullAsNil(map.get(str + ".title"));
            AppMethodBeat.m18335o(257078);
            return nullAsNil;
        }
    };
    private AbstractC45212e.AbstractC45213a APL = new AbstractC45212e.AbstractC45213a() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C451963 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45213a
        /* renamed from: f */
        public final String mo44391f(Map<String, String> map, String str) {
            AppMethodBeat.m18334i(257079);
            if (map == null) {
                AppMethodBeat.m18335o(257079);
                return null;
            } else if (map.containsKey(str + ".redpacketinfo")) {
                AppMethodBeat.m18335o(257079);
                return "";
            } else {
                String nullAsNil = Util.nullAsNil(map.get(str + ".title"));
                AppMethodBeat.m18335o(257079);
                return nullAsNil;
            }
        }
    };
    private AbstractC45212e.AbstractC45213a APM = new AbstractC45212e.AbstractC45213a() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C451974 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45213a
        /* renamed from: f */
        public final String mo44391f(Map<String, String> map, String str) {
            AppMethodBeat.m18334i(257080);
            if (map == null) {
                AppMethodBeat.m18335o(257080);
                return null;
            }
            Log.m105213d("MicroMsg.PluginMessenger", "mHandleNewLinkHistoryDigestListener %s", Util.nullAsNil(map.get(str + ".title")));
            String nullAsNil = Util.nullAsNil(map.get(str + ".title"));
            AppMethodBeat.m18335o(257080);
            return nullAsNil;
        }
    };
    private AbstractC45212e.AbstractC45215c APN = new AbstractC45212e.AbstractC45215c() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C451985 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45215c
        /* renamed from: a */
        public final /* synthetic */ CharSequence mo27173a(Map map, String str, Bundle bundle, final WeakReference weakReference, WeakReference weakReference2) {
            AppMethodBeat.m18334i(257082);
            if (map == null) {
                AppMethodBeat.m18335o(257082);
                return null;
            }
            final long safeParseLong = Util.safeParseLong((String) map.get(str + ".mmlive.live_id"));
            final String string = bundle != null ? bundle.getString("conv_talker_username") : "";
            String nullAsNil = Util.nullAsNil((String) map.get(str + ".des"));
            final String nullAsNil2 = Util.nullAsNil((String) map.get(str + ".mmlive.identity_id"));
            SpannableString spannableString = new SpannableString(nullAsNil);
            spannableString.setSpan(new AbstractC45207a() {
                /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C451985.C451991 */
 
                @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45207a
                public final void onClickImp(View view) {
                    AppMethodBeat.m18334i(257081);
                    try {
                        if (weakReference.get() != null) {
                            LiveConfig.C12466a aVar = new LiveConfig.C12466a();
                            aVar.hMx = LiveConfig.hMt;
                            aVar.hMy = string;
                            aVar.hMB = nullAsNil2;
                            aVar.liveId = safeParseLong;
                            aVar.scene = LiveConfig.hMp;
                            ((AbstractC12457a) C12403h.m27080W(AbstractC12457a.class)).liveEntranceJumper().mo33228d((Context) weakReference.get(), aVar.aIv());
                        }
                        AppMethodBeat.m18335o(257081);
                    } catch (Throwable th) {
                        AppMethodBeat.m18335o(257081);
                    }
                }
            }, 0, nullAsNil.length(), 33);
            AppMethodBeat.m18335o(257082);
            return spannableString;
        }
    };
    private AbstractC45212e.AbstractC45215c APO = new AbstractC45212e.AbstractC45215c() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C452006 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45215c
        /* renamed from: a */
        public final /* synthetic */ CharSequence mo27173a(Map map, String str, Bundle bundle, WeakReference weakReference, WeakReference weakReference2) {
            AppMethodBeat.m18334i(257083);
            if (map == null) {
                AppMethodBeat.m18335o(257083);
                return null;
            }
            String nullAsNil = Util.nullAsNil((String) map.get(str + ".identity_id"));
            String nullAsNil2 = Util.nullAsNil((String) map.get(str + ".nickname"));
            String Nl = C13807aa.m28915Nl(nullAsNil);
            if (!Util.isNullOrNil(Nl)) {
                nullAsNil2 = Nl;
            }
            SpannableString spannableString = new SpannableString(nullAsNil2);
            AppMethodBeat.m18335o(257083);
            return spannableString;
        }
    };
    private AbstractC45212e.AbstractC45215c APQ = new AbstractC45212e.AbstractC45215c() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C452017 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45215c
        /* renamed from: a */
        public final CharSequence mo27173a(Map<String, String> map, String str, Bundle bundle, final WeakReference<Context> weakReference, WeakReference<NeatTextView> weakReference2) {
            AppMethodBeat.m18334i(257085);
            if (map == null) {
                AppMethodBeat.m18335o(257085);
                return null;
            } else if (map.containsKey(str + ".redpacketinfo")) {
                AppMethodBeat.m18335o(257085);
                return "";
            } else {
                String nullAsNil = Util.nullAsNil(map.get(str + ".title"));
                final String str2 = map.get(str + ".url");
                SpannableString spannableString = new SpannableString(nullAsNil);
                if (!TextUtils.isEmpty(str2)) {
                    spannableString.setSpan(new AbstractC45207a() {
                        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C452017.C452021 */
 
                        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45207a
                        public final void onClickImp(View view) {
                            AppMethodBeat.m18334i(257084);
                            Context context = (Context) weakReference.get();
                            if (context != null) {
                                Intent intent = new Intent();
                                intent.putExtra("rawUrl", str2);
                                C8247c.m21410b(context, "webview", ".ui.tools.WebViewUI", intent);
                            }
                            AppMethodBeat.m18335o(257084);
                        }
                    }, 0, nullAsNil.length(), 33);
                }
                AppMethodBeat.m18335o(257085);
                return spannableString;
            }
        }
    };
    private AbstractC45212e.AbstractC45214b APR = new AbstractC45212e.AbstractC45214b() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C452038 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45214b
        /* renamed from: am */
        public final Boolean mo67399am(Map<String, String> map) {
            AppMethodBeat.m18334i(257087);
            Boolean valueOf = Boolean.valueOf(map.containsKey(".sysmsg.sysmsgtemplate.content_template.link_list.link.redpacketinfo"));
            AppMethodBeat.m18335o(257087);
            return valueOf;
        }
 
        /* JADX DEBUG: Multi-variable search result rejected for r13v2, resolved type: android.text.SpannableString */
        /* JADX WARN: Multi-variable type inference failed */
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45214b
        /* renamed from: n */
        public final CharSequence mo67400n(Map<String, String> map, String str) {
            String str2;
            AppMethodBeat.m18334i(257088);
            final Long valueOf = Long.valueOf(C6820d.m18643KJ(Util.nullAsNil(map.get(".sysmsg.sysmsgtemplate.content_template.link_list.link.redpacketinfo." + "objectid"))));
            final Long valueOf2 = Long.valueOf(C6820d.m18643KJ(Util.nullAsNil(map.get(".sysmsg.sysmsgtemplate.content_template.link_list.link.redpacketinfo." + "liveid"))));
            final String nullAsNil = Util.nullAsNil(map.get(".sysmsg.sysmsgtemplate.content_template.link_list.link.redpacketinfo." + "objectnonceid"));
            String nullAsNil2 = Util.nullAsNil(map.get(".sysmsg.sysmsgtemplate.content_template.link_list.link.redpacketinfo." + "findernickname"));
            final String nullAsNil3 = Util.nullAsNil(map.get(".sysmsg.sysmsgtemplate.content_template.link_list.link.redpacketinfo." + "redpacketsendid"));
            String string = MMApplicationContext.getContext().getResources().getString(C6760R.string.jbt);
            String string2 = MMApplicationContext.getContext().getResources().getString(C6760R.string.jbu, nullAsNil2, string);
            int indexOf = string2.indexOf(string);
            if (indexOf == -1 || string.length() + indexOf > string2.length()) {
                AppMethodBeat.m18335o(257088);
                str2 = str;
            } else {
                SpannableString c = C65705l.m99682c(MMApplicationContext.getContext(), string2);
                Drawable drawable = MMApplicationContext.getContext().getDrawable(MMApplicationContext.getContext().getResources().getIdentifier("systemmessages_hongbaoicon", "drawable", MMApplicationContext.getContext().getPackageName()));
                if (drawable != null) {
                    int dimensionPixelOffset = MMApplicationContext.getContext().getResources().getDimensionPixelOffset(C6760R.dimen.aqm);
                    drawable.setBounds(0, 0, dimensionPixelOffset, dimensionPixelOffset);
                    C72353a aVar = new C72353a(drawable, 1);
                    int indexOf2 = string2.indexOf(8197);
                    if (indexOf2 >= 0 && indexOf2 < string2.length() - 1) {
                        c.setSpan(aVar, indexOf2, indexOf2 + 1, 18);
                    }
                }
                c.setSpan(new AbstractC45207a() {
                    /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C452038.C452041 */
 
                    @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45207a
                    public final void onClickImp(View view) {
                        AppMethodBeat.m18334i(257086);
                        ((AbstractC43747ap) C12403h.m27080W(AbstractC43747ap.class)).report21053OnClick(valueOf.longValue(), valueOf2.longValue(), "", -1, -1, -1, "temp_17", -1, -1, "", "", System.currentTimeMillis(), -1);
                        ((AbstractC43747ap) C12403h.m27080W(AbstractC43747ap.class)).enterFinderLiveVisitorUI(null, MMApplicationContext.getContext(), valueOf.longValue(), valueOf2, "", nullAsNil, "", "", "", nullAsNil3, 0, "", 1);
                        AppMethodBeat.m18335o(257086);
                    }
                }, indexOf, string.length() + indexOf, 33);
                AppMethodBeat.m18335o(257088);
                str2 = c;
            }
            return str2;
        }
    };
    private C14987q APv;
    C45206a APw = new C45206a();
    private C45227a APx = new C45227a();
    private C45238d APy = new C45238d();
    private AbstractC45212e.AbstractC45215c APz = new AbstractC45212e.AbstractC45215c() {
        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C451801 */
 
        @Override // com.tencent.p364mm.plugin.messenger.p1488a.AbstractC45212e.AbstractC45215c
        /* renamed from: a */
        public final /* synthetic */ CharSequence mo27173a(Map map, String str, Bundle bundle, WeakReference weakReference, WeakReference weakReference2) {
            AppMethodBeat.m18334i(257077);
            if (map == null) {
                AppMethodBeat.m18335o(257077);
                return null;
            }
            SpannableString spannableString = new SpannableString(Util.nullAsNil((String) map.get(str + ".plain")));
            AppMethodBeat.m18335o(257077);
            return spannableString;
        }
    };
    private ProgressDialog gIB = null;
 
    public PluginMessenger() {
        AppMethodBeat.m18334i(90721);
        AppMethodBeat.m18335o(90721);
    }
 
    static /* synthetic */ void access$000(PluginMessenger pluginMessenger, Map map, String str, Bundle bundle, WeakReference weakReference, String str2, boolean z) {
        AppMethodBeat.m18334i(90740);
        pluginMessenger.resolvedSucceedContactText(map, str, bundle, weakReference, str2, z);
        AppMethodBeat.m18335o(90740);
    }
 
    static /* synthetic */ void access$100(PluginMessenger pluginMessenger, String str) {
        AppMethodBeat.m18334i(90741);
        pluginMessenger.startChattingUI(str);
        AppMethodBeat.m18335o(90741);
    }
 
    private void resolvedSucceedContactText(Map<String, String> map, String str, Bundle bundle, WeakReference<Context> weakReference, String str2, boolean z) {
        String str3;
        String str4;
        AppMethodBeat.m18334i(90722);
        try {
            String nullAs = Util.nullAs(bundle.getString("local_session"), "");
            if (!(weakReference == null || weakReference.get() == null)) {
                int safeParseInt = Util.safeParseInt(map.get(".sysmsg.sysmsgtemplate.content_template.succeed_scene"));
                if ("tmpl_type_succeed_contact_window".equals(map.get(str + ".window_template.$type"))) {
                    String str5 = map.get(str + ".window_template.template");
                    String str6 = map.get(str + ".window_template.tp_username");
                    String str7 = map.get(str + ".window_template.headimgurl");
                    if (!Util.isNullOrNil(str7) && C6928p.bgz().mo24582Rr(str6) == null) {
                        C6919i iVar = new C6919i();
                        iVar.username = str6;
                        iVar.jei = str7;
                        iVar.fHY = 3;
                        iVar.mo24579fT(false);
                        C6928p.bgz().mo24585b(iVar);
                    }
                    if (!z || !isSwitchContact(str6, str2)) {
                        String str8 = map.get(str + ".window_template.ticket");
                        String str9 = map.get(str + ".window_template.antispam_ticket");
                        String str10 = map.get(str + ".window_template.title");
                        String str11 = map.get(str + ".window_template.cancel_wording");
                        String str12 = map.get(str + ".window_template.confirm_wording");
                        String str13 = "";
                        String str14 = "";
                        ArrayList<C45236c.C45237a> aLB = C45236c.aLB(str5);
                        if (aLB != null && aLB.size() > 0) {
                            ArrayList<CharSequence> arrayList = new ArrayList<>();
                            Iterator<C45236c.C45237a> it = aLB.iterator();
                            while (it.hasNext()) {
                                C45236c.C45237a next = it.next();
                                if (next != null && next.content != null) {
                                    if (next.type == 0) {
                                        arrayList.add(new SpannableString(C65705l.m99682c(MMApplicationContext.getContext(), next.content)));
                                    } else if (next.type == 1) {
                                        int i = 0;
                                        while (true) {
                                            String str15 = str + ".window_template.link_list.link";
                                            if (i != 0) {
                                                str3 = str15 + i;
                                            } else {
                                                str3 = str15;
                                            }
                                            if (Util.isNullOrNil(map.get(str3))) {
                                                break;
                                            }
                                            String str16 = map.get(str3 + ".$name");
                                            String str17 = map.get(str3 + ".$type");
                                            if (next.content.equals(str16) && "link_plain".equals(str17)) {
                                                arrayList.add(nullAsNil(map.get(str3 + ".plain")));
                                            }
                                            if ("company".equals(str16) && "link_userdescid".equals(str17)) {
                                                str13 = nullAsNil(map.get(str3 + ".userdesc")).toString();
                                            }
                                            if (!"nickname".equals(str16) || !"link_plain".equals(str17)) {
                                                str4 = str14;
                                            } else {
                                                str4 = nullAsNil(map.get(str3 + ".plain")).toString();
                                            }
                                            i++;
                                            str14 = str4;
                                        }
                                    }
                                }
                            }
                            if (z) {
                                if (safeParseInt == 1) {
                                    C11475il ilVar = new C11475il();
                                    ilVar.mo31060yc(nullAs);
                                    ilVar.mo31061yd(str2);
                                    ilVar.eWi = 1;
                                    ilVar.eWj = 1;
                                    ilVar.eWk = 3;
                                    ilVar.bnV();
                                } else if (safeParseInt == 0) {
                                    C11475il ilVar2 = new C11475il();
                                    ilVar2.mo31060yc(nullAs);
                                    ilVar2.mo31061yd(str2);
                                    ilVar2.eWi = 1;
                                    ilVar2.eWj = 1;
                                    ilVar2.eWk = 2;
                                    ilVar2.bnV();
                                }
                                showSwitchContactDialog(weakReference.get(), nullAs, concactSpannable(arrayList).toString(), str6, str8, str9, str14, str13, str2, str10, str11, str12);
                                AppMethodBeat.m18335o(90722);
                                return;
                            } else if (isFirstSwitchContactTips(str6, str2)) {
                                markFirstSwitchContactTips(str6, str2);
                                C11475il ilVar3 = new C11475il();
                                ilVar3.mo31060yc(nullAs);
                                ilVar3.mo31061yd(str2);
                                ilVar3.eWi = 1;
                                ilVar3.eWj = 1;
                                ilVar3.eWk = 1;
                                ilVar3.bnV();
                                showSwitchContactDialog(weakReference.get(), nullAs, concactSpannable(arrayList).toString(), str6, str8, str9, str14, str13, str2, str10, str11, str12);
                            }
                        }
                    } else {
                        startChattingUI(str6);
                        AppMethodBeat.m18335o(90722);
                        return;
                    }
                }
            }
            AppMethodBeat.m18335o(90722);
        } catch (Throwable th) {
            AppMethodBeat.m18335o(90722);
        }
    }
 
    @Override // com.tencent.p364mm.kernel.p595b.AbstractC12355f
    public void installed() {
        AppMethodBeat.m18334i(90723);
        alias(AbstractC45209c.class);
        AppMethodBeat.m18335o(90723);
    }
 
    @Override // com.tencent.p364mm.kernel.p595b.AbstractC12355f
    public void dependency() {
        AppMethodBeat.m18334i(90724);
        dependsOn(AbstractC29212a.class);
        AppMethodBeat.m18335o(90724);
    }
 
    @Override // com.tencent.p364mm.kernel.p595b.AbstractC12355f
    public void configure(AbstractC12356g gVar) {
        AppMethodBeat.m18334i(90725);
        if (gVar.aHB()) {
            C12403h.aGF();
            C12403h.m27087b(AbstractC45208b.class, this.APw);
            C12403h.m27087b(AbstractC45212e.class, this.APx);
            C72964ab.m115187az("selectrecord", "selectrecord", 1);
        }
        AppMethodBeat.m18335o(90725);
    }
 
    @Override // com.tencent.p364mm.kernel.p591a.p594c.AbstractC12329b
    public void execute(AbstractC12356g gVar) {
        AppMethodBeat.m18334i(90726);
        if (gVar.aHB()) {
            pin(C64804a.fmZ());
        }
        AppMethodBeat.m18335o(90726);
    }
 
    @Override // com.tencent.p364mm.kernel.p595b.AbstractC12355f
    public String toString() {
        return "plugin-messenger";
    }
 
    @Override // com.tencent.p364mm.kernel.api.AbstractC12337c
    public void onAccountInitialized(C12386f.C12399c cVar) {
        AppMethodBeat.m18334i(90727);
        ((AbstractC45322s) C12403h.m27080W(AbstractC45322s.class)).getSysCmdMsgExtension().mo35014a("sysmsgtemplate", this.APx.ARK);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67425a("link_plain", this.APz);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67425a("link_succeed_contact", this.APA);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67425a("link_jump_chat", this.APB);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67425a("link_live", this.APN);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67425a("comment_link_profile", this.APO);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67425a("link_url", this.APQ);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("link_plain", this.APC);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("link_succeed_contact", this.APD);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("link_jump_chat", this.APF);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("link_revoke", this.APG);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("link_revoke_qrcode", this.APH);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("link_profile", this.APJ);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("new_link_succeed_contact", this.APK);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("link_revoke_unbindapp", this.APH);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("link_url", this.APL);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67424a("link_history", this.APM);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67423a(this.APR);
        ((AbstractC45322s) C12403h.m27080W(AbstractC45322s.class)).getSysCmdMsgExtension().mo35014a("secmsg", C45222a.ARw);
        C12403h.aFW().mo24740a(JsApiGetRecentUsageList.CTRL_INDEX, this);
        C45238d dVar = this.APy;
        dVar.ARR = new C45241a();
        dVar.ARS = new C45244c();
        dVar.ART = new C45243b();
        new MMHandler().postDelayed(new Runnable() {
            /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.RunnableC452059 */
 
            public final void run() {
                AppMethodBeat.m18334i(257089);
                int eGF = ((AbstractC45315l) C12403h.m27078U(AbstractC45315l.class)).baB().eGF();
                int eGG = ((AbstractC45315l) C12403h.m27078U(AbstractC45315l.class)).baB().eGG();
                EnumC50931h.INSTANCE.mo74796a(20460, Integer.valueOf(eGF), Integer.valueOf(eGG));
                AppMethodBeat.m18335o(257089);
            }
        }, Util.MILLSECONDS_OF_MINUTE);
        AppMethodBeat.m18335o(90727);
    }
 
    @Override // com.tencent.p364mm.kernel.api.AbstractC12337c
    public void onAccountRelease() {
        AppMethodBeat.m18334i(90728);
        ((AbstractC45322s) C12403h.m27080W(AbstractC45322s.class)).getSysCmdMsgExtension().mo35017b("sysmsgtemplate", this.APx.ARK);
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKs("link_plain");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKs("link_succeed_contact");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKs("link_jump_chat");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKs("link_live");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKs("comment_link_profile");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKs("link_url");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("link_plain");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("link_succeed_contact");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("link_jump_chat");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("link_revoke");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("link_revoke_qrcode");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("link_profile");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("new_link_succeed_contact");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("link_revoke_unbindapp");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("link_url");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).aKt("link_history");
        ((AbstractC45212e) C12403h.m27078U(AbstractC45212e.class)).mo67432b(this.APR);
        ((AbstractC45322s) C12403h.m27080W(AbstractC45322s.class)).getSysCmdMsgExtension().mo35017b("secmsg", C45222a.ARw);
        C12403h.aFW().mo24745b(JsApiGetRecentUsageList.CTRL_INDEX, this);
        C45238d dVar = this.APy;
        if (dVar.ARR != null) {
            dVar.ARR.release();
        }
        if (dVar.ARS != null) {
            dVar.ARS.release();
        }
        if (dVar.ART != null) {
            dVar.ART.release();
        }
        AppMethodBeat.m18335o(90728);
    }
 
    public static String getAccSelectRecordPath() {
        AppMethodBeat.m18334i(257096);
        if (!C73019u.adQ("wcf://selectrecord/")) {
            C73019u.bwH("wcf://selectrecord/");
        }
        AppMethodBeat.m18335o(257096);
        return "wcf://selectrecord/";
    }
 
    private CharSequence nullAsNil(CharSequence charSequence) {
        AppMethodBeat.m18334i(90729);
        if (charSequence == null || charSequence.length() == 0) {
            SpannableString spannableString = new SpannableString("");
            AppMethodBeat.m18335o(90729);
            return spannableString;
        }
        AppMethodBeat.m18335o(90729);
        return charSequence;
    }
 
    private CharSequence concactSpannable(ArrayList<CharSequence> arrayList) {
        AppMethodBeat.m18334i(90730);
        CharSequence spannableString = new SpannableString("");
        if (arrayList == null) {
            AppMethodBeat.m18335o(90730);
            return spannableString;
        }
        Iterator<CharSequence> it = arrayList.iterator();
        while (it.hasNext()) {
            spannableString = TextUtils.concat(spannableString, it.next());
        }
        AppMethodBeat.m18335o(90730);
        return spannableString;
    }
 
    @Override // com.tencent.p364mm.p383al.AbstractC6976i
    public void onSceneEnd(int i, int i2, String str, AbstractC6990q qVar) {
        AppMethodBeat.m18334i(90731);
        try {
            if (CrashReportFactory.hasDebuger()) {
                C68871u.makeText(MMApplicationContext.getContext(), String.format("errType %s errCode %s errMsg %s", Integer.valueOf(i), Integer.valueOf(i2), str), 1).show();
            }
            if (qVar.getType() == 853) {
                if (this.gIB != null) {
                    this.gIB.dismiss();
                    this.gIB = null;
                }
                if (qVar.equals(this.APv)) {
                    C14987q qVar2 = (C14987q) qVar;
                    if (i2 == 0) {
                        saveSwitchContact(qVar2.kbS, qVar2.kcc);
                        startChattingUI(qVar2.kbS);
                    }
                    Log.m105222w("MicroMsg.PluginMessenger", "onSceneEnd VerifyOpenIMContact errCode: " + i2 + " errType: " + i + " userName: " + qVar2.kbS + " ticket: " + qVar2.kcb + " talkerUsername: " + qVar2.kcc);
                }
            }
            AppMethodBeat.m18335o(90731);
        } catch (Throwable th) {
            Log.m105214e("MicroMsg.PluginMessenger", "onSceneEnd ".concat(String.valueOf(th)));
            AppMethodBeat.m18335o(90731);
        }
    }
 
    private void startChattingUI(String str) {
        AppMethodBeat.m18334i(90732);
        Log.m105218i("MicroMsg.PluginMessenger", "startChattingUI userName: ".concat(String.valueOf(str)));
        Intent intent = new Intent();
        intent.putExtra("Chat_User", str);
        intent.putExtra("Chat_Mode", 1);
        C8247c.m21418f(MMApplicationContext.getContext(), ".ui.chatting.ChattingUI", intent);
        AppMethodBeat.m18335o(90732);
    }
 
    public void showSwitchContactDialog(final Context context, final String str, String str2, final String str3, final String str4, final String str5, String str6, String str7, final String str8, String str9, String str10, String str11) {
        AppMethodBeat.m18334i(90733);
        C72395f.C72396a aVar = new C72395f.C72396a(context);
        SwitchContactDialogCustomView switchContactDialogCustomView = new SwitchContactDialogCustomView(context);
        if (Util.isNullOrNil(str9)) {
            switchContactDialogCustomView.setTilte(context.getString(C6760R.string.fj8));
        } else {
            switchContactDialogCustomView.setTilte(str9);
        }
        switchContactDialogCustomView.setContent(str2);
        switchContactDialogCustomView.setDesc(str6);
        switchContactDialogCustomView.setSubDesc("@".concat(String.valueOf(str7)));
        switchContactDialogCustomView.setPhoto(str3);
        switchContactDialogCustomView.setOnPhotoOnClick(new View.OnClickListener() {
            /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.View$OnClickListenerC4518110 */
 
            public final void onClick(View view) {
                AppMethodBeat.m18334i(257090);
                C12113b bVar = new C12113b();
                bVar.mo32578bn(view);
                C12107a.m26677c("com/tencent/mm/plugin/messenger/PluginMessenger$18", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V", this, bVar.aEf());
                Intent intent = new Intent();
                intent.putExtra("Contact_User", str3);
                intent.putExtra(C71545g.C71550d.QIR, str5);
                C8247c.m21411b(context, Scopes.PROFILE, ".ui.ContactInfoUI", intent, 0);
                C12107a.m26666a(this, "com/tencent/mm/plugin/messenger/PluginMessenger$18", "android/view/View$OnClickListener", "onClick", "(Landroid/view/View;)V");
                AppMethodBeat.m18335o(257090);
            }
        });
        if (Util.isNullOrNil(str10)) {
            str10 = context.getString(C6760R.string.fj5);
        }
        if (Util.isNullOrNil(str11)) {
            str11 = context.getString(C6760R.string.fj7);
        }
        aVar.mo102403iD(switchContactDialogCustomView).bwt(str11).bwu(str10).mo102385a(new C72395f.AbstractC72403c() {
            /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4518211 */
 
            @Override // com.tencent.p364mm.p2166ui.widget.p2226a.C72395f.AbstractC72403c
            /* renamed from: g */
            public final void mo25449g(boolean z, String str) {
                AppMethodBeat.m18334i(257091);
                C11475il ilVar = new C11475il();
                ilVar.mo31060yc(str);
                ilVar.mo31061yd(str8);
                ilVar.eWi = 1;
                ilVar.eWj = 1;
                ilVar.eWl = 1;
                ilVar.bnV();
                AppMethodBeat.m18335o(257091);
            }
        }, new C72395f.AbstractC72403c() {
            /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4518513 */
 
            @Override // com.tencent.p364mm.p2166ui.widget.p2226a.C72395f.AbstractC72403c
            /* renamed from: g */
            public final void mo25449g(boolean z, String str) {
                AppMethodBeat.m18334i(257094);
                if (z && C67792as.bqX(str3)) {
                    C11475il ilVar = new C11475il();
                    ilVar.mo31060yc(str);
                    ilVar.eWi = 1;
                    ilVar.mo31061yd(str8);
                    ilVar.eWj = 1;
                    ilVar.eWl = 2;
                    ilVar.bnV();
                    PluginMessenger.this.APv = new C14987q(str3, str4, 0);
                    PluginMessenger.this.APv.kcc = str8;
                    C12403h.aFW().mo24743a(PluginMessenger.this.APv, 0);
                    PluginMessenger pluginMessenger = PluginMessenger.this;
                    Context context = context;
                    context.getString(C6760R.string.f13077zb);
                    pluginMessenger.gIB = C68769h.m108103a(context, context.getString(C6760R.string.fj9), true, (DialogInterface.OnCancelListener) new DialogInterface.OnCancelListener() {
                        /* class com.tencent.p364mm.plugin.messenger.PluginMessenger.C4518513.DialogInterface$OnCancelListenerC451861 */
 
                        public final void onCancel(DialogInterface dialogInterface) {
                            AppMethodBeat.m18334i(257093);
                            C12403h.aFW().mo24742a(PluginMessenger.this.APv);
                            AppMethodBeat.m18335o(257093);
                        }
                    });
                }
                AppMethodBeat.m18335o(257094);
            }
        }).show();
        AppMethodBeat.m18335o(90733);
    }
 
    private String getFirstSwitchContactTipsPrefsKey(String str, String str2) {
        AppMethodBeat.m18334i(90734);
        String str3 = "FirstSwitchContactTips_" + str + "_" + str2 + "_" + ((String) C12403h.aGE().aGn().mo95135b(2, ""));
        AppMethodBeat.m18335o(90734);
        return str3;
    }
 
    public void markFirstSwitchContactTips(String str, String str2) {
        AppMethodBeat.m18334i(90735);
        MMApplicationContext.getContext().getSharedPreferences("switch_contact_prefs", 0).edit().putBoolean(getFirstSwitchContactTipsPrefsKey(str, str2), false).commit();
        AppMethodBeat.m18335o(90735);
    }
 
    public boolean isFirstSwitchContactTips(String str, String str2) {
        AppMethodBeat.m18334i(90736);
        boolean z = MMApplicationContext.getContext().getSharedPreferences("switch_contact_prefs", 0).getBoolean(getFirstSwitchContactTipsPrefsKey(str, str2), true);
        AppMethodBeat.m18335o(90736);
        return z;
    }
 
    private String getSwitchContactPrefsKey(String str, String str2) {
        AppMethodBeat.m18334i(90737);
        String str3 = "switch_contact_prefs_" + str + "_" + str2 + "_" + ((String) C12403h.aGE().aGn().mo95135b(2, ""));
        AppMethodBeat.m18335o(90737);
        return str3;
    }
 
    private void saveSwitchContact(String str, String str2) {
        AppMethodBeat.m18334i(90738);
        MMApplicationContext.getContext().getSharedPreferences("switch_contact_prefs", 0).edit().putBoolean(getSwitchContactPrefsKey(str, str2), true).commit();
        AppMethodBeat.m18335o(90738);
    }
 
    private boolean isSwitchContact(String str, String str2) {
        AppMethodBeat.m18334i(90739);
        boolean z = MMApplicationContext.getContext().getSharedPreferences("switch_contact_prefs", 0).getBoolean(getSwitchContactPrefsKey(str, str2), false);
        AppMethodBeat.m18335o(90739);
        return z;
    }
}

3 如何发送图片给好友:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
package com.tencent.p364mm.p2166ui.chatting;
 
 
/* renamed from: com.tencent.mm.ui.chatting.SendImgProxyUI */
public class SendImgProxyUI extends MMBaseActivity {
    private static boolean isRunning = false;
    private ProgressDialogC68850q osZ = null;
 
    @Override // com.tencent.p364mm.p2166ui.MMBaseActivity, com.tencent.p364mm.hellhoundlib.activities.HellActivity
    public void onWindowFocusChanged(boolean z) {
        super.onWindowFocusChanged(z);
        AppMethodBeat.m18333at(this, z);
    }
 
    @Override // com.tencent.p364mm.hellhoundlib.activities.HellActivity
    public void onCreate(Bundle bundle) {
        int i = 0;
        AppMethodBeat.m18334i(34890);
        super.onCreate(bundle);
        overridePendingTransition(0, 0);
        C68561at.m107646e(getWindow());
        Log.m105219i("MicroMsg.SendImgProxyUI", "onCreate isRunning:%b ,%d", Boolean.valueOf(isRunning), Integer.valueOf(hashCode()));
        if (isRunning) {
            Log.m105222w("MicroMsg.SendImgProxyUI", "duplicate instance");
            finish();
            AppMethodBeat.m18335o(34890);
            return;
        }
        isRunning = true;
        setContentView(C6760R.C6765layout.f11381hl);
        this.osZ = C68769h.m108103a((Context) this, getString(C6760R.string.evg), false, (DialogInterface.OnCancelListener) null);
        final boolean isWifi = NetStatusUtil.isWifi(this);
        boolean z = WXHardCoderJNI.hcSendPicMsgEnable;
        int i2 = WXHardCoderJNI.hcSendPicMsgDelay;
        int i3 = WXHardCoderJNI.hcSendPicMsgCPU;
        int i4 = WXHardCoderJNI.hcSendPicMsgIO;
        if (WXHardCoderJNI.hcSendPicMsgThr) {
            i = C12403h.aGH().getProcessTid();
        }
        final int startPerformance = WXHardCoderJNI.startPerformance(z, i2, i3, i4, i, WXHardCoderJNI.hcSendPicMsgTimeout, 203, WXHardCoderJNI.hcSendPicMsgAction, "MicroMsg.SendImgProxyUI");
        C13869bg.aGH().postToWorker(new Runnable() {
            /* class com.tencent.p364mm.p2166ui.chatting.SendImgProxyUI.RunnableC690841 */
 
            public final void run() {
                AppMethodBeat.m18334i(34889);
                Log.m105218i("MicroMsg.SendImgProxyUI", "test before sendMutiImage");
                SendImgProxyUI.m108841a(SendImgProxyUI.this, SendImgProxyUI.this.getIntent());
                ArrayList<Integer> arrayList = new ArrayList<>();
                arrayList.add(-1);
                C13869bg.aGH().setLowPriority();
                Log.m105218i("MicroMsg.SendImgProxyUI", "test before finish");
                SendImgProxyUI.this.osZ.dismiss();
                SendImgProxyUI.this.setResult(-1, SendImgProxyUI.this.getIntent().putIntegerArrayListExtra("GalleryUI_ImgIdList", arrayList));
                boolean unused = SendImgProxyUI.isRunning = false;
                SendImgProxyUI.this.finish();
                if (NetStatusUtil.isWifi(SendImgProxyUI.this) == isWifi) {
                    WXHardCoderJNI.stopPerformance(WXHardCoderJNI.hcSendPicMsgEnable, startPerformance);
                }
                AppMethodBeat.m18335o(34889);
            }
        });
        AppMethodBeat.m18335o(34890);
    }
 
    @Override // com.tencent.p364mm.p2166ui.MMBaseActivity, com.tencent.p364mm.hellhoundlib.activities.HellActivity
    public void onDestroy() {
        AppMethodBeat.m18334i(34891);
        Log.m105219i("MicroMsg.SendImgProxyUI", "onDestroy isRunning:%b , %d", Boolean.valueOf(isRunning), Integer.valueOf(hashCode()));
        super.onDestroy();
        AppMethodBeat.m18335o(34891);
    }
 
    @Override // com.tencent.p364mm.p2166ui.MMBaseActivity, com.tencent.p364mm.hellhoundlib.activities.HellActivity
    public void onResume() {
        AppMethodBeat.m18334i(34892);
        Log.m105219i("MicroMsg.SendImgProxyUI", "onResume isRunning:%b ,%d", Boolean.valueOf(isRunning), Integer.valueOf(hashCode()));
        super.onResume();
        AppMethodBeat.m18335o(34892);
    }
 
    /* renamed from: a */
    private static ArrayList<String> m108840a(ArrayList<String> arrayList, int i, ArrayList<String> arrayList2, boolean z) {
        AppMethodBeat.m18334i(34893);
        ArrayList<String> arrayList3 = new ArrayList<>();
        if (arrayList != null) {
            Iterator<String> it = arrayList.iterator();
            while (it.hasNext()) {
                String next = it.next();
                if (ImgUtil.isImgFile(next)) {
                    long bwT = C73019u.bwT(next);
                    if (z || bwT <= ((long) i)) {
                        arrayList3.add(next);
                    } else {
                        arrayList2.add(next);
                    }
                }
            }
        }
        AppMethodBeat.m18335o(34893);
        return arrayList3;
    }
 
    /* renamed from: l */
    private static void m108842l(ArrayList<Integer> arrayList, ArrayList<String> arrayList2) {
        AppMethodBeat.m18334i(34894);
        if (arrayList.size() != arrayList2.size()) {
            Log.m105214e("MicroMsg.SendImgProxyUI", "[insertErrMsg] WTF");
            AppMethodBeat.m18335o(34894);
            return;
        }
        for (int i = 0; i < arrayList2.size(); i++) {
            int intValue = arrayList.get(i).intValue();
            C7853g wo = C7903q.bkU().mo26436wo(intValue);
            int bwT = (int) C73019u.bwT(arrayList2.get(i));
            wo.mo26377wh(bwT);
            wo.mo26378wi(bwT);
            C7903q.bkU().mo26395a(intValue, wo);
            long j = wo.jqI;
            Log.m105219i("MicroMsg.SendImgProxyUI", "[insertErrMsg] msgLocalId:%s oriImgLocalId:%s", Long.valueOf(j), Integer.valueOf(intValue));
            C67851ca Mg = ((AbstractC45315l) C12403h.m27078U(AbstractC45315l.class)).eGz().mo67522Mg(j);
            Mg.setStatus(5);
            Mg.mo32377pB(256);
            ((AbstractC45315l) C12403h.m27078U(AbstractC45315l.class)).eGz().mo67531a(j, Mg);
            Log.m105219i("MicroMsg.SendImgProxyUI", "after update msgInfo, localId[%d] svrId[%d] talker[%s] type[%d] isSend[%d] imgPath[%s], status[%d] createTime[%d]", Long.valueOf(Mg.field_msgId), Long.valueOf(Mg.field_msgSvrId), Mg.field_talker, Integer.valueOf(Mg.getType()), Integer.valueOf(Mg.field_isSend), Mg.field_imgPath, Integer.valueOf(Mg.field_status), Long.valueOf(Mg.field_createTime));
        }
        AppMethodBeat.m18335o(34894);
    }
 
    /* renamed from: a */
    static /* synthetic */ void m108841a(SendImgProxyUI sendImgProxyUI, Intent intent) {
        AppMethodBeat.m18334i(34895);
        if (intent == null) {
            Log.m105214e("MicroMsg.SendImgProxyUI", "data is empty!");
            AppMethodBeat.m18335o(34895);
            return;
        }
        boolean booleanExtra = intent.getBooleanExtra("CropImage_Compress_Img", true);
        intent.getStringExtra("GalleryUI_ToUser");
        ArrayList<String> arrayList = new ArrayList<>();
        ArrayList<String> a = m108840a(intent.getStringArrayListExtra("CropImage_OutputPath_List"), intent.getIntExtra("CropImage_limit_Img_Size", 26214400), arrayList, booleanExtra);
        intent.putStringArrayListExtra("CropImage_OutputPath_List", a);
        ArrayList<String> stringArrayListExtra = intent.getStringArrayListExtra("key_select_video_list");
        if (a.size() == 0 && arrayList.size() == 0 && (stringArrayListExtra == null || stringArrayListExtra.size() == 0)) {
            Toast.makeText(sendImgProxyUI, sendImgProxyUI.getString(C6760R.string.dly), 0).show();
            Log.m105214e("MicroMsg.SendImgProxyUI", "filelist is empty!");
            AppMethodBeat.m18335o(34895);
            return;
        }
        int intExtra = intent.getIntExtra("from_source", 0);
        int intExtra2 = intent.getIntExtra("CropImage_rotateCount", 0);
        String stringExtra = intent.getStringExtra("GalleryUI_ToUser");
        Log.m105212d("MicroMsg.SendImgProxyUI", "dkimgsource" + intent.getIntExtra("from_source", 0));
        if (stringExtra == null) {
            Log.m105214e("MicroMsg.SendImgProxyUI", "toUserName is null");
            AppMethodBeat.m18335o(34895);
            return;
        }
        if (arrayList.size() > 0) {
            C7895p.bkI().mo26486a(arrayList, true, intExtra, intExtra2, stringExtra);
            m108842l(C7895p.bkI().mo26484TG(stringExtra), arrayList);
            Log.m105215e("MicroMsg.SendImgProxyUI", "overSizeList size:%s!", Integer.valueOf(arrayList.size()));
        }
        C7895p.bkI().mo26486a(a, booleanExtra, intExtra, intExtra2, stringExtra);
        AppMethodBeat.m18335o(34895);
    }
}

只是找到了关键功能包,目前看并没有发现监听用户输入行为,但是在数据传输和服务器端是否存在就不得而知了。

 

请大家指教。


[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)

收藏
免费 1
支持
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回
//