本文整理汇总了Java中com.csipsimple.ui.warnings.WarningUtils类的典型用法代码示例。如果您正苦于以下问题:Java WarningUtils类的具体用法?Java WarningUtils怎么用?Java WarningUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WarningUtils类属于com.csipsimple.ui.warnings包,在下文中一共展示了WarningUtils类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: asyncSanityCheck
import com.csipsimple.ui.warnings.WarningUtils; //导入依赖的package包/类
private void asyncSanityCheck() {
// if(Compatibility.isCompatible(9)) {
// // We check now if something is wrong with the gingerbread dialer
// integration
// Compatibility.getDialerIntegrationState(SipHome.this);
// }
// Nightly build check
if(NightlyUpdater.isNightlyBuild(this)) {
Log.d(THIS_FILE, "Sanity check : we have a nightly build here");
ConnectivityManager connectivityService = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo ni = connectivityService.getActiveNetworkInfo();
// Only do the process if we are on wifi
if (ni != null && ni.isConnected() && ni.getType() == ConnectivityManager.TYPE_WIFI) {
// Only do the process if we didn't dismissed previously
NightlyUpdater nu = new NightlyUpdater(this);
if (!nu.ignoreCheckByUser()) {
long lastCheck = nu.lastCheck();
long current = System.currentTimeMillis();
long oneDay = 43200000; // 12 hours
if (current - oneDay > lastCheck) {
if (onForeground) {
// We have to check for an update
UpdaterPopupLauncher ru = nu.getUpdaterPopup(false);
if (ru != null && asyncSanityChecker != null) {
runOnUiThread(ru);
}
}
}
}
}
}
applyWarning(WarningUtils.WARNING_PRIVILEGED_INTENT, WarningUtils.shouldWarnPrivilegedIntent(this, prefProviderWrapper));
applyWarning(WarningUtils.WARNING_NO_STUN, WarningUtils.shouldWarnNoStun(prefProviderWrapper));
applyWarning(WarningUtils.WARNING_VPN_ICS, WarningUtils.shouldWarnVpnIcs(prefProviderWrapper));
applyWarning(WarningUtils.WARNING_SDCARD, WarningUtils.shouldWarnSDCard(this, prefProviderWrapper));
}