Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94322d01 authored by Song Chun Fan's avatar Song Chun Fan Committed by Android (Google) Code Review
Browse files

Merge "Disable PIA v2 for archiving until it's supported." into main

parents 5d03dab2 498c898a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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.