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);
+330 −191

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -3603,8 +3603,8 @@ final class Settings {
        return pkg.getCurrentEnabledStateLPr(classNameStr, userId);
    }

    boolean setPackageStoppedStateLPw(String packageName, boolean stopped,
            boolean allowedByPermission, int uid, int userId) {
    boolean setPackageStoppedStateLPw(PackageManagerService yucky, String packageName,
            boolean stopped, boolean allowedByPermission, int uid, int userId) {
        int appId = UserHandle.getAppId(uid);
        final PackageSetting pkgSetting = mPackages.get(packageName);
        if (pkgSetting == null) {
@@ -3628,7 +3628,7 @@ final class Settings {
            // pkgSetting.pkg.mSetStopped = stopped;
            if (pkgSetting.getNotLaunched(userId)) {
                if (pkgSetting.installerPackageName != null) {
                    PackageManagerService.sendPackageBroadcast(Intent.ACTION_PACKAGE_FIRST_LAUNCH,
                    yucky.sendPackageBroadcast(Intent.ACTION_PACKAGE_FIRST_LAUNCH,
                            pkgSetting.name, null,
                            pkgSetting.installerPackageName, null, new int[] {userId});
                }