summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/states
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2019-08-15 14:53:41 -0700
committerSunny Goyal <sunnygoyal@google.com>2019-08-20 14:36:17 -0700
commit6fe3eec95cfb153ed7c16c6381623b7e762452c3 (patch)
treee530f240d9ce0b08d06c17e6ffe49d6c1ceab962 /src/com/android/launcher3/states
parent4fa6f63ffd7a5ab230d17e8401d29cae3e5440b8 (diff)
downloadandroid_packages_apps_Trebuchet-6fe3eec95cfb153ed7c16c6381623b7e762452c3.tar.gz
android_packages_apps_Trebuchet-6fe3eec95cfb153ed7c16c6381623b7e762452c3.tar.bz2
android_packages_apps_Trebuchet-6fe3eec95cfb153ed7c16c6381623b7e762452c3.zip
Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
Diffstat (limited to 'src/com/android/launcher3/states')
-rw-r--r--src/com/android/launcher3/states/InternalStateHandler.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/com/android/launcher3/states/InternalStateHandler.java b/src/com/android/launcher3/states/InternalStateHandler.java
index 446d4f8ed..a23cd6d2e 100644
--- a/src/com/android/launcher3/states/InternalStateHandler.java
+++ b/src/com/android/launcher3/states/InternalStateHandler.java
@@ -15,6 +15,8 @@
*/
package com.android.launcher3.states;
+import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
+
import android.content.Intent;
import android.os.Binder;
import android.os.Bundle;
@@ -23,7 +25,6 @@ import android.os.IBinder;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.model.BgDataModel.Callbacks;
-import com.android.launcher3.MainThreadExecutor;
import java.lang.ref.WeakReference;
@@ -94,16 +95,12 @@ public abstract class InternalStateHandler extends Binder {
private static class Scheduler implements Runnable {
private WeakReference<InternalStateHandler> mPendingHandler = new WeakReference<>(null);
- private MainThreadExecutor mMainThreadExecutor;
public void schedule(InternalStateHandler handler) {
synchronized (this) {
mPendingHandler = new WeakReference<>(handler);
- if (mMainThreadExecutor == null) {
- mMainThreadExecutor = new MainThreadExecutor();
- }
}
- mMainThreadExecutor.execute(this);
+ MAIN_EXECUTOR.execute(this);
}
@Override