use FgThread.class instead of UiThread.class for lock object
As is seen, UiThread/IoThread/DisplayThread/BackgroundThread all use itself class for lock object. And for FgThread, FgThread.class should be used for lock object Test: null Change-Id: I56e46fab33ff78d26b3e5197500764c763dba042 Signed-off-by: yangbingqian <yangbingqian@xiaomi.com>
This commit is contained in:
@@ -45,14 +45,14 @@ public final class FgThread extends ServiceThread {
|
||||
}
|
||||
|
||||
public static FgThread get() {
|
||||
synchronized (UiThread.class) {
|
||||
synchronized (FgThread.class) {
|
||||
ensureThreadLocked();
|
||||
return sInstance;
|
||||
}
|
||||
}
|
||||
|
||||
public static Handler getHandler() {
|
||||
synchronized (UiThread.class) {
|
||||
synchronized (FgThread.class) {
|
||||
ensureThreadLocked();
|
||||
return sHandler;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user