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

Skip to content
Commit 0d45269c authored by Joël Stemmer's avatar Joël Stemmer
Browse files

Correctly report package index in RestoreObserver#onUpdate calls

PerformUnifiedRestoreTask uses the `RestoreObserver` to report its
progress as it restores packages. The `onUpdate` method takes two
parameters: the package index and the package name.
PerformUnifiedRestoreTask keeps track of the package index by counting
the number of packages being restored. The count was only incremented
after successfully restoring a key-value app. This meant that the wrong
package index was reported when a key-value app was not restored (e.g.
when it was skipped, or the restore failed), or when a non-key-value app
was restored.

This change fixes that by incrementing the index for every package and
before the restore starts.

Bug: 291249666
Test: Manually performed a system restore (see linked bug for details)
Change-Id: I3bdb8efb3c7deab47bf801e10c42ef2e8fd29182
parent ca2f5af0
Loading
Loading
Loading
Loading
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