错误 #11241
【设置】存储:点击U盘区域,设置停止运行
0%
1.0.2
描述
操作步骤:
1.连接U盘
2.进入设置-存储
3.点击U盘区域
实际结果:
设置停止运行
预期结果:
不报错
历史记录
#1 由 a3肖静 更新于 超过 4 年 之前
12-11 15:25:34.775 30519 30519 E AndroidRuntime: FATAL EXCEPTION: main
12-11 15:25:34.775 30519 30519 E AndroidRuntime: Process: com.android.settings, PID: 30519
12-11 15:25:34.775 30519 30519 E AndroidRuntime: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.provider.action.BROWSE cat=[android.intent.category.DEFAULT] dat=content://com.android.externalstorage.documents/root/FA00-BA81 typ=vnd.android.document/root (has extras) }
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1809)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1641)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:4905)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.app.Activity.startActivityFromFragment(Activity.java:4890)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.app.Activity$HostCallbacks.onStartActivityFromFragment(Activity.java:7170)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.app.Fragment.startActivity(Fragment.java:1130)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.app.Fragment.startActivity(Fragment.java:1109)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at com.android.settings.deviceinfo.StorageSettings.onPreferenceTreeClick(StorageSettings.java:290)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.support.v7.preference.Preference.performClick(Preference.java:986)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.support.v7.preference.Preference.performClick(Preference.java:961)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.support.v7.preference.Preference$1.onClick(Preference.java:148)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.view.View.performClick(View.java:5637)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:22445)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:755)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6182)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
12-11 15:25:34.775 30519 30519 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
12-11 15:25:34.778 586 598 W ActivityManager: Force finishing activity com.android.settings/.Settings$StorageSettingsActivity
12-11 15:25:35.284 586 600 W ActivityManager: Activity pause timeout for ActivityRecord{f320486 u0 com.android.settings/.Settings$StorageSettingsActivity t80 f}
#2 由 a1徐永峰 更新于 超过 4 年 之前
- 状态 从 新建 变更为 进行中
crash的原因是没有应用响应这个浏览存储内容的请求。
对比M11plus与T11启动日志发现传参不一样。进一步跟踪响应的intent流程发现T11中是在DocumentsActivity中的buildDefaultState方法来处理ACTION_BROWSE_DOCUMENT_ROOT的Action并响应用户请求的。但是M11Plus的DocumentsActivity没有对应的方式来响应请求。它有一个相似的方法includeState()但是没有在该方法中处理BROWSE的Action.因为不是我移植的源码,所以不确定是移植的不完整还是Android7自身的bug。需要继续投入时间跟进。
M11Plus ERROR
{act=android.provider.action.BROWSE cat=[android.intent.category.DEFAULT] dat=content://com.android.externalstorage.documents/root/0837-0816
typ=vnd.android.document/root (has extras)} from uid 1000 on display 0
T11 SUCCESS {act=android.provider.action.BROWSE_DOCUMENT_ROOT cat=[android.intent.category.DEFAULT] dat=content://com.android.externalstorage.documents/root/0837-0816 cmp=com.android.documentsui/.DocumentsActivity} from uid 1000 on display 0