具有时间限制的视频录制意图永远不会在android O的给定时间限制内停止

时间:2017-08-18 07:05:32

标签: android android-intent android-8.0-oreo

我正在推出具有持续时间限制的视频录制意图。它在每个设备上都能正常工作,但在android O上,它永远不会在给定的时间停止。经测试的设备是Nexus 5X,Nexus 6P,Pixel。所有这些都有android O.

public static void videoCaptureActivity(Activity activity, Uri filePath, int durationLimit ){                
            Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
            intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
            intent.putExtra(MediaStore.EXTRA_OUTPUT, filePath);
            intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, durationLimit * 60);
            activity.startActivityForResult(intent, ViewConstants.KEY_VIDEO_CAPTURE_CODE);
         }

我检查了日志中发现的没有帮助,虽然我正在分享它:

08-18 11:36:07.511 3136-10386/? E/mm-camera-sensor: port_sensor_handle_aec_update:444miss aec update window, skip
08-18 11:36:08.111 3396-1469/? D/WificondControl: Scan result ready event
08-18 11:36:08.352 3396-3426/? I/zygote64: Background concurrent copying GC freed 73915(3MB) AllocSpace objects, 2(40KB) LOS objects, 42% free, 16MB/28MB, paused 656us total 202.501ms
08-18 11:36:10.379 8360-9342/? E/VideoRecPreImp2: onMaxDuration 60018
08-18 11:36:12.381 356-356/? W//system/bin/hwservicemanager: getTransportFromManifest: Cannot find entry android.hardware.graphics.mapper@2.0::IMapper in either framework or device manifest, using default transport.
08-18 11:36:12.387 10718-10718/? I/vndksupport: sphal namespace is not configured for this process. Loading /vendor/lib64/hw/gralloc.msm8992.so from the current namespace instead.

它只是说"E/VideoRecPreImp2: onMaxDuration 60018"根本没用。是否可能为O设置了时间限制属性?但我查了Android-O Preview API,没有这样的信息。有人遇到过这个问题吗?

更新

刚刚在带有7.1.1的Nexus 6和带有6.0的Nexus 5上进行了测试,在Nexus 6上它运行良好但在Nexus 5上没有。它是否与GoogleCamera相关?

0 个答案:

没有答案