Use the new gsid interface

This CL supports gsid refactoring aosp/1148898.

Test: adb shell am start-activity \
                -n com.android.dynsystem/com.android.dynsystem.VerificationActivity \
                -a android.os.image.action.START_INSTALL \
                -d file:///storage/emulated/0/Download/system.raw.gz \
                --el KEY_SYSTEM_SIZE $(du -b system.raw|cut -f1) \
                --el KEY_USERDATA_SIZE 8589934592
Change-Id: I0209a1b0750e96623f90f134bb18d37254249fbd
This commit is contained in:
Howard Chen
2019-10-04 18:15:14 +08:00
parent c2348fa906
commit 6ea5beddd9
5 changed files with 73 additions and 19 deletions

View File

@@ -102,9 +102,10 @@ class InstallationAsyncTask extends AsyncTask<String, Long, Throwable> {
Thread thread =
new Thread(
() -> {
mDynSystem.startInstallation("userdata", mUserdataSize, false);
mDynSystem.startInstallation();
mDynSystem.createPartition("userdata", mUserdataSize, false);
mInstallationSession =
mDynSystem.startInstallation("system", mSystemSize, true);
mDynSystem.createPartition("system", mSystemSize, true);
});
thread.start();
@@ -157,6 +158,7 @@ class InstallationAsyncTask extends AsyncTask<String, Long, Throwable> {
reportedInstalledSize = installedSize;
}
}
mDynSystem.finishInstallation();
return null;
} catch (Exception e) {