Fix robolectric error

Fixes: 144551238
Fixes: 144551930
Test: Robolectric
Change-Id: I33851ae2c4a06495f73e8db5d4df0992df5e7f3e
This commit is contained in:
Raff Tsai
2019-11-18 10:39:22 +08:00
parent 9096329b22
commit 4950d4cbc0
3 changed files with 6 additions and 18 deletions

View File

@@ -16,16 +16,12 @@
package com.android.settings.testutils.shadow;
import android.util.Log;
import com.android.settingslib.utils.ThreadUtils;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;
import java.util.concurrent.Callable;
@Implements(ThreadUtils.class)
public class ShadowThreadUtils {
@@ -42,15 +38,6 @@ public class ShadowThreadUtils {
runnable.run();
}
@Implementation
protected static void postOnBackgroundThread(Callable callable) {
try {
callable.call();
} catch (Exception e) {
Log.e(TAG, e.getMessage(), e);
}
}
@Implementation
protected static void postOnMainThread(Runnable runnable) {
runnable.run();