android.util.Config Java Examples
The following examples show how to use
android.util.Config.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OnSingleClickListener.java From Slide with GNU General Public License v3.0 | 7 votes |
@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); } }
Example #2
Source File: Helpers.java From mobile-manager-tool with MIT License | 6 votes |
/** * 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; } }
Example #3
Source File: DBHelper.java From NBAPlus with Apache License 2.0 | 5 votes |
private DBHelper(Context context) { DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(context, DB_NAME, null); db = helper.getWritableDatabase(); // 注意:该数据库连接属于 DaoMaster,所以多个 Session 指的是相同的数据库连接。 DaoMaster daoMaster = new DaoMaster(db); daoSession = daoMaster.newSession(); if(Config.DEBUG) { QueryBuilder.LOG_SQL = true; QueryBuilder.LOG_VALUES = true; } }