Resets system flags when updating PackageSettings
In the case that we're updating a system app, we will in-place
update the PackageSetting object. This works for most fields but
breaks when updating flag fields as we're executing a binary or
on the existing flags, thus not unsetting bits when we should be.
This change resets all system-related flags before setting the new
flag values.
Test: manual - move app from priv-app to app, install update,
verify that app does not receive priv flag
Fixes: 75993951
Fixes: 78265024
Change-Id: I3c88a3583ddb85c4b6b0e3b4d7b6d1d0db93ac17
1 file changed