Refactor: Add permission checks to Unarchive activities

It adds permission checks for REQUEST_INSTALL_PACKAGES or INSTALL_PACKAGES to both UnarchiveActivity and UnarchiveErrorActivity at the start of their onCreate methods. The launch of the v2 UnarchiveLaunch activity is now gated by these permission checks.

Bug: 489225275
Flag: android.content.pm.use_pia_v2
Test: manually tested
(cherry picked from commit c3f52bcbb62f8af7d3a2aefb617696579cbe68f2)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:36d7d23b9d730f5ac76b23234f239d2e84535b75
Merged-In: I8f1265acae162cd752e76259f4ffaf39ab76b7e5
Change-Id: I8f1265acae162cd752e76259f4ffaf39ab76b7e5
3 files changed