智慧城市 v1.2.1版本的 MD5 值为:d4aeacb5153a2710d0b6882be5dd2b15
以下内容为反编译后的 FeatureConfig.java 源代码,内容仅作参考
package io.rong.imkit.config;
import android.content.Context;
import android.content.res.Resources;
import io.rong.common.RLog;
import io.rong.imkit.GlideKitImageEngine;
import io.rong.imkit.IMCenter;
import io.rong.imkit.KitImageEngine;
import io.rong.imkit.R;
import io.rong.imkit.feature.quickreply.IQuickReplyProvider;
import io.rong.imlib.model.Conversation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class FeatureConfig {
private static String KIT_VERSION = "4.1.0.98";
private static final String TAG = "FeatureConfig";
private int audioNBEncodingBitRate;
private int audioWBEncodingBitRate;
private boolean isQuickReplyEnable;
private KitImageEngine mKitImageEngine;
private IQuickReplyProvider quickReplyProvider;
private List<Conversation.ConversationType> readReceiptSupportTypes;
public boolean rc_wipe_out_notification_message = true;
public boolean rc_set_java_script_enabled = true;
public boolean rc_sound_in_foreground = true;
private boolean isReferenceEnable = true;
private boolean isDestructEnable = false;
private IMCenter.VoiceMessageType voiceMessageType = IMCenter.VoiceMessageType.HighQuality;
public FeatureConfig() {
ArrayList arrayList = new ArrayList();
this.readReceiptSupportTypes = arrayList;
arrayList.add(Conversation.ConversationType.PRIVATE);
this.readReceiptSupportTypes.add(Conversation.ConversationType.GROUP);
this.isQuickReplyEnable = false;
this.audioNBEncodingBitRate = 7950;
this.audioWBEncodingBitRate = 12650;
this.mKitImageEngine = new GlideKitImageEngine();
}
public void initConfig(Context context) {
if (context != null) {
Resources resources = context.getResources();
try {
this.rc_wipe_out_notification_message = resources.getBoolean(R.bool.rc_wipe_out_notification_message);
} catch (Exception e) {
RLog.e(TAG, "rc_wipe_out_notification_message not get value", e);
}
try {
this.rc_set_java_script_enabled = resources.getBoolean(R.bool.rc_set_java_script_enabled);
} catch (Exception e2) {
RLog.e(TAG, "rc_set_java_script_enabled not get value", e2);
}
try {
this.isDestructEnable = resources.getBoolean(R.bool.rc_open_destruct_plugin);
} catch (Exception e3) {
RLog.e(TAG, "rc_open_destruct_plugin not get value", e3);
}
try {
this.rc_sound_in_foreground = resources.getBoolean(R.bool.rc_sound_in_foreground);
} catch (Exception e4) {
RLog.e(TAG, "rc_sound_in_foreground not get value", e4);
}
}
}
public boolean isReferenceEnable() {
return this.isReferenceEnable;
}
public boolean isDestructEnable() {
return this.isDestructEnable;
}
public boolean isQuickReplyEnable() {
return this.isQuickReplyEnable;
}
public boolean isQuickReplyType() {
return this.isQuickReplyEnable;
}
public void setAudioNBEncodingBitRate(int i) {
this.audioNBEncodingBitRate = i;
}
public void setAudioWBEncodingBitRate(int i) {
this.audioWBEncodingBitRate = i;
}
public void setKitImageEngine(KitImageEngine kitImageEngine) {
if (kitImageEngine != null) {
this.mKitImageEngine = kitImageEngine;
}
}
public void setVoiceMessageType(IMCenter.VoiceMessageType voiceMessageType) {
this.voiceMessageType = voiceMessageType;
}
public int getAudioNBEncodingBitRate() {
return this.audioNBEncodingBitRate;
}
public KitImageEngine getKitImageEngine() {
return this.mKitImageEngine;
}
public int getAudioWBEncodingBitRate() {
return this.audioWBEncodingBitRate;
}
public IQuickReplyProvider getQuickReplyProvider() {
return this.quickReplyProvider;
}
public boolean isReadReceiptConversationType(Conversation.ConversationType conversationType) {
List<Conversation.ConversationType> list = this.readReceiptSupportTypes;
if (list != null) {
return list.contains(conversationType);
}
return false;
}
public IMCenter.VoiceMessageType getVoiceMessageType() {
return this.voiceMessageType;
}
public void enableReadReceipt(Conversation.ConversationType... conversationTypeArr) {
if (conversationTypeArr != null) {
this.readReceiptSupportTypes.clear();
this.readReceiptSupportTypes.addAll(Arrays.asList(conversationTypeArr));
}
}
public void enableReference(Boolean bool) {
this.isReferenceEnable = bool.booleanValue();
}
public void enableDestruct(Boolean bool) {
this.isDestructEnable = bool.booleanValue();
}
public void enableQuickReply(IQuickReplyProvider iQuickReplyProvider) {
this.isQuickReplyEnable = true;
this.quickReplyProvider = iQuickReplyProvider;
}
}