下面列出了android.util.Config#LOGD 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Checks whether this looks like a legitimate selection parameter
*/
public static void validateSelection(String selection,
Set<String> allowedColumns) {
try {
if (selection == null || selection.length() == 0) {
return;
}
Lexer lexer = new Lexer(selection, allowedColumns);
parseExpression(lexer);
if (lexer.currentToken() != Lexer.TOKEN_END) {
throw new IllegalArgumentException("syntax error");
}
} catch (RuntimeException ex) {
if (Constants.LOGV) {
Log.d(Constants.TAG, "invalid selection [" + selection
+ "] triggered " + ex);
} else if (Config.LOGD) {
Log.d(Constants.TAG, "invalid selection triggered " + ex);
}
throw ex;
}
}
@Override
public final void onClick(View v) {
final long lastClickTime = mLastClickTime;
final long now = SystemClock.uptimeMillis(); //guaranteed 100% monotonic
if (now - lastClickTime < MIN_DELAY_MS && !override) {
// Too fast: ignore
if (Config.LOGD) {
Log.d(TAG, "onClick Clicked too quickly: ignored");
}
} else {
override = false;
// Update mLastClickTime and register the click
mLastClickTime = now;
onSingleClick(v);
}
}