Android13的手机, 使用4g,会出现异常

Open
#17 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, java
Domain
mobile-dev

Research direction

Start at TXCDRApi.getNetworkType in TXCDRApi.java:313, where the Android 13 4G stack trace shows TelephonyManager.getNetworkType failing, and trace its use from TXCDRApi.setCommonInfo. Reproduce on an Android 13 device using 4G and verify that TRTCCloud initialization no longer produces the reported SecurityException while network information remains handled.

Written by the indexing model from the issue text.

Description

getNetworkType会使用phone_state权限,目前这块在android13的系统上被限制了,这个需要优化解决一下嘞

java.lang.SecurityException: getDataNetworkTypeForSubscriber
at android.os.Parcel.createExceptionOrNull(Parcel.java:3011)
at android.os.Parcel.createException(Parcel.java:2995)
at android.os.Parcel.readException(Parcel.java:2978)
at android.os.Parcel.readException(Parcel.java:2920)
at com.android.internal.telephony.ITelephony$Stub$Proxy.getNetworkTypeForSubscriber(ITelephony.java:8593)
at android.telephony.TelephonyManager.getNetworkType(TelephonyManager.java:3090)
at android.telephony.TelephonyManager.getNetworkType(TelephonyManager.java:3054)
at com.tencent.liteav.basic.datareport.TXCDRApi.getNetworkType(TXCDRApi.java:313)
at com.tencent.liteav.basic.datareport.TXCDRApi.setCommonInfo(TXCDRApi.java:116)
at com.tencent.liteav.basic.datareport.TXCDRApi.txReportDAU(TXCDRApi.java:80)
at com.tencent.liteav.beauty.a.a(ReportDuaManage.java:96)
at com.tencent.liteav.beauty.c.(TXCVideoPreprocessor.java:257)
at com.tencent.liteav.c.(TXCCaptureAndEnc.java:154)
at com.tencent.liteav.trtc.impl.TRTCCloudImpl.(TRTCCloudImpl.java:239)
at com.tencent.liteav.trtc.impl.TRTCCloudImpl.sharedInstance(TRTCCloudImpl.java:198)
at com.tencent.trtc.TRTCCloud.sharedInstance(TRTCCloud.java:39)
at com.elong.android.flutter.plugins.TRTCPlugin.onMethodCall(TRTCPlugin.java:99)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:84)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:865)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:341)
at android.os.Looper.loopOnce(Looper.java:168)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8247)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)

Dominant language
Java
Stars
60
Forks
48
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tencent-RTC/TRTC_Android

All issues in Tencent-RTC/TRTC_Android

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.