diff --git a/AGENTS.md b/AGENTS.md index f8f3215..712ffde 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1057,3 +1057,9 @@ dependencies { > **最后更新:** 2026-08-21 > **维护者:** Android Team > **适用版本:** Android SDK 21+ / Jetpack ViewModel 2.5+ / RxJava 3.x / ViewBinding enabled + +## WebRTC 依赖版本约束 + +- ElderlyDialer 当前固定使用 `io.github.webrtc-sdk:android:144.7559.09`,常规依赖升级时保留此版本。 +- 真机复测记录(2026-11-10):升级到 `150.7871.04` 后,远程连接已建立 ICE 并打开控制通道,但 ElderlyDialer 的 WebRTC 原生线程在发送端更新 RTP 参数附近报 `vector[] index out of bounds`,随后进程因 `SIGABRT` 退出。回退到 `144.7559.09` 后,用户确认同一远程连接场景恢复正常。具体原生越界位置尚未通过符号化堆栈确认。 +- `ttstd_family_care`、`ElderlyDialer` 和 `youlai-boot-ttstd` 的发布版本各自管理。升级 WebRTC 前,使用实际控制端和信令后端验证远程连接、画面、控制通道和重连。 diff --git a/app/build.gradle b/app/build.gradle index 6b44224..c0e75e2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -210,7 +210,7 @@ android { } ext { - jpush = [version: "5.7.0"] + jpush = [version: "6.0.7"] AndroidPicker = [version: "4.1.15"] } @@ -224,7 +224,7 @@ dependencies { implementation 'net.i2p.crypto:eddsa:0.3.0' //sherpa-onnx https://github.com/k2-fsa/sherpa-onnx/releases - implementation files('libs/sherpa-onnx-1.13.2.aar') + implementation files('libs/sherpa-onnx-2.0.1.aar') implementation project(path: ':niceimageview') implementation project(path: ':iconloader') @@ -240,57 +240,56 @@ dependencies { implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-rx3:1.11.0' // HiveMQ MQTT 客户端 (MQTT 3.1.1 / 5.0) - implementation 'com.hivemq:hivemq-mqtt-client:1.3.17' + implementation 'com.hivemq:hivemq-mqtt-client:1.4.2' - //保持1.3.1 更新会报错 - implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.appcompat:appcompat:1.8.0' //2.0.4以上无法预览 - implementation 'androidx.constraintlayout:constraintlayout:2.2.1' + implementation 'androidx.constraintlayout:constraintlayout:2.2.2' implementation "androidx.multidex:multidex:2.0.1" implementation "androidx.recyclerview:recyclerview:1.4.0" // For control over item selection of both touch and mouse driven selection implementation "androidx.recyclerview:recyclerview-selection:1.2.0" // Java language implementation - implementation "androidx.fragment:fragment:1.8.9" + implementation "androidx.fragment:fragment:1.9.1" implementation "androidx.viewpager2:viewpager2:1.1.0" implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation "androidx.work:work-runtime:2.9.0" - implementation 'androidx.browser:browser:1.8.0' - implementation "androidx.webkit:webkit:1.14.0" - implementation 'androidx.startup:startup-runtime:1.0.0' + implementation "androidx.work:work-runtime:2.11.2" + implementation 'androidx.browser:browser:1.10.0' + implementation "androidx.webkit:webkit:1.15.0" + implementation 'androidx.startup:startup-runtime:1.2.0' // Room依赖 - implementation "androidx.room:room-runtime:2.8.4" - implementation "androidx.room:room-rxjava3:2.8.4" - kapt "androidx.room:room-compiler:2.8.4" + implementation "androidx.room:room-runtime:2.8.5" + implementation "androidx.room:room-rxjava3:2.8.5" + kapt "androidx.room:room-compiler:2.8.5" // ViewModel和LiveData - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.10.0' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.10.0' - implementation "androidx.lifecycle:lifecycle-runtime:2.10.0" - implementation "androidx.lifecycle:lifecycle-viewmodel:2.10.0" - implementation "androidx.lifecycle:lifecycle-livedata:2.10.0" + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.11.0' + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.11.0' + implementation "androidx.lifecycle:lifecycle-runtime:2.11.0" + implementation "androidx.lifecycle:lifecycle-viewmodel:2.11.0" + implementation "androidx.lifecycle:lifecycle-livedata:2.11.0" // 可选:RxJava3 Observable → LiveData 的桥接 - implementation 'androidx.lifecycle:lifecycle-reactivestreams:2.10.0' - kapt "androidx.lifecycle:lifecycle-compiler:2.10.0" + implementation 'androidx.lifecycle:lifecycle-reactivestreams:2.11.0' + kapt "androidx.lifecycle:lifecycle-compiler:2.11.0" // LifecycleService 核心库 - implementation "androidx.lifecycle:lifecycle-service:2.10.0" + implementation "androidx.lifecycle:lifecycle-service:2.11.0" - implementation 'androidx.camera:camera-core:1.4.0' - implementation 'androidx.camera:camera-camera2:1.4.0' - implementation 'androidx.camera:camera-view:1.4.0' - implementation 'androidx.camera:camera-lifecycle:1.4.0' + implementation 'androidx.camera:camera-core:1.6.2' + implementation 'androidx.camera:camera-camera2:1.6.2' + implementation 'androidx.camera:camera-view:1.6.2' + implementation 'androidx.camera:camera-lifecycle:1.6.2' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.3.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0' implementation 'com.google.android.material:material:1.14.0' - implementation 'com.googlecode.libphonenumber:libphonenumber:9.0.30' + implementation 'com.googlecode.libphonenumber:libphonenumber:9.0.43' //glide - implementation 'com.github.bumptech.glide:glide:4.15.1' - kapt 'com.github.bumptech.glide:compiler:4.15.1' + implementation 'com.github.bumptech.glide:glide:5.0.9' + kapt 'com.github.bumptech.glide:compiler:5.0.9' // SVG支持库 implementation 'com.caverock:androidsvg:1.4' // 如果需要,添加Glide SVG模块(社区版) @@ -301,14 +300,14 @@ dependencies { implementation 'io.reactivex.rxjava3:rxandroid:3.0.2' implementation 'com.squareup.moshi:moshi:1.15.2' - implementation 'com.squareup.okhttp3:okhttp:5.3.2' - implementation 'com.squareup.okhttp3:logging-interceptor:5.3.2' + implementation 'com.squareup.okhttp3:okhttp:5.5.1' + implementation 'com.squareup.okhttp3:logging-interceptor:5.5.1' implementation 'com.squareup.retrofit2:retrofit:3.0.0' implementation 'com.squareup.retrofit2:converter-gson:3.0.0' // implementation 'com.squareup.retrofit2:adapter-rxjava2:3.0.0' implementation "com.squareup.retrofit2:adapter-rxjava3:3.0.0" //Gson - implementation 'com.google.code.gson:gson:2.14.0' + implementation 'com.google.code.gson:gson:2.15.0' implementation 'com.google.zxing:core:3.5.4' @@ -318,7 +317,7 @@ dependencies { implementation 'com.github.neo-turak:LiveEventBus:1.8.1' //MMKV - implementation 'com.tencent:mmkv-static:2.4.0' + implementation 'com.tencent:mmkv-static:2.4.3' //bugly implementation 'com.tencent.bugly:crashreport:4.1.9.7' @@ -332,40 +331,32 @@ dependencies { implementation 'com.aliyun.ams:alicloud-android-push:3.10.1' //极光 - // 此处以JPush 5.6.0 版本为例,注意:从 5.0.0 版本开始可以自动拉取 JCore 包,无需另外配置 + // 6.0.7 是仍为蔚来通道发布同版本插件的最新稳定版,JCore 由 JPush 自动引入。 implementation "cn.jiguang.sdk:jpush:$jpush.version" //若不集成厂商通道,可直接跳过以下依赖 // 极光厂商插件版本与接入 JPush 版本保持一致,下同 // 接入华为厂商 - implementation 'com.huawei.hms:push:6.13.0.300' + implementation 'com.huawei.hms:push:6.13.0.301' implementation "cn.jiguang.sdk.plugin:huawei:$jpush.version" // 接入 FCM 厂商 - implementation 'com.google.firebase:firebase-messaging:24.1.0' + implementation 'com.google.firebase:firebase-messaging:25.1.3' implementation "cn.jiguang.sdk.plugin:fcm:$jpush.version" // 接入魅族厂商 implementation "cn.jiguang.sdk.plugin:meizu:$jpush.version" - // JPush Android SDK v5.2.3 开始,需要单独引入 魅族 厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/meizu/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下 - implementation files('libs/push-internal-5.0.5.aar') // 接入 VIVO 厂商 implementation "cn.jiguang.sdk.plugin:vivo:$jpush.version" // 接入小米厂商 implementation "cn.jiguang.sdk.plugin:xiaomi:$jpush.version" // 接入 OPPO 厂商 implementation "cn.jiguang.sdk.plugin:oppo:$jpush.version" - // JPush Android SDK v4.6.0 开始,需要单独引入 oppo 厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/oppo/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下 - implementation files('libs/com.heytap.msp_V3.7.1.aar') //以下为 OPPO 3.1.0 aar需要依赖 // implementation 'com.google.code.gson:gson:2.10.1' - implementation 'commons-codec:commons-codec:1.6' - implementation 'androidx.annotation:annotation:1.1.0' + implementation 'commons-codec:commons-codec:1.23.0' + implementation 'androidx.annotation:annotation:1.10.0' // 接入荣耀厂商 implementation "cn.jiguang.sdk.plugin:honor:$jpush.version" - //需要单独引入荣耀厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/honor/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下 - implementation files('libs/HiPushSDK-8.0.12.307.aar') // 接入蔚来厂商 implementation "cn.jiguang.sdk.plugin:nio:$jpush.version" - //JPush Android SDK v5.6.0 开始需要单独引入蔚来厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/nio/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下 - implementation files('libs/niopush-sdk-v1.0.aar') //地图组件 @@ -390,11 +381,11 @@ dependencies { implementation 'com.opencsv:opencsv:5.12.0' // 权限请求框架:https://github.com/getActivity/XXPermissions - implementation 'com.github.getActivity:XXPermissions:20.0' + implementation 'com.github.getActivity:XXPermissions:28.3' // implementation 'com.github.zcweng:switch-button:0.0.3@aar' implementation "com.github.kongzue.DialogX:DialogX:0.0.50" - implementation 'cn.6tail:lunar:1.7.7' - implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.4.0" + implementation 'cn.6tail:lunar:1.7.8' + implementation "io.github.cymchad:BaseRecyclerViewAdapterHelper4:4.4.2" implementation 'io.github.youth5201314:banner:2.2.3' // TinyPinyin核心包,约80KB @@ -403,13 +394,13 @@ dependencies { implementation 'com.github.promeg:tinypinyin-lexicons-android-cncity:2.0.3' // PictureSelector 基础 (必须) - implementation 'io.github.lucksiege:pictureselector:v3.11.2' + implementation 'io.github.lucksiege:pictureselector:v3.11.3' // 图片压缩 (按需引入) - implementation 'io.github.lucksiege:compress:v3.11.2' + implementation 'io.github.lucksiege:compress:v3.11.3' // 图片裁剪 (按需引入) - implementation 'io.github.lucksiege:ucrop:v3.11.2' + implementation 'io.github.lucksiege:ucrop:v3.11.3' // 自定义相机 (按需引入) - implementation 'io.github.lucksiege:camerax:v3.11.2' + implementation 'io.github.lucksiege:camerax:v3.11.3' //所有选择器的基础窗体(用于自定义弹窗) implementation "com.github.gzu-liyujiang.AndroidPicker:Common:$AndroidPicker.version" @@ -428,19 +419,19 @@ dependencies { //图片选择器 implementation "com.github.gzu-liyujiang.AndroidPicker:ImagePicker:$AndroidPicker.version" //阴影布局 - implementation 'com.github.lihangleo2:ShadowLayout:3.4.5' + implementation 'com.github.lihangleo2:ShadowLayout:3.4.6' // ---- WebRTC 远程控制(移植自 WebRTCControlled)---- // WebRTC SDK(屏幕采集 + PeerConnection + DataChannel) implementation 'io.github.webrtc-sdk:android:144.7559.09' // Protobuf(DataChannel 控制指令二进制) - implementation 'com.google.protobuf:protobuf-java:3.25.1' + implementation 'com.google.protobuf:protobuf-java:4.36.2' } // WebRTC 远程控制:protobuf 编译配置(control_message.proto 位于 src/main/proto/) protobuf { protoc { - artifact = 'com.google.protobuf:protoc:3.25.1' + artifact = 'com.google.protobuf:protoc:4.36.2' } generateProtoTasks { all().configureEach { task -> diff --git a/app/libs/sherpa-onnx-1.13.2.aar b/app/libs/sherpa-onnx-2.0.1.aar similarity index 74% rename from app/libs/sherpa-onnx-1.13.2.aar rename to app/libs/sherpa-onnx-2.0.1.aar index 9686f8b..865563c 100644 Binary files a/app/libs/sherpa-onnx-1.13.2.aar and b/app/libs/sherpa-onnx-2.0.1.aar differ diff --git a/app/src/main/java/com/ttstd/dialer/bean/req/SnOtherInfoReq.java b/app/src/main/java/com/ttstd/dialer/bean/req/SnOtherInfoReq.java index 3b92334..a4d497b 100644 --- a/app/src/main/java/com/ttstd/dialer/bean/req/SnOtherInfoReq.java +++ b/app/src/main/java/com/ttstd/dialer/bean/req/SnOtherInfoReq.java @@ -11,7 +11,7 @@ import java.io.Serializable; * 字段与后端 {@code SnOtherInfoReq} 一一对应。 *
* 注意:后端 install_time / update_time_app 为 {@code LocalDateTime},
- * Jackson 默认接受 "yyyy-MM-dd'T'HH:mm:ss" 格式的字符串,
+ * 后端 JacksonConfig 使用 "yyyy-MM-dd HH:mm:ss" 格式的字符串,
* 因此这里用 String 承载,由采集器负责格式化,避免时间戳数字反序列化失败。
*/
public class SnOtherInfoReq implements Serializable {
diff --git a/app/src/main/java/com/ttstd/dialer/manager/MapManager.java b/app/src/main/java/com/ttstd/dialer/manager/MapManager.java
index f46d6f1..75b3c48 100644
--- a/app/src/main/java/com/ttstd/dialer/manager/MapManager.java
+++ b/app/src/main/java/com/ttstd/dialer/manager/MapManager.java
@@ -4,6 +4,8 @@ import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
+import android.os.Handler;
+import android.os.Looper;
import android.provider.Settings;
import android.text.TextUtils;
@@ -29,6 +31,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
public class MapManager {
private static final String TAG = "MapManager";
+ private static final long LOCATION_TIMEOUT_MS = 30_000L;
private static final String[] REQUIRED_PERMISSIONS = {
android.Manifest.permission.ACCESS_FINE_LOCATION,
android.Manifest.permission.ACCESS_COARSE_LOCATION
@@ -41,6 +44,15 @@ public class MapManager {
private final MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
private LocationClient mLocationClient;
private LocationClientOption mOption;
+ private final Handler mMainHandler = new Handler(Looper.getMainLooper());
+ private boolean mLocationActive;
+ private final Runnable mLocationTimeout = () -> {
+ if (mLocationActive) {
+ stopLocation();
+ saveLocationError("定位超时");
+ notifyLocationFailure("定位超时");
+ }
+ };
// 线程安全的回调列表
private final List