mirror of
https://github.com/WuKongIM/WuKongIMAndroidSDK
synced 2025-06-06 09:08:33 +00:00
fix:合并代码
This commit is contained in:
commit
22b28ce055
@ -3,6 +3,7 @@ package com.xinbida.wukongdemo
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
|
import android.widget.Button
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.widget.AppCompatImageView
|
import androidx.appcompat.widget.AppCompatImageView
|
||||||
@ -41,6 +42,12 @@ class ConversationActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initListener() {
|
private fun initListener() {
|
||||||
|
findViewById<Button>(R.id.disConn).setOnClickListener{
|
||||||
|
WKIM.getInstance().connectionManager.disconnect(false)
|
||||||
|
}
|
||||||
|
findViewById<Button>(R.id.conn).setOnClickListener{
|
||||||
|
WKIM.getInstance().connectionManager.connection()
|
||||||
|
}
|
||||||
// 监听连接状态
|
// 监听连接状态
|
||||||
WKIM.getInstance().connectionManager.addOnConnectionStatusListener(
|
WKIM.getInstance().connectionManager.addOnConnectionStatusListener(
|
||||||
"conv"
|
"conv"
|
||||||
|
@ -35,4 +35,15 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
<Button
|
||||||
|
android:id="@+id/disConn"
|
||||||
|
android:text="断开"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/conn"
|
||||||
|
android:text="连接"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -102,8 +102,8 @@ public class CryptoUtils {
|
|||||||
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException |
|
} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException |
|
||||||
InvalidAlgorithmParameterException | IllegalBlockSizeException |
|
InvalidAlgorithmParameterException | IllegalBlockSizeException |
|
||||||
BadPaddingException e) {
|
BadPaddingException e) {
|
||||||
WKLoggerUtils.getInstance().e(TAG,"aesEncrypt encrypt error");
|
WKLoggerUtils.getInstance().e(TAG,"aesEncrypt encrypt error");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (encrypted == null) {
|
if (encrypted == null) {
|
||||||
WKLoggerUtils.getInstance().e(TAG, "aesEncrypt The encrypted data is empty");
|
WKLoggerUtils.getInstance().e(TAG, "aesEncrypt The encrypted data is empty");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user