diff options
Diffstat (limited to 'packages/DynamicSystemInstallationService')
-rw-r--r-- | packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java index f8952ace3cb3..4d31ce97e8b7 100644 --- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java +++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java @@ -334,6 +334,11 @@ class InstallationAsyncTask extends AsyncTask<String, InstallationAsyncTask.Prog throw new IOException( "Failed to start installation with requested size: " + mUserdataSize); } + // Reset installation session and verify that installation completes successfully. + mInstallationSession = null; + if (!mDynSystem.closePartition()) { + throw new IOException("Failed to complete partition installation: userdata"); + } } private void installImages() @@ -503,6 +508,12 @@ class InstallationAsyncTask extends AsyncTask<String, InstallationAsyncTask.Prog imageValidationThrowOrWarning(new KeyRevokedException(publicKey)); } } + + // Reset installation session and verify that installation completes successfully. + mInstallationSession = null; + if (!mDynSystem.closePartition()) { + throw new IOException("Failed to complete partition installation: " + partitionName); + } } private static String toHexString(byte[] bytes) { |