本文整理汇总了Java中timber.log.Timber.d方法的典型用法代码示例。如果您正苦于以下问题:Java Timber.d方法的具体用法?Java Timber.d怎么用?Java Timber.d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类timber.log.Timber
的用法示例。
在下文中一共展示了Timber.d方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import timber.log.Timber; //导入方法依赖的package包/类
@Override public void render(SearchViewState viewState) {
Timber.d("render %s", viewState);
if (viewState instanceof SearchViewState.SearchNotStartedYet) {
renderSearchNotStarted();
} else if (viewState instanceof SearchViewState.Loading) {
renderLoading();
} else if (viewState instanceof SearchViewState.SearchResult) {
renderResult(((SearchViewState.SearchResult) viewState).getResult());
} else if (viewState instanceof SearchViewState.EmptyResult) {
renderEmptyResult();
} else if (viewState instanceof SearchViewState.Error) {
Timber.e(((SearchViewState.Error) viewState).getError());
renderError();
} else {
throw new IllegalArgumentException("Don't know how to render viewState " + viewState);
}
}
示例2: onPostExecute
import timber.log.Timber; //导入方法依赖的package包/类
@Override
protected void onPostExecute(Integer result) {
super.onPostExecute(result);
if (isDestroyed()) {
return;
}
dismissProgressDialog();
switch (result) {
case OK:
Timber.d("selected wallet is ." + walletNode.name + ".");
// now it's getting real, onValidateFields if wallet exists
promptAndStart(walletNode);
break;
case TIMEOUT:
Toast.makeText(LoginActivity.this, getString(R.string.status_wallet_connect_timeout), Toast.LENGTH_LONG).show();
break;
case INVALID:
Toast.makeText(LoginActivity.this, getString(R.string.status_wallet_node_invalid), Toast.LENGTH_LONG).show();
break;
case IOEX:
Toast.makeText(LoginActivity.this, getString(R.string.status_wallet_connect_ioex), Toast.LENGTH_LONG).show();
break;
}
}
示例3: addNotificationSync
import timber.log.Timber; //导入方法依赖的package包/类
private void addNotificationSync(ProcessedNotification notification)
{
if (Preferences.getEnum(notification.getAppPreferences(), PerAppSettings.VIBRATION_TYPE) == VibrationType.NONE) {
Timber.d("Notification filtered: vibration type");
return;
}
pendingNotifications.push(notification);
// at least 250 millisecond delay between notification posting and processing
// is enforced to catch all notifications in the wear group
int procesingDelay = Preferences.getInt(globalSettings, GlobalSettings.PROCESSING_DELAY);
procesingDelay = Math.max(250, procesingDelay);
handler.removeMessages(MESSAGE_PROCESS_PENDING);
handler.sendMessageDelayed(Message.obtain(handler, MESSAGE_PROCESS_PENDING), procesingDelay);
}
示例4: getLegacyStorageLocations
import timber.log.Timber; //导入方法依赖的package包/类
/**
* Attempt to return a list of storage locations pre-Kitkat.
*
* @param context the context
* @return the list of storage locations
*/
private static List<Storage> getLegacyStorageLocations(Context context) {
List<String> mounts = readMountsFile();
// As per http://source.android.com/devices/tech/storage/config.html
// device-specific vold.fstab file is removed after Android 4.2.2
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
Set<String> volds = readVoldsFile();
List<String> toRemove = new ArrayList<>();
for (String mount : mounts) {
if (!volds.contains(mount)) {
toRemove.add(mount);
}
}
mounts.removeAll(toRemove);
} else {
Timber.d("Android version: %d, skip reading vold.fstab file", Build.VERSION.SDK_INT);
}
Timber.d("mounts list is: %s", mounts);
return buildMountsList(context, mounts);
}
示例5: processPickedLocation
import timber.log.Timber; //导入方法依赖的package包/类
private void processPickedLocation(int resultCode, Intent data){
if (resultCode == Activity.RESULT_CANCELED) {
if (data.getExtras() == null)
return;
if (data.getExtras().containsKey(ChatSDKLocationActivity.ERROR))
uiHelper.showAlertToast(data.getExtras().getString(ChatSDKLocationActivity.ERROR));
}
else if (resultCode == Activity.RESULT_OK) {
if (DEBUG)
Timber.d("Zoom level: %s", data.getFloatExtra(ChatSDKLocationActivity.ZOOM, 0.0f));
// Send the message, Params Latitude, Longitude, Base64 Representation of the image of the location, threadId.
sendLocationMessage(data);
}
}
示例6: replaceOrAddItem
import timber.log.Timber; //导入方法依赖的package包/类
public E replaceOrAddItem(BThread thread){
boolean replaced = false, exist = false;
E item = itemMaker.fromBThread(thread);
for (int i = 0 ; i < threadItems.size() ; i++)
{
if (threadItems.get(i).entityId.equals(thread.getEntityID()))
{
exist = true;
if (ThreadListItem.compare(item, threadItems.get(i)))
{
threadItems.set(i, item);
replaced = true;
}
else
{
replaced = false;
}
}
}
if (!exist)
threadItems.add(itemMaker.fromBThread(thread));
if (replaced || !exist) {
if (DEBUG) Timber.d("Notify!, %s", (replaced ? "Replaced": !exist ? "Not Exist":""));
sort();
notifyDataSetChanged();
}
return item;
}
开发者ID:MobileDev418,项目名称:chat-sdk-android-push-firebase,代码行数:33,代码来源:ChatSDKAbstractThreadsListAdapter.java
示例7: onResumeFragment
import timber.log.Timber; //导入方法依赖的package包/类
@Override
public void onResumeFragment() {
super.onResumeFragment();
Timber.d("onResumeFragment()");
Helper.hideKeyboard(getActivity());
etDummy.requestFocus();
}
示例8: sendData
import timber.log.Timber; //导入方法依赖的package包/类
public void sendData(String message) {
if (asyncClient != null) {
asyncClient.write(new ByteBufferList(message.getBytes()));
Timber.d("Data sent: %s", message);
} else {
Timber.e("cannot send data - socket not yet ready");
}
}
示例9: saveWallet
import timber.log.Timber; //导入方法依赖的package包/类
public void saveWallet() {
if (mIsBound) { // no point in talking to unbound service
Intent intent = new Intent(getApplicationContext(), WalletService.class);
intent.putExtra(WalletService.REQUEST, WalletService.REQUEST_CMD_STORE);
startService(intent);
Timber.d("STORE request sent");
} else {
Timber.e("Service not bound");
}
}
示例10: onCreate
import timber.log.Timber; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
chatSDKUiHelper = ChatSDKUiHelper.getInstance().get(this);
if (integratedWithFacebook && getNetworkAdapter().facebookEnabled())
{
uiHelper = new UiLifecycleHelper(this, callback);
uiHelper.onCreate(savedInstanceState);
}
if (getIntent() != null && getIntent().getExtras() != null)
{
if (DEBUG) Timber.d("From login");
fromLoginActivity = getIntent().getExtras().getBoolean(FROM_LOGIN, false);
// So we wont encounter this flag again.
getIntent().removeExtra(FROM_LOGIN);
} else fromLoginActivity = false;
if (savedInstanceState != null)
fromLoginActivity = savedInstanceState.getBoolean(FROM_LOGIN, false);
if (enableCardToast)
{
SuperCardToast.onRestoreState(savedInstanceState, ChatSDKBaseActivity.this);
}
// Setting the default task description.
setTaskDescription(getTaskDescriptionBitmap(), getTaskDescriptionLabel(), getTaskDescriptionColor());
}
示例11: updateTranslationsListAsNeeded
import timber.log.Timber; //导入方法依赖的package包/类
private void updateTranslationsListAsNeeded() {
if (settings.haveUpdatedTranslations()) {
showTranslationsUpgradeDialog();
} else if (!updatedTranslations) {
long time = settings.getLastUpdatedTranslationDate();
Timber.d("checking whether we should update translations..");
if (System.currentTimeMillis() - time > Constants.TRANSLATION_REFRESH_TIME) {
Timber.d("updating translations list...");
updatedTranslations = true;
translationManagerPresenter.checkForUpdates();
}
}
}
示例12: onScanResult
import timber.log.Timber; //导入方法依赖的package包/类
@Override
public void onScanResult(int callbackType, ScanResult result) {
String deviceName = result.getDevice().getName();
String deviceAddress = result.getDevice().getAddress();
Log.i(TAG, "ScanCallback.onScanResult: " + mScanResults.entrySet());
if (!mScanResults.containsKey(deviceAddress)) {
Log.i(TAG, "ScanCallback.deviceName:" + deviceName);
mScanResults.put(deviceAddress, deviceName);
if (deviceName == null) {
updateLog("Found " + deviceAddress);
} else {
updateLog("Found " + deviceAddress + " (" + deviceName + ")");
}
if (deviceName != null && (deviceName.startsWith("ow") || deviceName.startsWith("Onewheel"))) {
updateLog("Looks like we found our OW device (" + deviceName + ") discovering services!");
connectToDevice(result.getDevice());
} else {
Timber.d("onScanResult: found another device:" + deviceName + "-" + deviceAddress);
}
} else {
Timber.d("onScanResult: mScanResults already had our key.");
}
}
示例13: CameraOperator
import timber.log.Timber; //导入方法依赖的package包/类
public CameraOperator(Context context, CameraOperatorListener listener) {
Timber.d("Building camera training object.");
this.listener = listener;
try {
init(context);
} catch (CameraAccessException e) {
Timber.e(e, "Failed to initialize camera training.");
}
}
示例14: handleStartDiscoveryResult
import timber.log.Timber; //导入方法依赖的package包/类
private void handleStartDiscoveryResult(Status status) {
if (status.isSuccess()) {
Timber.d("Discovering...");
updateConnectionStatus(CONNECTING, R.string.connection_info_discovering);
} else {
Timber.d("Discovery failed: " + status.getStatusMessage() + "(" + status.getStatusCode() + ")");
updateConnectionStatus(DISCONNECTED, R.string.connection_info_discovery_failed,
status.getStatusCode(),
status.getStatusMessage());
}
}
示例15: onShareClick
import timber.log.Timber; //导入方法依赖的package包/类
@OnClick({R.id.share_activity_chart, R.id.share_editors_chart, R.id.share_language_chart, R.id.share_os_chart})
public void onShareClick(View view) {
Bitmap bitmap = null;
switch (view.getId()) {
case R.id.share_activity_chart:
bitmap = lineChart.getChartBitmap();
break;
case R.id.share_editors_chart:
bitmap = pieChartEditors.getChartBitmap();
break;
case R.id.share_language_chart:
bitmap = pieChartLanguages.getChartBitmap();
break;
case R.id.share_os_chart:
bitmap = pieChartOs.getChartBitmap();
break;
default:
break;
}
if (bitmap != null) {
//add watermark
bitmap = UiUtils.addWaterMark(bitmap, context);
try {
FileProviderUtils.shareBitmap(context, bitmap);
} catch (IOException e) {
Timber.d(e, "IO Error while saving image");
Toast.makeText(context, R.string.share_error, Toast.LENGTH_SHORT).show();
}
bitmap.recycle();
}
}