Change video battery stats to better track actual use
Reporting video on upon first queue/dequeue buffer activity, off after a period of inactivity (3 sec currently). bug: 138381810 test: Manual testing for now; unit tests will come after. With BatteryStatService instrumented to print out noteVideo*: Test case #1: Camera recording (using GCA): Camera creates encoder immediately when Video tab is entered, but recording won't start until button is pressed. After recording is stopped, a new encoder is again created to prepare for next session. So under old scheme, video is on as soon as we're in Video tab, and off/on even pairs are seen when video is stopped. Video stats is basically always On when we're in video tab. With this CL one should see: - There shouldn't be videoOn when Video tab is first entered - Start recording and there should be a videoOn. - Stop recording and there should be a videoOff, AND videoOn shouldn't immediately follow. - Kill camera app during active recording, video should be restored to Off. Test case #2: Playback of video clips in Photos with pause With old scheme pausing state will be videoOn because codec instance is still there. With new scheme, videoOff should come after video is paused for 3 sec, and video On should come again when video is resumed. Change-Id: Ifa8aa5d8c2c95fa25393fcb936e6e54578716783
Loading
Please register or sign in to comment