Skip to content

Commit a3054b6

Browse files
guangyaoguangyao
authored andcommitted
2 parents 217df61 + 262ed47 commit a3054b6

File tree

8 files changed

+67
-28
lines changed

8 files changed

+67
-28
lines changed

android/libs/mi_push_sdk_3.1.2.jar

-471 KB
Binary file not shown.

android/libs/mi_push_sdk_3.2.2.jar

585 KB
Binary file not shown.

android/libs/nim-basesdk-3.5.5.jar

-653 KB
Binary file not shown.

android/libs/nim-basesdk-4.0.0.jar

713 KB
Binary file not shown.

android/proguard-rules.pro

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
# To enable ProGuard in your project, edit project.properties
2+
# to define the proguard.config property as described in that file.
3+
#
14
# Add project specific ProGuard rules here.
25
# By default, the flags in this file are appended to flags specified
3-
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4-
# You can edit the include path and order by changing the proguardFiles
5-
# directive in build.gradle.
6+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
7+
# You can edit the include path and order by changing the ProGuard
8+
# include property in project.properties.
69
#
710
# For more details, see
811
# http://developer.android.com/guide/developing/tools/proguard.html
@@ -16,8 +19,16 @@
1619
# public *;
1720
#}
1821

19-
# Disabling obfuscation is useful if you collect stack traces from production crashes
20-
# (unless you are using a system that supports de-obfuscate the stack traces).
22+
# Optimizations: If you don't want to optimize, use the
23+
# proguard-android.txt configuration file instead of this one, which
24+
# turns off the optimization flags. Adding optimization introduces
25+
# certain risks, since for example not all optimizations performed by
26+
# ProGuard works on all versions of Dalvik. The following flags turn
27+
# off various optimizations known to have issues, but the list may not
28+
# be complete or up to date. (The "arithmetic" optimization can be
29+
# used if you are only targeting Android 2.0 or later.) Make sure you
30+
# test thoroughly if you go this route.
31+
2132
-optimizations !code/simplification/cast,!field/*,!class/merging/*
2233
-optimizationpasses 5
2334
-allowaccessmodification
@@ -34,17 +45,13 @@
3445
# The support library contains references to newer platform versions.
3546
# Don't warn about those in case this app is linking against an older
3647
# platform version. We know about them, and they are safe.
37-
-dontwarn android.support.**
38-
48+
### Android support
3949
-dontwarn org.apache.http.**
40-
-dontwarn com.amap.**
41-
-dontwarn com.alibaba.**
42-
-dontwarn com.netease.**
43-
-dontwarn io.netty.**
44-
-dontwarn com.autonavi.amap.**
50+
-dontwarn android.support.**
51+
-keep class android.support.** {*;}
52+
-keep class android.webkit.** {*;}
4553

46-
### keep options
47-
#system default, from android example
54+
### keep options, system default, from android example
4855
-keep public class * extends android.app.Activity
4956
-keep public class * extends android.support.v4.app.Fragment
5057
-keep public class * extends android.app.Application
@@ -60,24 +67,47 @@
6067
-keepattributes *Annotation*,InnerClasses
6168
#-keepattributes SourceFile,LineNumberTable
6269

63-
### 3rd party jars
64-
-keep class android.support.** {*;}
70+
### APP 3rd party jars
71+
-dontwarn com.amap.**
6572
-keep class com.amap.** {*;}
66-
-keep class android.webkit.** {*;}
73+
-dontwarn com.autonavi.amap.**
6774
-keep class com.autonavi.amap.** {*;}
68-
-keep class com.nostra13.** {*;}
75+
-dontwarn com.alibaba.**
76+
-keep class com.alibaba.fastjson.** {*;}
6977

70-
### 3rd party jars(xiaomi push)
78+
### APP 3rd party jars(xiaomi push)
7179
-dontwarn com.xiaomi.push.**
7280
-keep class com.xiaomi.** {*;}
7381

74-
### 3rd party jars(lucene)
75-
-dontwarn org.apache.lucene.**
76-
-keep class org.apache.lucene.** {*;}
82+
### APP 3rd party jars(huawei push)
83+
84+
-ignorewarning
85+
-keepattributes Exceptions
86+
-keepattributes Signature
87+
# hmscore-support: remote transport
88+
-keep class * extends com.huawei.hms.core.aidl.IMessageEntity { *; }
89+
# hmscore-support: remote transport
90+
-keepclasseswithmembers class * implements com.huawei.hms.support.api.transport.DatagramTransport {
91+
<init>(...); }
92+
# manifest: provider for updates
93+
-keep public class com.huawei.hms.update.provider.UpdateProvider { public *; protected *; }
94+
95+
### APP 3rd party jars(glide)
96+
-keep public class * implements com.bumptech.glide.module.GlideModule
97+
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
98+
**[] $VALUES;
99+
public *;
100+
}
101+
102+
### org.json xml
103+
-dontwarn org.json.**
104+
-keep class org.json.**{*;}
77105

78-
### nimlib
106+
### NIM SDK
107+
-dontwarn com.netease.**
79108
-keep class com.netease.** {*;}
80-
-keep class com.alibaba.fastjson.** {*;}
109+
-dontwarn org.apache.lucene.**
110+
-keep class org.apache.lucene.** {*;}
81111
-keep class net.sqlcipher.** {*;}
82112

83113
-keepclasseswithmembernames class * {

android/src/main/java/com/netease/im/session/AudioPlayService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ public boolean updateAudioStreamType(int audioStreamType) {
160160

161161
private void changeAudioStreamType(int audioStreamType) {
162162
if (isPlayingAudio()) {
163-
seekPosition = currentAudioPlayer.getCurrentPosition();
163+
try {
164+
seekPosition = currentAudioPlayer.getCurrentPosition();
165+
} catch (Exception e) {
166+
e.printStackTrace();
167+
}
164168
needSeek = true;
165169
currentAudioStreamType = audioStreamType;
166170
currentAudioPlayer.start(audioStreamType);

android/src/main/java/com/netease/im/session/AudioPlayerM.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ public void handleMessage(Message var1) {
5757
switch (var1.what) {
5858
case 0:
5959
if (AudioPlayerM.this.mListener != null) {
60-
AudioPlayerM.this.mListener.onPlaying((long) AudioPlayerM.this.mPlayer.getCurrentPosition());
60+
try {
61+
AudioPlayerM.this.mListener.onPlaying((long) AudioPlayerM.this.mPlayer.getCurrentPosition());//TODO
62+
} catch (Exception e) {
63+
e.printStackTrace();
64+
}
6165
}
6266

6367
this.sendEmptyMessageDelayed(0, AudioPlayerM.this.mIntervalTime);

android/src/main/java/com/netease/im/session/SessionService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ public void sendTextMessage(String content, List<String> selectedMembers, OnSend
613613

614614
if (selectedMembers != null && !selectedMembers.isEmpty()) {
615615
MemberPushOption option = createMemPushOption(selectedMembers, message);
616-
message.setPushContent("有人@了你");
616+
// message.setPushContent("有人@了你");
617617
message.setMemberPushOption(option);
618618
}
619619
sendMessage(message, onSendMessageListener);
@@ -846,7 +846,8 @@ private MemberPushOption createMemPushOption(List<String> selectedMembers, IMMes
846846

847847
MemberPushOption memberPushOption = new MemberPushOption();
848848
memberPushOption.setForcePush(true);
849-
memberPushOption.setForcePushContent(message.getContent());
849+
// memberPushOption.setForcePushContent(message.getContent());
850+
memberPushOption.setForcePushContent("有人@了你");
850851
memberPushOption.setForcePushList(selectedMembers);
851852
return memberPushOption;
852853
}

0 commit comments

Comments
 (0)