List of usage examples for android.util Log DEBUG
int DEBUG
To view the source code for android.util Log DEBUG.
Click Source Link
From source file:com.mobileglobe.android.customdialer.common.model.AccountTypeManager.java
/** * Find the best {@link DataKind} matching the requested * {@link AccountType#accountType}, {@link AccountType#dataSet}, and {@link DataKind#mimeType}. * If no direct match found, we try searching {@link FallbackAccountType}. *//*from ww w .ja va 2 s . c om*/ @Override public DataKind getKindOrFallback(AccountType type, String mimeType) { ensureAccountsLoaded(); DataKind kind = null; // Try finding account type and kind matching request if (type != null) { kind = type.getKindForMimetype(mimeType); } if (kind == null) { // Nothing found, so try fallback as last resort kind = mFallbackAccountType.getKindForMimetype(mimeType); } if (kind == null) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Unknown type=" + type + ", mime=" + mimeType); } } return kind; }
From source file:org.springframework.web.client.RestTemplate.java
private void logResponseStatus(HttpMethod method, URI url, ClientHttpResponse response) { if (Log.isLoggable(TAG, Log.DEBUG)) { try {//from w w w . j ava2 s.c om Log.d(TAG, method.name() + " request for \"" + url + "\" resulted in " + response.getStatusCode() + " (" + response.getStatusText() + ")"); } catch (IOException e) { // ignore } } }
From source file:com.radicaldynamic.groupinform.services.DatabaseService.java
private void synchronizeLocalDBs() { final String tt = t + "synchronizeLocalDBs(): "; // Do we use automatic synchronization? SharedPreferences settings = PreferenceManager .getDefaultSharedPreferences(Collect.getInstance().getBaseContext()); // How often should we automatically synchronize databases? String syncInterval = settings.getString(PreferencesActivity.KEY_SYNCHRONIZATION_INTERVAL, Integer.toString(TIME_FIVE_MINUTES)); if (settings.getBoolean(PreferencesActivity.KEY_AUTOMATIC_SYNCHRONIZATION, true)) { Set<String> folderSet = Collect.getInstance().getInformOnlineState().getAccountFolders().keySet(); Iterator<String> folderIds = folderSet.iterator(); while (folderIds.hasNext()) { AccountFolder folder = Collect.getInstance().getInformOnlineState().getAccountFolders() .get(folderIds.next()); if (folder.isReplicated()) { // Determine if this database needs to be replicated Long lastUpdate = mDbLastReplication.get(folder.getId()); if (lastUpdate == null || System.currentTimeMillis() / 1000 - lastUpdate >= Integer.parseInt(syncInterval)) { mDbLastReplication.put(folder.getId(), new Long(System.currentTimeMillis() / 1000)); if (Collect.Log.INFO) Log.i(Collect.LOGTAG, tt + "about to begin automatic replication of " + folder.getName()); try { replicate(folder.getId(), REPLICATE_PULL); replicate(folder.getId(), REPLICATE_PUSH); } catch (Exception e) { if (Collect.Log.WARN) Log.w(Collect.LOGTAG, tt + "problem replicating " + folder.getId() + ": " + e.toString()); e.printStackTrace(); }/*from w w w .ja v a2 s .com*/ } else { if (Collect.Log.DEBUG) Log.d(Collect.LOGTAG, tt + "skipping automatic replication of " + folder.getName() + ": last synchronization too recent"); } } } } else { if (Collect.Log.DEBUG) Log.d(Collect.LOGTAG, tt + "skipping (automatic synchronization disabled)"); } }
From source file:com.mobileglobe.android.customdialer.common.model.AccountTypeManager.java
/** * Return all {@link AccountType}s with at least one account which supports "invite", i.e. * its {@link AccountType#getInviteContactActivityClassName()} is not empty. *///from w w w . j a va 2 s .c o m @VisibleForTesting static Map<AccountTypeWithDataSet, AccountType> findAllInvitableAccountTypes(Context context, Collection<AccountWithDataSet> accounts, Map<AccountTypeWithDataSet, AccountType> accountTypesByTypeAndDataSet) { HashMap<AccountTypeWithDataSet, AccountType> result = Maps.newHashMap(); for (AccountWithDataSet account : accounts) { AccountTypeWithDataSet accountTypeWithDataSet = account.getAccountTypeWithDataSet(); AccountType type = accountTypesByTypeAndDataSet.get(accountTypeWithDataSet); if (type == null) continue; // just in case if (result.containsKey(accountTypeWithDataSet)) continue; if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Type " + accountTypeWithDataSet + " inviteClass=" + type.getInviteContactActivityClassName()); } if (!TextUtils.isEmpty(type.getInviteContactActivityClassName())) { result.put(accountTypeWithDataSet, type); } } return Collections.unmodifiableMap(result); }
From source file:com.cbsb.ftpserv.ProxyConnector.java
private void setProxyState(State state) { proxyState = state;//from w w w. j a v a 2s. c o m myLog.l(Log.DEBUG, "Proxy state changed to " + state, true); FTPServerService.updateClients(); // UI update }
From source file:org.swiftp.server.ProxyConnector.java
private void setProxyState(State state) { proxyState = state;//from w w w . j a v a 2s .c o m myLog.l(Log.DEBUG, "Proxy state changed to " + state, true); // TODO: Use intent to update UI // FTPServerService.updateClients(); }
From source file:com.google.samples.apps.iosched.service.SessionAlarmService.java
@Override public void onConnected(Bundle connectionHint) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Connected to Google Api Service"); }//from w w w. j a v a 2s. com }
From source file:com.google.samples.apps.iosched.service.SessionAlarmService.java
@Override public void onConnectionFailed(ConnectionResult result) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Disconnected from Google Api Service"); }//w w w .j a v a 2 s . c o m }
From source file:com.android.contacts.list.DefaultContactBrowseListFragment.java
private void setSwipeRefreshLayoutEnabledOrNot(ContactListFilter filter) { final SwipeRefreshLayout swipeRefreshLayout = getSwipeRefreshLayout(); if (swipeRefreshLayout == null) { if (Log.isLoggable(TAG, Log.DEBUG)) { Log.d(TAG, "Can not load swipeRefreshLayout, swipeRefreshLayout is null"); }/*from w ww.java2 s.c o m*/ return; } swipeRefreshLayout.setRefreshing(false); swipeRefreshLayout.setEnabled(false); if (filter != null && !mActionBarAdapter.isSearchMode() && !mActionBarAdapter.isSelectionMode()) { if (filter.isSyncable() || (filter.shouldShowSyncState() && SyncUtil.hasSyncableAccount(AccountTypeManager.getInstance(getContext())))) { swipeRefreshLayout.setEnabled(true); } } }
From source file:com.dirkgassen.wator.ui.activity.MainActivity.java
/** * The activitiy is resuming. We need to start our simulator and world updater thread. *//*from w w w .j a v a 2s . com*/ @Override protected void onResume() { super.onResume(); drawingAverageTime = new RollingAverage(); worldUpdateNotifierThread = new Thread(getString(R.string.worldUpdateNotifierThreadName)) { @Override public void run() { if (Log.isLoggable("Wa-Tor", Log.DEBUG)) { Log.d("Wa-Tor", "Entering world update notifier thread"); } try { long lastUpdateFinished = 0; while (Thread.currentThread() == worldUpdateNotifierThread) { long startUpdate = System.currentTimeMillis(); if (Log.isLoggable("Wa-Tor", Log.VERBOSE)) { Log.v("Wa-Tor", "WorldUpdateNotifierThread: Notifying observers of world update"); } worldUpdated(); if (Log.isLoggable("Wa-Tor", Log.VERBOSE)) { Log.v("Wa-Tor", "WorldUpdateNotifierThread: Notifying observers took " + (System.currentTimeMillis() - startUpdate) + " ms"); } long now = System.currentTimeMillis(); if (lastUpdateFinished > 0 && drawingAverageTime != null) { drawingAverageTime.add(now - lastUpdateFinished); if (Log.isLoggable("Wa-Tor", Log.VERBOSE)) { Log.v("Wa-Tor", "WorldUpdateNotifierThread: Time delta since last redraw " + (now - lastUpdateFinished) + " ms"); } } lastUpdateFinished = now; if (Log.isLoggable("Wa-Tor", Log.VERBOSE)) { Log.v("Wa-Tor", "WorldUpdateNotifierThread: Waiting for next update"); } synchronized (this) { wait(); } } } catch (InterruptedException e) { if (Log.isLoggable("Wa-Tor", Log.DEBUG)) { Log.d("Wa-Tor", "World update notifier thread got interrupted"); } synchronized (this) { worldUpdateNotifierThread = null; } } if (Log.isLoggable("Wa-Tor", Log.DEBUG)) { Log.d("Wa-Tor", "Exiting world update notifier thread"); } } }; worldUpdateNotifierThread.start(); desiredFpsSlider.setValue(simulatorRunnable.getTargetFps()); startSimulatorThread(); synchronized (this) { if (drawerLayout.isDrawerVisible(GravityCompat.START)) { currentSimFps = (TextView) findViewById(R.id.fps_simulator); currentDrawFps = (TextView) findViewById(R.id.fps_drawing); } } }