fix: 修正资源ID typo 及单元类型声明

修正布局文件中 `@+rid` 为 `@+id` 的 typo,将 UNIT_TYPE 常量类型从 int 改为 byte 以保持协议一致性,新增 StreamModeReportListener 接口,并将日志级别从 error 调整为 debug。
This commit is contained in:
2026-07-23 12:14:56 +08:00
parent 6138a1ffa4
commit 1800881219
3 changed files with 10 additions and 5 deletions

View File

@@ -64,6 +64,10 @@ public class WebRtcClient {
void onDisconnected();
}
public interface StreamModeReportListener {
void onStreamModeReported(int mode);
}
private ConnectionListener connectionListener;
public WebRtcClient(Context context, WebSocketClient wsClient, String deviceId) {
@@ -395,7 +399,7 @@ public class WebRtcClient {
}
private void sendIceCandidate(IceCandidate candidate, String controlledId) {
Log.e(TAG, "sendIceCandidate: " );
Log.d(TAG, "sendIceCandidate: " );
SignalMessage msg = new SignalMessage();
msg.setType("ICE_CANDIDATE");
msg.setFromDeviceId(deviceId);

View File

@@ -160,8 +160,9 @@
android:backgroundTint="#E53935"
android:text="断开连接"
android:textColor="@android:color/white" />
<Switch
android:id="@+rid/switch_stream_mode"
android:id="@+id/switch_stream_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
@@ -170,7 +171,7 @@
android:textSize="12sp" />
<TextView
android:id="@+rid/tv_stream_mode"
android:id="@+id/tv_stream_mode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"