Invoke BLKSECDISCARD to securely delete sensitive data
Bug: 34600579
Test: manual - change device lock under synthetic password, verify
old data on disk is erased.
Change-Id: I247bd1f095dd27335e671981f9e2d77e149af84f
This commit is contained in:
@@ -295,4 +295,5 @@ interface IStorageManager {
|
||||
long getCacheSizeBytes(String volumeUuid, int uid) = 76;
|
||||
long getAllocatableBytes(String volumeUuid, int flags) = 77;
|
||||
void allocateBytes(String volumeUuid, long bytes, int flags) = 78;
|
||||
void secdiscard(in String path) = 79;
|
||||
}
|
||||
|
||||
@@ -1251,6 +1251,15 @@ public class StorageManager {
|
||||
}
|
||||
}
|
||||
|
||||
/** {@hide} */
|
||||
public void secdiscard(String path) {
|
||||
try {
|
||||
mStorageManager.secdiscard(path);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/** {@hide} */
|
||||
public static boolean isUserKeyUnlocked(int userId) {
|
||||
if (sStorageManager == null) {
|
||||
|
||||
Reference in New Issue
Block a user