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

Commit 3b342179 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am a320505f: Merge "Move both app code and data together." into mnc-dev

* commit 'a320505f':
  Move both app code and data together.
parents 7e22cc99 a320505f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.app.admin.DevicePolicyManager;
import android.content.Context;
import android.os.storage.StorageManager;
import android.os.storage.StorageVolume;
import android.text.TextUtils;
import android.util.Log;

import java.io.File;
@@ -242,6 +243,15 @@ public class Environment {
        return DATA_DIRECTORY;
    }

    /** {@hide} */
    public static File getDataAppDirectory(String volumeUuid) {
        if (TextUtils.isEmpty(volumeUuid)) {
            return new File("/data/app");
        } else {
            return new File("/mnt/expand/" + volumeUuid + "/app");
        }
    }

    /**
     * Return the primary external storage directory. This directory may not
     * currently be accessible if it has been mounted by the user on their
+5 −3
Original line number Diff line number Diff line
@@ -264,9 +264,9 @@ public final class Installer extends SystemService {
        return mInstaller.execute(builder.toString());
    }

    public int moveUserDataDirs(String fromUuid, String toUuid, String packageName, int appId,
            String seinfo) {
        StringBuilder builder = new StringBuilder("mvuserdata");
    public int moveCompleteApp(String fromUuid, String toUuid, String packageName,
            String dataAppName, int appId, String seinfo) {
        StringBuilder builder = new StringBuilder("mvcompleteapp");
        builder.append(' ');
        builder.append(escapeNull(fromUuid));
        builder.append(' ');
@@ -274,6 +274,8 @@ public final class Installer extends SystemService {
        builder.append(' ');
        builder.append(packageName);
        builder.append(' ');
        builder.append(dataAppName);
        builder.append(' ');
        builder.append(appId);
        builder.append(' ');
        builder.append(seinfo);