From d3e47f8133da7e64b6d7534a8c04242e1f83d1e6 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 16 Apr 2016 14:40:10 +0200 Subject: [PATCH] execute finish() on current thread --- .../gallery/activities/PhotosActivity.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/PhotosActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/PhotosActivity.java index ef69a823a..d3942e91a 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/PhotosActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/PhotosActivity.java @@ -270,13 +270,9 @@ public class PhotosActivity extends AppCompatActivity @Override public void onScanCompleted(String path, Uri uri) { - runOnUiThread(new Runnable() { - @Override - public void run() { - if (photos.isEmpty()) - finish(); - } - }); + if (photos.isEmpty()) { + finish(); + } } @Override