OMS: try harder not to update assets if nothing changed

To ensure framework overlays [target="android"] are applied correctly
when an app is installed, OMSImpl.updateAllOverlaysForTarget checks for
the existance of enabled framework overlays. But this check leads to
unnecessary asset updates [defined as no change to the set of overlay
paths] if the OMS was triggered by e.g. the package manager enabling a
component in the android package. On the other hand, when the target
package is "android", the other checks in
OMSImpl.updateAllOverlaysForTarget are sufficient to determine if an
asset update should be scheduled.

Exclude the enabled framework overlays check if (and only if) the target
package happens to be "android".

Test: atest OverlayHostTests OverlayDeviceTests
Change-Id: I7334cbda5686587c0db97c458c09c3656b7eacc4
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
1 file changed