Skip to content
Snippets Groups Projects
Commit 498c898a authored by Jakob Schneider's avatar Jakob Schneider
Browse files

Disable PIA v2 for archiving until it's supported.

Bug: 318521110
Test: ArchiveTest
Change-Id: Iba97dc8be67d9e6de2931dcddae4c3bfd666a861
parent 8fa5ce38
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,8 @@ public class UninstallerActivity extends Activity {
// be stale, if e.g. the app was uninstalled while the activity was destroyed.
super.onCreate(null);
if (usePiaV2() && !isTv()) {
// TODO(b/318521110) Enable PIA v2 for archive dialog.
if (usePiaV2() && !isTv() && !isArchiveDialog(getIntent())) {
Log.i(TAG, "Using Pia V2");
boolean returnResult = getIntent().getBooleanExtra(Intent.EXTRA_RETURN_RESULT, false);
......@@ -224,6 +225,11 @@ public class UninstallerActivity extends Activity {
showConfirmationDialog();
}
private boolean isArchiveDialog(Intent intent) {
return (intent.getIntExtra(PackageInstaller.EXTRA_DELETE_FLAGS, 0)
& PackageManager.DELETE_ARCHIVE) != 0;
}
/**
* Parses specific {@link android.content.pm.PackageManager.DeleteFlags} from {@link Intent}
* to archive an app if requested.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment