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

Merged-In: I11426a57a970905fc6985f8284d38d9808cab360
Change-Id: I11426a57a970905fc6985f8284d38d9808cab360
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
(cherry picked from commit 2c87766b13bcf6cc15201dae016bab7f544855d9)
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2 files changed