本文整理汇总了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;
}
示例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)" : "");
}
示例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));
}
}
示例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;
}
示例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);
}
}
示例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));
}
}
示例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));
}
}
示例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);
}
示例9: stopScreencast
import com.facebook.stetho.common.LogUtil; //导入方法依赖的package包/类
public void stopScreencast() {
LogUtil.d("Stopping screencast");
mBackgroundHandler.post(new CancellationRunnable());
}