summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-11-07 16:54:02 -0800
committerSunny Goyal <sunnygoyal@google.com>2018-11-12 10:49:59 -0800
commit06a07e9748d07941be5f49f3388e94e5fcdeb840 (patch)
treee83cb6d85badbe22ef33e225e4d883932e25da1f /src
parentf1982fcaae1c24c93eab2309cb06905d25a90c00 (diff)
downloadandroid_packages_apps_Trebuchet-06a07e9748d07941be5f49f3388e94e5fcdeb840.tar.gz
android_packages_apps_Trebuchet-06a07e9748d07941be5f49f3388e94e5fcdeb840.tar.bz2
android_packages_apps_Trebuchet-06a07e9748d07941be5f49f3388e94e5fcdeb840.zip
Moving come tests to Roboelectric
> Fixing resource loading in robo tests Change-Id: Id5b8a0e4916a2a200da7a41b03f19846834beb1f
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/LauncherModel.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/LauncherModel.java b/src/com/android/launcher3/LauncherModel.java
index b3dabae53..a5f97de7a 100644
--- a/src/com/android/launcher3/LauncherModel.java
+++ b/src/com/android/launcher3/LauncherModel.java
@@ -96,10 +96,12 @@ public class LauncherModel extends BroadcastReceiver
@Thunk boolean mIsLoaderTaskRunning;
@Thunk static final HandlerThread sWorkerThread = new HandlerThread("launcher-loader");
+ private static final Looper mWorkerLooper;
static {
sWorkerThread.start();
+ mWorkerLooper = sWorkerThread.getLooper();
}
- @Thunk static final Handler sWorker = new Handler(sWorkerThread.getLooper());
+ @Thunk static final Handler sWorker = new Handler(mWorkerLooper);
// Indicates whether the current model data is valid or not.
// We start off with everything not loaded. After that, we assume that
@@ -708,7 +710,7 @@ public class LauncherModel extends BroadcastReceiver
* @return the looper for the worker thread which can be used to start background tasks.
*/
public static Looper getWorkerLooper() {
- return sWorkerThread.getLooper();
+ return mWorkerLooper;
}
public static void setWorkerPriority(final int priority) {