summaryrefslogtreecommitdiffstats
path: root/tests/functional/com/android/documentsui/FileDeleteUiTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/com/android/documentsui/FileDeleteUiTest.java')
-rw-r--r--tests/functional/com/android/documentsui/FileDeleteUiTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/functional/com/android/documentsui/FileDeleteUiTest.java b/tests/functional/com/android/documentsui/FileDeleteUiTest.java
index f4efd15b7..d68dbd652 100644
--- a/tests/functional/com/android/documentsui/FileDeleteUiTest.java
+++ b/tests/functional/com/android/documentsui/FileDeleteUiTest.java
@@ -66,7 +66,9 @@ public class FileDeleteUiTest extends ActivityTest<FilesActivity> {
mErrorReason = intent.getStringExtra(
TestNotificationService.EXTRA_ERROR_REASON);
}
- mCountDownLatch.countDown();
+ if (mCountDownLatch != null) {
+ mCountDownLatch.countDown();
+ }
}
}
};
@@ -111,10 +113,8 @@ public class FileDeleteUiTest extends ActivityTest<FilesActivity> {
@Override
public void tearDown() throws Exception {
- mCountDownLatch.countDown();
- mCountDownLatch = null;
-
context.unregisterReceiver(mReceiver);
+ mCountDownLatch = null;
try {
bots.notifications.setNotificationAccess(getActivity(), false);
} catch (Exception e) {