Media scan behavior re-coding and clean-up

Change-Id: I0d355379b49ad064a10ed3b6aa77a16f0ebad304