summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/util/MainThreadInitializedObject.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/util/MainThreadInitializedObject.java')
-rw-r--r--src/com/android/launcher3/util/MainThreadInitializedObject.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/util/MainThreadInitializedObject.java b/src/com/android/launcher3/util/MainThreadInitializedObject.java
index e185a3199..fe9c2c468 100644
--- a/src/com/android/launcher3/util/MainThreadInitializedObject.java
+++ b/src/com/android/launcher3/util/MainThreadInitializedObject.java
@@ -15,12 +15,13 @@
*/
package com.android.launcher3.util;
+import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
+
import android.content.Context;
import android.os.Looper;
import androidx.annotation.VisibleForTesting;
-import com.android.launcher3.MainThreadExecutor;
import com.android.launcher3.util.ResourceBasedOverride.Overrides;
import java.util.concurrent.ExecutionException;
@@ -43,7 +44,7 @@ public class MainThreadInitializedObject<T> {
mValue = mProvider.get(context.getApplicationContext());
} else {
try {
- return new MainThreadExecutor().submit(() -> get(context)).get();
+ return MAIN_EXECUTOR.submit(() -> get(context)).get();
} catch (InterruptedException|ExecutionException e) {
throw new RuntimeException(e);
}