testFlashTurnOff: take into account flash states for LEGACY devices.

For LEGACY devices:

Using android.control.aeMode == ON_ALWAYS_FLASH will always return FIRED.
Using android.flash.mode == TORCH will always return FIRED.
In all other conditions the state will not be available on LEGACY devices (i.e. it will be null).

Bug:142726828
Bug:143192067

Test: Test still passes on non LEGACY devices
Test: Vendor testing

Change-Id: I11426a57a970905fc6985f8284d38d9808cab360
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2 files changed