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

Commit c61977a5 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Reset progress bar when restarting file commit

Test: Rotated device while installing
Change-Id: I2d0923aab0c8d74501cec60db2cc806767a2201f
parent 6513cc82
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.packageinstaller;

import static android.content.pm.PackageInstaller.SessionParams.UID_UNKNOWN;

import android.annotation.Nullable;
import android.app.Activity;
import android.app.PendingIntent;
@@ -33,6 +35,7 @@ import android.os.Bundle;
import android.util.Log;
import android.widget.Button;
import android.widget.ProgressBar;

import com.android.internal.content.PackageHelper;

import java.io.File;
@@ -41,8 +44,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import static android.content.pm.PackageInstaller.SessionParams.UID_UNKNOWN;

/**
 * Send package to the package manager and handle results from package manager. Once the
 * installation succeeds, start {@link InstallSuccess} or {@link InstallFailed}.
@@ -335,6 +336,8 @@ public class InstallInstalling extends Activity {
                return null;
            }

            session.setStagingProgress(0);

            try {
                File file = new File(mPackageURI.getPath());