apexd: don't mount a package if its higher version is already mounted
A very basic greedy implementation that skips mounting an apex if there
is already a higher version mounted.
As a side effect, this change also enforces that we will never downgrade
an apex below the version that is in /system, which IIRC is a desired
behaviour.
Note that in case when apex in /system has higher version that the one
in /data, apexd will still mount that package twice. Given that having
an apex in /data that has lower version than /system one should be a
very race scenario, this simple solution should work just fine.
Test: put higher version of test apex into /data.
Verified /system version wasn't mounted.
Bug: 119911415
Fixes: 119911415
Change-Id: If451e0f0b17a06d0b5a41e1bb95cee737600d6b8
1 file changed