diff options
Diffstat (limited to 'tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java')
-rw-r--r-- | tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java b/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java index 9a4e99ea7bda..22b587fe98e6 100644 --- a/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java +++ b/tests/DumpRenderTree/src/com/android/dumprendertree/ReliabilityTestActivity.java @@ -22,6 +22,7 @@ import android.graphics.Bitmap; import android.net.http.SslError; import android.os.Bundle; import android.os.Handler; +import android.os.Looper; import android.os.Message; import android.util.Log; import android.view.ViewGroup; @@ -184,7 +185,7 @@ public class ReliabilityTestActivity extends Activity { } private final void validateNotAppThread() { - if (ActivityThread.currentActivityThread() != null) { + if (Looper.myLooper() == Looper.getMainLooper()) { throw new RuntimeException( "This method can not be called from the main application thread"); } |