diff options
| author | Howard Chen <howardsoc@google.com> | 2019-08-13 17:01:53 +0800 |
|---|---|---|
| committer | Howard Chen <howardsoc@google.com> | 2019-10-24 21:34:43 +0000 |
| commit | e176c56f6eef2ddbb997864da51e00706e4f23e4 (patch) | |
| tree | fd6796705a1d28fd90758709478962dd390cd094 /core/java | |
| parent | 577e3114da0684f3f5eeecb77ec4f0e95ff5b0c1 (diff) | |
Use new GsiInstallParams struct
Bug: 139402092
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: I62330ccbe3c863850b545db5e911196d22f518d7
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/image/DynamicSystemManager.java | 9 | ||||
| -rw-r--r-- | core/java/android/os/image/IDynamicSystemService.aidl | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/core/java/android/os/image/DynamicSystemManager.java b/core/java/android/os/image/DynamicSystemManager.java index 77fd946f7ccb..0e00d5e9b7bf 100644 --- a/core/java/android/os/image/DynamicSystemManager.java +++ b/core/java/android/os/image/DynamicSystemManager.java @@ -104,16 +104,17 @@ public class DynamicSystemManager { * Start DynamicSystem installation. This call may take an unbounded amount of time. The caller * may use another thread to call the getStartProgress() to get the progress. * - * @param systemSize system size in bytes - * @param userdataSize userdata size in bytes + * @param name The DSU partition name + * @param size Size of the DSU image in bytes + * @param readOnly True if the partition is read only, e.g. system. * @return {@code true} if the call succeeds. {@code false} either the device does not contain * enough space or a DynamicSystem is currently in use where the {@link #isInUse} would be * true. */ @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) - public Session startInstallation(long systemSize, long userdataSize) { + public Session startInstallation(String name, long size, boolean readOnly) { try { - if (mService.startInstallation(systemSize, userdataSize)) { + if (mService.startInstallation(name, size, readOnly)) { return new Session(); } else { return null; diff --git a/core/java/android/os/image/IDynamicSystemService.aidl b/core/java/android/os/image/IDynamicSystemService.aidl index a6de170b5ce5..75f67854743f 100644 --- a/core/java/android/os/image/IDynamicSystemService.aidl +++ b/core/java/android/os/image/IDynamicSystemService.aidl @@ -24,11 +24,12 @@ interface IDynamicSystemService * Start DynamicSystem installation. This call may take 60~90 seconds. The caller * may use another thread to call the getStartProgress() to get the progress. * - * @param systemSize system size in bytes - * @param userdataSize userdata size in bytes + * @param name The DSU partition name + * @param size Size of the DSU image in bytes + * @param readOnly True if this partition is readOnly * @return true if the call succeeds */ - boolean startInstallation(long systemSize, long userdataSize); + boolean startInstallation(@utf8InCpp String name, long size, boolean readOnly); /** * Query the progress of the current installation operation. This can be called while |
