Loading services/core/java/com/android/server/pm/ApexManager.java +8 −7 Original line number Diff line number Diff line Loading @@ -321,9 +321,9 @@ public abstract class ApexManager { * Copies the CE apex data directory for the given {@code userId} to a backup location, for use * in case of rollback. * * @return long inode for the snapshot directory if the snapshot was successful, or -1 if not * @return boolean true if the snapshot was successful */ public abstract long snapshotCeData(int userId, int rollbackId, String apexPackageName); public abstract boolean snapshotCeData(int userId, int rollbackId, String apexPackageName); /** * Restores the snapshot of the CE apex data directory for the given {@code userId}. Loading Loading @@ -817,7 +817,7 @@ public abstract class ApexManager { } @Override public long snapshotCeData(int userId, int rollbackId, String apexPackageName) { public boolean snapshotCeData(int userId, int rollbackId, String apexPackageName) { String apexModuleName; synchronized (mLock) { Preconditions.checkState(mPackageNameToApexModuleName != null, Loading @@ -826,13 +826,14 @@ public abstract class ApexManager { } if (apexModuleName == null) { Slog.e(TAG, "Invalid apex package name: " + apexPackageName); return -1; return false; } try { return waitForApexService().snapshotCeData(userId, rollbackId, apexModuleName); waitForApexService().snapshotCeData(userId, rollbackId, apexModuleName); return true; } catch (Exception e) { Slog.e(TAG, e.getMessage(), e); return -1; return false; } } Loading Loading @@ -1106,7 +1107,7 @@ public abstract class ApexManager { } @Override public long snapshotCeData(int userId, int rollbackId, String apexPackageName) { public boolean snapshotCeData(int userId, int rollbackId, String apexPackageName) { throw new UnsupportedOperationException(); } Loading services/core/java/com/android/server/rollback/AppDataRollbackHelper.java +1 −4 Original line number Diff line number Diff line Loading @@ -127,11 +127,8 @@ public class AppDataRollbackHelper { if (packageRollbackInfo.isApex()) { // For APEX, only snapshot CE here if ((flags & Installer.FLAG_STORAGE_CE) != 0) { long ceSnapshotInode = mApexManager.snapshotCeData( return mApexManager.snapshotCeData( userId, rollbackId, packageRollbackInfo.getPackageName()); if (ceSnapshotInode <= 0) { return false; } } } else { // APK Loading Loading
services/core/java/com/android/server/pm/ApexManager.java +8 −7 Original line number Diff line number Diff line Loading @@ -321,9 +321,9 @@ public abstract class ApexManager { * Copies the CE apex data directory for the given {@code userId} to a backup location, for use * in case of rollback. * * @return long inode for the snapshot directory if the snapshot was successful, or -1 if not * @return boolean true if the snapshot was successful */ public abstract long snapshotCeData(int userId, int rollbackId, String apexPackageName); public abstract boolean snapshotCeData(int userId, int rollbackId, String apexPackageName); /** * Restores the snapshot of the CE apex data directory for the given {@code userId}. Loading Loading @@ -817,7 +817,7 @@ public abstract class ApexManager { } @Override public long snapshotCeData(int userId, int rollbackId, String apexPackageName) { public boolean snapshotCeData(int userId, int rollbackId, String apexPackageName) { String apexModuleName; synchronized (mLock) { Preconditions.checkState(mPackageNameToApexModuleName != null, Loading @@ -826,13 +826,14 @@ public abstract class ApexManager { } if (apexModuleName == null) { Slog.e(TAG, "Invalid apex package name: " + apexPackageName); return -1; return false; } try { return waitForApexService().snapshotCeData(userId, rollbackId, apexModuleName); waitForApexService().snapshotCeData(userId, rollbackId, apexModuleName); return true; } catch (Exception e) { Slog.e(TAG, e.getMessage(), e); return -1; return false; } } Loading Loading @@ -1106,7 +1107,7 @@ public abstract class ApexManager { } @Override public long snapshotCeData(int userId, int rollbackId, String apexPackageName) { public boolean snapshotCeData(int userId, int rollbackId, String apexPackageName) { throw new UnsupportedOperationException(); } Loading
services/core/java/com/android/server/rollback/AppDataRollbackHelper.java +1 −4 Original line number Diff line number Diff line Loading @@ -127,11 +127,8 @@ public class AppDataRollbackHelper { if (packageRollbackInfo.isApex()) { // For APEX, only snapshot CE here if ((flags & Installer.FLAG_STORAGE_CE) != 0) { long ceSnapshotInode = mApexManager.snapshotCeData( return mApexManager.snapshotCeData( userId, rollbackId, packageRollbackInfo.getPackageName()); if (ceSnapshotInode <= 0) { return false; } } } else { // APK Loading