Moving come tests to Roboelectric

> Fixing resource loading in robo tests

Change-Id: Id5b8a0e4916a2a200da7a41b03f19846834beb1f
This commit is contained in:
Sunny Goyal committed 2018-11-12 10:49:59 -08:00
1 parent f1982fcaae
commit 06a07e9748
12 files changed
+69 -91

No files matched your search

+4 -2
View File
@@ -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) {