当前位置: 首页>>代码示例>>Java>>正文


Java LogUtil.d方法代码示例

本文整理汇总了Java中com.facebook.stetho.common.LogUtil.d方法的典型用法代码示例。如果您正苦于以下问题:Java LogUtil.d方法的具体用法?Java LogUtil.d怎么用?Java LogUtil.d使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.facebook.stetho.common.LogUtil的用法示例。


在下文中一共展示了LogUtil.d方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: bindToSocket

import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
@Nonnull
private static LocalServerSocket bindToSocket(String address) throws IOException {
  int retries = MAX_BIND_RETRIES;
  IOException firstException = null;
  do {
    try {
      if (LogUtil.isLoggable(Log.DEBUG)) {
        LogUtil.d("Trying to bind to @" + address);
      }
      return new LocalServerSocket(address);
    } catch (BindException be) {
      LogUtil.w(be, "Binding error, sleep " + TIME_BETWEEN_BIND_RETRIES_MS + " ms...");
      if (firstException == null) {
        firstException = be;
      }
      Util.sleepUninterruptibly(TIME_BETWEEN_BIND_RETRIES_MS);
    }
  } while (retries-- > 0);

  throw firstException;
}
 
开发者ID:facebook,项目名称:stetho,代码行数:22,代码来源:LocalSocketServer.java

示例2: updateTree

import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
private void updateTree() {
  long startTimeMs = SystemClock.elapsedRealtime();

  ShadowDocument.Update docUpdate = createShadowDocumentUpdate();
  boolean isEmpty = docUpdate.isEmpty();
  if (isEmpty) {
    docUpdate.abandon();
  } else {
    applyDocumentUpdate(docUpdate);
  }

  long deltaMs = SystemClock.elapsedRealtime() - startTimeMs;
  LogUtil.d(
      "Document.updateTree() completed in %s ms%s",
      Long.toString(deltaMs),
      isEmpty ? " (no changes)" : "");
}
 
开发者ID:facebook,项目名称:stetho,代码行数:18,代码来源:Document.java

示例3: maybeRegister

import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
private static void maybeRegister(DescriptorMap map, @Nullable FragmentCompat compat) {
    if (compat != null) {
        Class<?> fragmentClass = compat.getFragmentClass();
        LogUtil.d("Adding support for %s", fragmentClass.getName());
        map.registerDescriptor(fragmentClass, new RIFragmentDescriptor(compat));
    }
}
 
开发者ID:nekocode,项目名称:ResourceInspector,代码行数:8,代码来源:RIFragmentDescriptor.java

示例4: getAppVersion

import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
public static String getAppVersion() {
    String appVersion = null;
    PackageManager packageManager = AndroidApplication.getInstance().getPackageManager();
    try {
        PackageInfo info = packageManager.getPackageInfo(AndroidApplication.getInstance().getPackageName(), 0);
        appVersion = String.valueOf(info.versionCode);
        return appVersion;
    } catch (Throwable e) {
        LogUtil.d("PhoneInfoUtils.getAppVersion()", e.toString());
    }
    return appVersion;
}
 
开发者ID:jacklongway,项目名称:LiteSDK,代码行数:13,代码来源:PhoneInfoUtils.java

示例5: onInspectRequested

import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
public void onInspectRequested(Object element) {
  Integer nodeId = mDocument.getNodeIdForElement(element);
  if (nodeId == null) {
    LogUtil.d(
        "DocumentProvider.Listener.onInspectRequested() " +
            "called for a non-mapped node: element=%s",
        element);
  } else {
    InspectNodeRequestedEvent message = new InspectNodeRequestedEvent();
    message.nodeId = nodeId;
    mPeerManager.sendNotificationToPeers("DOM.inspectNodeRequested", message);
  }
}
 
开发者ID:facebook,项目名称:stetho,代码行数:14,代码来源:DOM.java

示例6: maybeRegister

import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
private static void maybeRegister(DescriptorMap map, @Nullable FragmentCompat compat) {
  if (compat != null) {
    Class<?> dialogFragmentClass = compat.getDialogFragmentClass();
    LogUtil.d("Adding support for %s", dialogFragmentClass);
    map.registerDescriptor(dialogFragmentClass, new DialogFragmentDescriptor(compat));
  }
}
 
开发者ID:facebook,项目名称:stetho,代码行数:8,代码来源:DialogFragmentDescriptor.java

示例7: maybeRegister

import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
private static void maybeRegister(DescriptorMap map, @Nullable FragmentCompat compat) {
  if (compat != null) {
    Class<?> fragmentClass = compat.getFragmentClass();
    LogUtil.d("Adding support for %s", fragmentClass.getName());
    map.registerDescriptor(fragmentClass, new FragmentDescriptor(compat));
  }
}
 
开发者ID:facebook,项目名称:stetho,代码行数:8,代码来源:FragmentDescriptor.java

示例8: startScreencast

import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
public void startScreencast(JsonRpcPeer peer, Page.StartScreencastRequest request) {
  LogUtil.d("Starting screencast");
  mRequest = request;
  mHandlerThread = new HandlerThread("Screencast Thread");
  mHandlerThread.start();
  mPeer = peer;
  mIsRunning = true;
  mStream = new ByteArrayOutputStream();
  mBackgroundHandler = new Handler(mHandlerThread.getLooper());
  mMainHandler.postDelayed(mBitmapFetchRunnable, FRAME_DELAY);
}
 
开发者ID:facebook,项目名称:stetho,代码行数:12,代码来源:ScreencastDispatcher.java

示例9: stopScreencast

import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
public void stopScreencast() {
  LogUtil.d("Stopping screencast");
  mBackgroundHandler.post(new CancellationRunnable());
}
 
开发者ID:facebook,项目名称:stetho,代码行数:5,代码来源:ScreencastDispatcher.java


注:本文中的com.facebook.stetho.common.LogUtil.d方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。