summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-30 16:06:07 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-07-30 16:06:07 -0700
commit121b2526cac5576fa7e2096f9254e031b3f8175d (patch)
treee36091ffb098fca4964f7bd4bff3d3acac344004 /src
parenteb7c347833d291aca93e75c2aa8c71d388c558cf (diff)
parent3056316d205928434c7aa57a1ce5e8c6f3a5984f (diff)
downloadpackages_apps_LegacyCamera-121b2526cac5576fa7e2096f9254e031b3f8175d.zip
packages_apps_LegacyCamera-121b2526cac5576fa7e2096f9254e031b3f8175d.tar.gz
packages_apps_LegacyCamera-121b2526cac5576fa7e2096f9254e031b3f8175d.tar.bz2
am 3056316d: Merge change 9141 into donut
Merge commit '3056316d205928434c7aa57a1ce5e8c6f3a5984f' * commit '3056316d205928434c7aa57a1ce5e8c6f3a5984f': Lower the priority of the ImageGetter thread to avoid competing with
Diffstat (limited to 'src')
-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) {