Loading services/tests/servicestests/src/com/android/server/locksettings/BaseLockSettingsServiceTests.java +10 −4 Original line number Diff line number Diff line Loading @@ -354,15 +354,21 @@ public abstract class BaseLockSettingsServiceTests { @After public void tearDown_baseServices() throws Exception { if (mStorage != null) { mStorage.closeDatabase(); } File db = InstrumentationRegistry.getContext().getDatabasePath("locksettings.db"); assertTrue(!db.exists() || db.delete()); if (mStorage != null) { File storageDir = mStorage.mStorageDir; assertTrue(FileUtils.deleteContents(storageDir)); } if (mPasswordSlotManager != null) { mPasswordSlotManager.cleanup(); } } protected void flushHandlerTasks() { mService.mHandler.runWithScissors(() -> { }, 0 /*now*/); // Flush runnables on handler Loading services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -124,8 +124,10 @@ public class LockSettingsStorageTests { @After public void tearDown() throws Exception { if (mStorage != null) { mStorage.closeDatabase(); } } @Test public void testKeyValue_InitializeWorked() { Loading services/tests/servicestests/src/com/android/server/locksettings/PasswordSlotManagerTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -49,8 +49,10 @@ public class PasswordSlotManagerTests { @After public void tearDown() throws Exception { if (mManager != null) { mManager.cleanup(); } } @Test public void testBasicSlotUse() throws Exception { Loading services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java +6 −3 Original line number Diff line number Diff line Loading @@ -156,9 +156,12 @@ public class KeySyncTaskTest { @After public void tearDown() { if (mRecoverableKeyStoreDb != null) { mRecoverableKeyStoreDb.close(); } if (mDatabaseFile != null) { mDatabaseFile.delete(); } File file = new File(InstrumentationRegistry.getTargetContext().getFilesDir(), SNAPSHOT_TOP_LEVEL_DIRECTORY); FileUtils.deleteContentsAndDir(file); Loading services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/PlatformKeyManagerTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -117,9 +117,13 @@ public class PlatformKeyManagerTest { @After public void tearDown() { if (mRecoverableKeyStoreDb != null) { mRecoverableKeyStoreDb.close(); } if (mDatabaseFile != null) { mDatabaseFile.delete(); } } @Test public void init_createsEncryptKeyWithCorrectAlias() throws Exception { Loading Loading
services/tests/servicestests/src/com/android/server/locksettings/BaseLockSettingsServiceTests.java +10 −4 Original line number Diff line number Diff line Loading @@ -354,15 +354,21 @@ public abstract class BaseLockSettingsServiceTests { @After public void tearDown_baseServices() throws Exception { if (mStorage != null) { mStorage.closeDatabase(); } File db = InstrumentationRegistry.getContext().getDatabasePath("locksettings.db"); assertTrue(!db.exists() || db.delete()); if (mStorage != null) { File storageDir = mStorage.mStorageDir; assertTrue(FileUtils.deleteContents(storageDir)); } if (mPasswordSlotManager != null) { mPasswordSlotManager.cleanup(); } } protected void flushHandlerTasks() { mService.mHandler.runWithScissors(() -> { }, 0 /*now*/); // Flush runnables on handler Loading
services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -124,8 +124,10 @@ public class LockSettingsStorageTests { @After public void tearDown() throws Exception { if (mStorage != null) { mStorage.closeDatabase(); } } @Test public void testKeyValue_InitializeWorked() { Loading
services/tests/servicestests/src/com/android/server/locksettings/PasswordSlotManagerTests.java +3 −1 Original line number Diff line number Diff line Loading @@ -49,8 +49,10 @@ public class PasswordSlotManagerTests { @After public void tearDown() throws Exception { if (mManager != null) { mManager.cleanup(); } } @Test public void testBasicSlotUse() throws Exception { Loading
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/KeySyncTaskTest.java +6 −3 Original line number Diff line number Diff line Loading @@ -156,9 +156,12 @@ public class KeySyncTaskTest { @After public void tearDown() { if (mRecoverableKeyStoreDb != null) { mRecoverableKeyStoreDb.close(); } if (mDatabaseFile != null) { mDatabaseFile.delete(); } File file = new File(InstrumentationRegistry.getTargetContext().getFilesDir(), SNAPSHOT_TOP_LEVEL_DIRECTORY); FileUtils.deleteContentsAndDir(file); Loading
services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/PlatformKeyManagerTest.java +6 −2 Original line number Diff line number Diff line Loading @@ -117,9 +117,13 @@ public class PlatformKeyManagerTest { @After public void tearDown() { if (mRecoverableKeyStoreDb != null) { mRecoverableKeyStoreDb.close(); } if (mDatabaseFile != null) { mDatabaseFile.delete(); } } @Test public void init_createsEncryptKeyWithCorrectAlias() throws Exception { Loading