Refactor code to find overlay target am: c0957f2fa7 am: 2bc3e216c0
am: 4bfa6ad985

Change-Id: Ifd6804d616890984a9c5111c31e82162e84276af