Set FLAG_UPDATED_SYSTEM_APP properly for APEX packages

An APEX package is either located in a built-in directory, in which case
it is a factory package and should be considered a system app, or it has
been updated and no longer a factory package and should be considered as
an updated-system-app.

Bug: 175872729
Test: atest StagedInstallTest#testApexSetsUpdatedSystemAppFlag
Change-Id: I9f7d7faa3a7ed6402512dc83faa112dbe2438976
1 file changed