P2P App Sharing: Add Shareability Cache

This update allows Launcher to check with an external API to determine whether apps
are shareable before displaying the Share App button. To prevent
extraneous calls to the API, the retrieved shareability data
are cached. A job is scheduled to update this cache once a week.

This feature can be toggled with the ENABLE_SHAREABILITY_CHECK flag in
AppSharing.java. It is currently disabled, as the Play API has only been
partially rolled out.

More details on the design are available at go/app-shareability-cache-design

Bug: 168831749
Test: manual (local Wembley device)
Test: m -j RunLauncherGoGoogleRoboTests ROBOTEST_FILTER="AppShareabilityManagerTest|AppSharingTest"
Change-Id: I971a3776e09b6842dedf315ec592317050dd6790
12 files changed