Skip to content

Instantly share code, notes, and snippets.

@Reacoder
Created July 23, 2014 14:04
Show Gist options
  • Save Reacoder/c3065e09f9dba325dc5c to your computer and use it in GitHub Desktop.
Save Reacoder/c3065e09f9dba325dc5c to your computer and use it in GitHub Desktop.
class PhotoDecodeRunnable implements Runnable {...    /*     * Defines the code to run for this task.     */    @Override    public void run() {        // Moves the current Thread into the background        android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);        ...        /*         * Stores the current Thread in the PhotoTask instance,         * so that the instance         * can interrupt the Thread.         */        mPhotoTask.setImageDecodeThread(Thread.currentThread());        ...    }...}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment