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

Commit 59d40857 authored by Yo Chiang's avatar Yo Chiang Committed by Gerrit Code Review
Browse files

Merge "Add DSU default userdata partition size"

parents 8a656211 f41e1454
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -96,9 +96,6 @@ public class DynamicSystemClient {

    private static final String TAG = "DynSystemClient";

    private static final long DEFAULT_USERDATA_SIZE = (10L << 30);


    /** Listener for installation status updates. */
    public interface OnStatusChangedListener {
        /**
@@ -386,7 +383,7 @@ public class DynamicSystemClient {
    @SystemApi
    @TestApi
    public void start(@NonNull Uri systemUrl, @BytesLong long systemSize) {
        start(systemUrl, systemSize, DEFAULT_USERDATA_SIZE);
        start(systemUrl, systemSize, 0 /* Use the default userdata size */);
    }

    /**
+7 −0
Original line number Diff line number Diff line
@@ -82,6 +82,9 @@ public class DynamicSystemInstallationService extends Service
    static final String DEFAULT_DSU_SLOT = "dsu";
    static final String KEY_PUBKEY = "KEY_PUBKEY";

    // Default userdata partition size is 2GiB.
    private static final long DEFAULT_USERDATA_SIZE = 2L << 30;

    /*
     * Intent actions
     */
@@ -270,6 +273,10 @@ public class DynamicSystemInstallationService extends Service
        String dsuSlot = intent.getStringExtra(KEY_DSU_SLOT);
        String publicKey = intent.getStringExtra(KEY_PUBKEY);

        if (userdataSize == 0) {
            userdataSize = DEFAULT_USERDATA_SIZE;
        }

        if (TextUtils.isEmpty(dsuSlot)) {
            dsuSlot = DEFAULT_DSU_SLOT;
        }