本文整理汇总了Java中com.example.android.sunshine.app.utils.PollingCheck类的典型用法代码示例。如果您正苦于以下问题:Java PollingCheck类的具体用法?Java PollingCheck怎么用?Java PollingCheck使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PollingCheck类属于com.example.android.sunshine.app.utils包,在下文中一共展示了PollingCheck类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: waitForNotificationOrFail
import com.example.android.sunshine.app.utils.PollingCheck; //导入依赖的package包/类
public void waitForNotificationOrFail() {
// Note: The PollingCheck class is taken from the Android CTS (Compatibility Test Suite).
// It's useful to look at the Android CTS source for ideas on how to test your Android
// applications. The reason that PollingCheck works is that, by default, the JUnit
// testing framework is not running on the main Android application thread.
new PollingCheck(5000) {
@Override
protected boolean check() {
return mContentChanged;
}
}.run();
mHT.quit();
}