summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/camera/ImageGetter.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/camera/ImageGetter.java b/src/com/android/camera/ImageGetter.java
index 5b2afe4..ecbc66a 100644
--- a/src/com/android/camera/ImageGetter.java
+++ b/src/com/android/camera/ImageGetter.java
@@ -23,6 +23,7 @@ import com.android.camera.gallery.VideoObject;
import android.graphics.Bitmap;
import android.os.Handler;
import android.os.Message;
+import android.os.Process;
/*
* Here's the loading strategy. For any given image, load the thumbnail
@@ -122,6 +123,10 @@ class ImageGetter {
}
public void run() {
+ // Lower the priority of this thread to avoid competing with
+ // the UI thread.
+ Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
+
while (true) {
synchronized (ImageGetter.this) {
while (mCancel || mDone || mCurrentPosition == -1) {