Loading services/core/java/com/android/server/pm/Installer.java +3 −13 Original line number Diff line number Diff line Loading @@ -105,11 +105,11 @@ public class Installer extends SystemService { } } public void createAppData(String uuid, String packageName, int userId, int flags, int appId, public long createAppData(String uuid, String packageName, int userId, int flags, int appId, String seInfo, int targetSdkVersion) throws InstallerException { if (!checkBeforeRemote()) return; if (!checkBeforeRemote()) return -1; try { mInstalld.createAppData(uuid, packageName, userId, flags, appId, seInfo, return mInstalld.createAppData(uuid, packageName, userId, flags, appId, seInfo, targetSdkVersion); } catch (Exception e) { throw InstallerException.from(e); Loading Loading @@ -182,16 +182,6 @@ public class Installer extends SystemService { } } public long getAppDataInode(String uuid, String packageName, int userId, int flags) throws InstallerException { if (!checkBeforeRemote()) return -1; try { return mInstalld.getAppDataInode(uuid, packageName, userId, flags); } catch (Exception e) { throw InstallerException.from(e); } } public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries) Loading services/core/java/com/android/server/pm/PackageManagerService.java +9 −16 Original line number Diff line number Diff line Loading @@ -19969,8 +19969,9 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); Preconditions.checkNotNull(app.seinfo); long ceDataInode = -1; try { mInstaller.createAppData(volumeUuid, packageName, userId, flags, ceDataInode = mInstaller.createAppData(volumeUuid, packageName, userId, flags, appId, app.seinfo, app.targetSdkVersion); } catch (InstallerException e) { if (app.isSystemApp()) { Loading @@ -19978,7 +19979,7 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); + ", but trying to recover: " + e); destroyAppDataLeafLIF(pkg, userId, flags); try { mInstaller.createAppData(volumeUuid, packageName, userId, flags, ceDataInode = mInstaller.createAppData(volumeUuid, packageName, userId, flags, appId, app.seinfo, app.targetSdkVersion); logCriticalInfo(Log.DEBUG, "Recovery succeeded!"); } catch (InstallerException e2) { Loading @@ -19989,22 +19990,14 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); } } if ((flags & StorageManager.FLAG_STORAGE_CE) != 0) { try { // CE storage is unlocked right now, so read out the inode and // remember for use later when it's locked if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 && ceDataInode != -1) { // TODO: mark this structure as dirty so we persist it! final long ceDataInode = mInstaller.getAppDataInode(volumeUuid, packageName, userId, StorageManager.FLAG_STORAGE_CE); synchronized (mPackages) { final PackageSetting ps = mSettings.mPackages.get(packageName); if (ps != null) { ps.setCeDataInode(ceDataInode, userId); } } } catch (InstallerException e) { Slog.e(TAG, "Failed to find inode for " + packageName + ": " + e); } } prepareAppDataContentsLeafLIF(pkg, userId, flags); Loading
services/core/java/com/android/server/pm/Installer.java +3 −13 Original line number Diff line number Diff line Loading @@ -105,11 +105,11 @@ public class Installer extends SystemService { } } public void createAppData(String uuid, String packageName, int userId, int flags, int appId, public long createAppData(String uuid, String packageName, int userId, int flags, int appId, String seInfo, int targetSdkVersion) throws InstallerException { if (!checkBeforeRemote()) return; if (!checkBeforeRemote()) return -1; try { mInstalld.createAppData(uuid, packageName, userId, flags, appId, seInfo, return mInstalld.createAppData(uuid, packageName, userId, flags, appId, seInfo, targetSdkVersion); } catch (Exception e) { throw InstallerException.from(e); Loading Loading @@ -182,16 +182,6 @@ public class Installer extends SystemService { } } public long getAppDataInode(String uuid, String packageName, int userId, int flags) throws InstallerException { if (!checkBeforeRemote()) return -1; try { return mInstalld.getAppDataInode(uuid, packageName, userId, flags); } catch (Exception e) { throw InstallerException.from(e); } } public void dexopt(String apkPath, int uid, @Nullable String pkgName, String instructionSet, int dexoptNeeded, @Nullable String outputPath, int dexFlags, String compilerFilter, @Nullable String volumeUuid, @Nullable String sharedLibraries) Loading
services/core/java/com/android/server/pm/PackageManagerService.java +9 −16 Original line number Diff line number Diff line Loading @@ -19969,8 +19969,9 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); Preconditions.checkNotNull(app.seinfo); long ceDataInode = -1; try { mInstaller.createAppData(volumeUuid, packageName, userId, flags, ceDataInode = mInstaller.createAppData(volumeUuid, packageName, userId, flags, appId, app.seinfo, app.targetSdkVersion); } catch (InstallerException e) { if (app.isSystemApp()) { Loading @@ -19978,7 +19979,7 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); + ", but trying to recover: " + e); destroyAppDataLeafLIF(pkg, userId, flags); try { mInstaller.createAppData(volumeUuid, packageName, userId, flags, ceDataInode = mInstaller.createAppData(volumeUuid, packageName, userId, flags, appId, app.seinfo, app.targetSdkVersion); logCriticalInfo(Log.DEBUG, "Recovery succeeded!"); } catch (InstallerException e2) { Loading @@ -19989,22 +19990,14 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName()); } } if ((flags & StorageManager.FLAG_STORAGE_CE) != 0) { try { // CE storage is unlocked right now, so read out the inode and // remember for use later when it's locked if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 && ceDataInode != -1) { // TODO: mark this structure as dirty so we persist it! final long ceDataInode = mInstaller.getAppDataInode(volumeUuid, packageName, userId, StorageManager.FLAG_STORAGE_CE); synchronized (mPackages) { final PackageSetting ps = mSettings.mPackages.get(packageName); if (ps != null) { ps.setCeDataInode(ceDataInode, userId); } } } catch (InstallerException e) { Slog.e(TAG, "Failed to find inode for " + packageName + ": " + e); } } prepareAppDataContentsLeafLIF(pkg, userId, flags);