Camera support cross profile image capture测试失败
在android 5.1系统中的verifier测试中,有一个测试项:
BYOD Managed Provisioning—Camera support cross profile image capture
拍完照后,去查看照片(Verify captured image),啊噢,照片不能显示:
问题解决
一看这个,我猜这应该是照相机(Camera)的问题,我先用android系统本身camera应用再测试,发现还是有同样的问题,这就初步排除了camera应用的问题。因为,这个verifier应用是google提供的,于是,我给高通提了一个case。
然后与case负责人来来回回弄了好久,问题还是没有解决。刚好一天高通的framework的负责人来公司这边,帮忙解决这个问题。
(1)使用命令抓到log:
adb logcat -v time > '/home/android/桌面/log.txt'
(2)查看到相关log:
01-06 04:11:58.236 W/OpenGLRenderer(11811): Bitmap too large to be uploaded into a texture (3120x4160, max=4096x4096)
01-06 04:11:58.242 W/OpenGLRenderer(11811): Bitmap too large to be uploaded into a texture (3120x4160, max=4096x4096)
01-06 04:11:58.242 W/OpenGLRenderer(11811): Bitmap too large to be uploaded into a texture (3120x4160, max=4096x4096)
01-06 04:11:58.276 W/OpenGLRenderer(11811): Bitmap too large to be uploaded into a texture (3120x4160, max=4096x4096)
01-06 04:11:58.277 W/OpenGLRenderer(11811): Bitmap too large to be uploaded into a texture (3120x4160, max=4096x4096)
01-06 04:11:58.277 W/OpenGLRenderer(11811): Bitmap too large to be uploaded into a texture (3120x4160, max=4096x4096)
log显示,是因为图片过大导致图片显示不了。
(3)问题解决方法
原因找到了,就进入camera—设置—picture size—选择:3M pixels,再测试,照片可以显示了,测试项pass了。问题解决!!
问题解决之后的问题
那么,为什么这个问题,我不能解决了?而别人可以解决了?
这个才是问题解决之后的问题。
为什么这个问题,我不能解决了?其实,这个问题的答案就在别人解决这个问题的方法上。
分析log,找到问题的原因
其实,许多问题,找到了原因,问题就解决了一个大半。
而找问题的一个关键就是log信息。但是,非常的遗憾我没有抓log,更不要说分析log信息,当然也就彻底失去了解决此问题的机会了。
这个log信息,其实,我们也是经常利用其来分析解决问题。例如,我们是不是经常使用这些命令来抓log分析问题呢?
adb logcat –s ActivityManager
Log信息如下:
01-06 00:00:01.811 I/ActivityManager( 2073): Start proc 8632:com.qualcomm.qti.lunarinfo/u0a68 for content provider com.qualcomm.qti.lunarinfo/.LunarInfoProvider
01-06 00:00:01.925 I/ActivityManager( 2073): Start proc 8650:com.android.deskclock/u0a45 for broadcast com.android.deskclock/com.android.alarmclock.DigitalAppWidgetProvider
01-06 00:00:01.952 I/ActivityManager( 2073): Killing 6984:com.android.vending/u0a18 (adj 15): empty #17
01-06 00:00:02.364 I/ActivityManager( 2073): Killing 7339:com.google.android.googlequicksearchbox:search/u0a24 (adj 15): empty #17
01-06 00:00:02.721 I/ActivityManager( 2073): Start proc 8669:com.qualcomm.timeservice/1000 for broadcast com.qualcomm.timeservice/.TimeServiceBroadcastReceiver
01-06 00:00:02.883 I/ActivityManager( 2073): Killing 7385:com.android.gallery3d/u0a72 (adj 15): empty #17
adb logcat –s AndroidRuntime
Log信息如下:
--------- beginning of crash
01-06 03:14:35.561 E/AndroidRuntime( 6638): FATAL EXCEPTION: main
01-06 03:14:35.561 E/AndroidRuntime( 6638): Process: com.google.android.talk, PID: 6638
01-06 03:14:35.561 E/AndroidRuntime( 6638): java.lang.IllegalStateException: account null in maybeInitialize
01-06 03:14:35.561 E/AndroidRuntime( 6638): at bib.q(SourceFile:219)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.View.measure(View.java:17555)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2027)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1185)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1391)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1073)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5903)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:773)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.Choreographer.doCallbacks(Choreographer.java:586)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.Choreographer.doFrame(Choreographer.java:556)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:759)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.os.Handler.handleCallback(Handler.java:739)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at android.os.Handler.dispatchMessage(Handler.java:95)
01-06 03:14:35.561 E/AndroidRuntime( 6638): at an