Improve installer attribution in App Info.

When an app is installed by the Package Installer app on behalf of
another app (eg. a browser, file manager or app store that opens an APK
via an activity start), it is preferable to attribute the install to the
originating app rather than the 'Package Installer' itself.

Since Android R, package manager keeps track of the necessary install
source information which enables this more precise attribution. If an
originating package is recorded and was set by a system app, we use this
as the user-visible 'installer'.

Bug: 182365285
Test: make RunSettingsRoboTests
Change-Id: Ibb329d6fe8f0fa2ad51d3530a219b2d8b8d6c17b
4 files changed