Added condition guard on command 'adb shell screenrcord'.

 - record file is empty when users execute screenrecord while the display off.
 - added condition guard for preventing to start screenrecord when displayState.layerstack is invalid.

Test: run cmd 'adb shell screenrecord' while display is off
Bug: 264584094
Change-Id: Ie9f809d4fdb7599f5ca424f7ccdfaec42f9cda89
1 file changed