Listen EXTERNAL_APPLICATIONS_AVAILABLE intent

- Some applications are installed on external storage and they
  are unavailable until exernal storage installed them
  completely. And their permission need update after becoming
  available. Thus, listen EXTERNAL_APPLICATIONS_AVAILABLE intent
  and update those package whose is listed in chaged package
  list.
- Remove user argument on buildPackageInfo() because the uid on
  ApplicationInfo is based uid.

Bug: 145234989
Test: atest FrameworksNetTests
Ignore-AOSP-First: Need cherry-pick
Change-Id: Ia11ca4a7ba6fc1b87c27c0c40e36c91d9cdb322a
2 files changed