Loading core/java/android/os/storage/IStorageManager.aidl +2 −0 Original line number Original line Diff line number Diff line Loading @@ -191,4 +191,6 @@ interface IStorageManager { String translateAppToSystem(String path, int pid, int uid) = 81; String translateAppToSystem(String path, int pid, int uid) = 81; String translateSystemToApp(String path, int pid, int uid) = 82; String translateSystemToApp(String path, int pid, int uid) = 82; void commitChanges() = 83; void commitChanges() = 83; boolean supportsCheckpoint() = 84; void startCheckpoint(int numTries) = 85; } } services/core/java/com/android/server/StorageManagerService.java +32 −0 Original line number Original line Diff line number Diff line Loading @@ -2716,6 +2716,38 @@ class StorageManagerService extends IStorageManager.Stub } } } } /** * Check whether the device supports filesystem checkpointing. * * @return true if the device supports filesystem checkpointing, false otherwise. */ @Override public boolean supportsCheckpoint() throws RemoteException { // Only the system process is permitted to start checkpoints if (Binder.getCallingUid() != android.os.Process.SYSTEM_UID) { throw new SecurityException("no permission to check filesystem checkpoint support"); } return mVold.supportsCheckpoint(); } /** * Signal that checkpointing partitions should start a checkpoint on the next boot. * * @param numTries Number of times to try booting in checkpoint mode, before we will boot * non-checkpoint mode and commit all changes immediately. Callers are * responsible for ensuring that boot is safe (eg, by rolling back updates). */ @Override public void startCheckpoint(int numTries) throws RemoteException { // Only the system process is permitted to start checkpoints if (Binder.getCallingUid() != android.os.Process.SYSTEM_UID) { throw new SecurityException("no permission to start filesystem checkpoint"); } mVold.startCheckpoint(numTries); } /** /** * Signal that checkpointing partitions should commit changes * Signal that checkpointing partitions should commit changes */ */ Loading Loading
core/java/android/os/storage/IStorageManager.aidl +2 −0 Original line number Original line Diff line number Diff line Loading @@ -191,4 +191,6 @@ interface IStorageManager { String translateAppToSystem(String path, int pid, int uid) = 81; String translateAppToSystem(String path, int pid, int uid) = 81; String translateSystemToApp(String path, int pid, int uid) = 82; String translateSystemToApp(String path, int pid, int uid) = 82; void commitChanges() = 83; void commitChanges() = 83; boolean supportsCheckpoint() = 84; void startCheckpoint(int numTries) = 85; } }
services/core/java/com/android/server/StorageManagerService.java +32 −0 Original line number Original line Diff line number Diff line Loading @@ -2716,6 +2716,38 @@ class StorageManagerService extends IStorageManager.Stub } } } } /** * Check whether the device supports filesystem checkpointing. * * @return true if the device supports filesystem checkpointing, false otherwise. */ @Override public boolean supportsCheckpoint() throws RemoteException { // Only the system process is permitted to start checkpoints if (Binder.getCallingUid() != android.os.Process.SYSTEM_UID) { throw new SecurityException("no permission to check filesystem checkpoint support"); } return mVold.supportsCheckpoint(); } /** * Signal that checkpointing partitions should start a checkpoint on the next boot. * * @param numTries Number of times to try booting in checkpoint mode, before we will boot * non-checkpoint mode and commit all changes immediately. Callers are * responsible for ensuring that boot is safe (eg, by rolling back updates). */ @Override public void startCheckpoint(int numTries) throws RemoteException { // Only the system process is permitted to start checkpoints if (Binder.getCallingUid() != android.os.Process.SYSTEM_UID) { throw new SecurityException("no permission to start filesystem checkpoint"); } mVold.startCheckpoint(numTries); } /** /** * Signal that checkpointing partitions should commit changes * Signal that checkpointing partitions should commit changes */ */ Loading