Use android.os.Process.THREAD_PRIORITY_* symbols
As part of latency project, searching for and replacing hard-coded thread priorities by symbols. Change-Id: I113c07af95f8808b889b665e884b6b41d3440f8d
This commit is contained in:
@@ -22,6 +22,7 @@ import android.content.Context;
|
||||
import android.content.res.AssetManager;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.Process;
|
||||
import android.util.Log;
|
||||
import android.view.Surface;
|
||||
|
||||
@@ -683,9 +684,8 @@ public class RenderScript {
|
||||
* processes.
|
||||
*/
|
||||
public enum Priority {
|
||||
// Remap these numbers to opaque...
|
||||
LOW (5), //ANDROID_PRIORITY_BACKGROUND + 5
|
||||
NORMAL (-4); //ANDROID_PRIORITY_DISPLAY
|
||||
LOW (Process.THREAD_PRIORITY_BACKGROUND + (5 * Process.THREAD_PRIORITY_LESS_FAVORABLE)),
|
||||
NORMAL (Process.THREAD_PRIORITY_DISPLAY);
|
||||
|
||||
int mID;
|
||||
Priority(int id) {
|
||||
|
||||
Reference in New Issue
Block a user