当我选择模式“传送文件”
我要推的东西到我的手机上Android Oreo
,但是当我的手机连接到PC时,我选择的模式Transfer files
其连接到PC的手机已经崩溃,它已经坠毁。这是我坠毁的日志。当我选择模式“传送文件”
请查看日志:
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at com.qualcomm.qti.Performance.native_perf_hint(Native method) 01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at com.qualcomm.qti.Performance.perfHint(Performance.java:65)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at java.lang.reflect.Method.invoke(Native method)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at android.util.BoostFramework.perfHint(BoostFramework.java:176)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at com.android.providers.media.MtpService.addStorageLocked(MtpService.java:295)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at com.android.providers.media.MtpService.addStorageDevicesLocked(MtpService.java:67)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at com.android.providers.media.MtpService.manageServiceLocked(MtpService.java:214)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] - locked <0x0a63faea> (a java.lang.Class<com.android.providers.media.MtpService>)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at com.android.providers.media.MtpService.onStartCommand(MtpService.java:156)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at android.app.ActivityThread.-wrap20(ActivityThread.java:-1)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1698)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at android.os.Handler.dispatchMessage(Handler.java:105)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at android.os.Looper.loop(Looper.java:164)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at android.app.ActivityThread.main(ActivityThread.java:6548)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at java.lang.reflect.Method.invoke(Native method)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
01-04 05:14:19.839 7537 7537 F zygote64: java_vm_ext.cc:504] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
01-04 05:14:19.930 7537 7537 F zygote64: runtime.cc:492] Runtime aborting...
回答:
我已经解决了这个问题,因为在函数的第二个参数(BoostFramework.perfHint)是NULL.so在MtpService使用getApplicationContext()getPackageName(),而不是空。 java,看看下面:
-mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_MTP_BOOST,null,Integer.MAX_VALUE,-1); +mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_MTP_BOOST,getApplicationContext().getPackageName(),Integer.MAX_VALUE,-1);
以上是 当我选择模式“传送文件” 的全部内容, 来源链接: utcz.com/qa/261538.html