Move setting of 'fp2.cam.any.changed' property outside loop

Camera resolution preferences are wiped if a different camera module is
detected compared to previous boot. init.fp.camera_preference_wipe.sh
reads 'fp2.cam.(main|front).changed' properties and removes resolution
settings for the ones that are changed.

A race occurs because the service to remove resolution settings is
started when 'fp2.cam.any.changed' is set to 1 inside the loop that also
sets 'fp2.cam.(main|front).changed' sequentially. The service may have
been started and run before 'fp2.cam.front.changed' is set if both
sensors have changed.

This change moves setting 'fp2.cam.any.changes' outside of the loop to
prevent this race.

FPIIM-2228

Change-Id: Ie37bab92df263c089c821bccf2da61366a7ff30e
1 file changed