本文整理匯總了Java中com.facebook.common.logging.FLog.d方法的典型用法代碼示例。如果您正苦於以下問題:Java FLog.d方法的具體用法?Java FLog.d怎麽用?Java FLog.d使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.facebook.common.logging.FLog
的用法示例。
在下文中一共展示了FLog.d方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createRootDirectoryIfNecessary
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@VisibleForTesting
void createRootDirectoryIfNecessary(File rootDirectory) throws IOException {
try {
FileUtils.mkdirs(rootDirectory);
} catch (FileUtils.CreateDirectoryException cde) {
mCacheErrorLogger.logError(
CacheErrorLogger.CacheErrorCategory.WRITE_CREATE_DIR,
TAG,
"createRootDirectoryIfNecessary",
cde);
throw cde;
}
FLog.d(TAG, "Created cache directory %s", rootDirectory.getAbsolutePath());
}
示例2: setCurrentFPS
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
private void setCurrentFPS(double currentFPS, double currentJSFPS, int droppedUIFrames, int total4PlusFrameStutters) {
String fpsString = String.format(
Locale.US,
"UI: %.1f fps\n%d dropped so far\n%d stutters (4+) so far\nJS: %.1f fps",
currentFPS,
droppedUIFrames,
total4PlusFrameStutters,
currentJSFPS);
mTextView.setText(fpsString);
FLog.d(ReactConstants.TAG, fpsString);
}
示例3: manageChildren
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
/**
* Interface for adding/removing/moving views within a parent view from JS.
*
* @param viewTag the view tag of the parent view
* @param moveFrom a list of indices in the parent view to move views from
* @param moveTo parallel to moveFrom, a list of indices in the parent view to move views to
* @param addChildTags a list of tags of views to add to the parent
* @param addAtIndices parallel to addChildTags, a list of indices to insert those children at
* @param removeFrom a list of indices of views to permanently remove. The memory for the
* corresponding views and data structures should be reclaimed.
*/
@ReactMethod
public void manageChildren(
int viewTag,
@Nullable ReadableArray moveFrom,
@Nullable ReadableArray moveTo,
@Nullable ReadableArray addChildTags,
@Nullable ReadableArray addAtIndices,
@Nullable ReadableArray removeFrom) {
if (DEBUG) {
FLog.d(
ReactConstants.TAG,
"(UIManager.manageChildren) tag: " + viewTag +
", moveFrom: " + moveFrom +
", moveTo: " + moveTo +
", addTags: " + addChildTags +
", atIndices: " + addAtIndices +
", removeFrom: " + removeFrom);
}
mUIImplementation.manageChildren(
viewTag,
moveFrom,
moveTo,
addChildTags,
addAtIndices,
removeFrom);
}
示例4: logStatistics
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
private void logStatistics() {
FLog.d(
TAG,
"Stats: cached=%s, reused=%s, created=%s, fallback=%s, dropped=%s, unknown=%s",
mCachedCount,
mReusedCount,
mCreatedCount,
mFallbackCount,
mDroppedFrameCount,
mUnknownCount);
}
示例5: updateView
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@ReactMethod
public void updateView(int tag, String className, ReadableMap props) {
if (DEBUG) {
FLog.d(
ReactConstants.TAG,
"(UIManager.updateView) tag: " + tag + ", class: " + className + ", props: " + props);
}
mUIImplementation.updateView(tag, className, props);
}
示例6: onHostPause
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@Override
public void onHostPause() {
FLog.d(ReactConstants.TAG, "orientation detect disabled.");
mOrientationListener.disable();
final Activity activity = getCurrentActivity();
if (activity == null) return;
try
{
activity.unregisterReceiver(receiver);
}
catch (java.lang.IllegalArgumentException e) {
FLog.w(ReactConstants.TAG, "receiver already unregistered", e);
}
}
示例7: onHostDestroy
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@Override
public void onHostDestroy() {
FLog.d(ReactConstants.TAG, "orientation detect disabled.");
mOrientationListener.disable();
final Activity activity = getCurrentActivity();
if (activity == null) return;
try
{
activity.unregisterReceiver(receiver);
}
catch (java.lang.IllegalArgumentException e) {
FLog.w(ReactConstants.TAG, "receiver already unregistered", e);
}
}
示例8: cleanDataFromModules
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
public static void cleanDataFromModules(CatalystInstance catalystInstance) {
for (NativeModule nativeModule : catalystInstance.getNativeModules()) {
if (nativeModule instanceof Cleanable) {
FLog.d(ReactConstants.TAG, "Cleaning data from " + nativeModule.getName());
((Cleanable) nativeModule).clearSensitiveData();
}
}
}
示例9: clearAndCloseDatabase
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
public synchronized void clearAndCloseDatabase() throws RuntimeException {
try {
clear();
closeDatabase();
FLog.d(ReactConstants.TAG, "Cleaned " + DATABASE_NAME);
} catch (Exception e) {
// Clearing the database has failed, delete it instead.
if (deleteDatabase()) {
FLog.d(ReactConstants.TAG, "Deleted Local Database " + DATABASE_NAME);
return;
}
// Everything failed, throw
throw new RuntimeException("Clearing and deleting database " + DATABASE_NAME + " failed");
}
}
示例10: createView
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@ReactMethod
public void createView(int tag, String className, int rootViewTag, ReadableMap props) {
if (DEBUG) {
FLog.d(
ReactConstants.TAG,
"(UIManager.createView) tag: " + tag + ", class: " + className + ", props: " + props);
}
mUIImplementation.createView(tag, className, rootViewTag, props);
}
示例11: setChildren
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
/**
* Interface for fast tracking the initial adding of views. Children view tags are assumed to be
* in order
*
* @param viewTag the view tag of the parent view
* @param childrenTags An array of tags to add to the parent in order
*/
@ReactMethod
public void setChildren(
int viewTag,
ReadableArray childrenTags) {
if (DEBUG) {
FLog.d(
ReactConstants.TAG,
"(UIManager.setChildren) tag: " + viewTag + ", children: " + childrenTags);
}
mUIImplementation.setChildren(viewTag, childrenTags);
}
示例12: CatalystInstanceImpl
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
private CatalystInstanceImpl(
final ReactQueueConfigurationSpec ReactQueueConfigurationSpec,
final JavaScriptExecutor jsExecutor,
final NativeModuleRegistry registry,
final JavaScriptModuleRegistry jsModuleRegistry,
final JSBundleLoader jsBundleLoader,
NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler) {
FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge.");
mHybridData = initHybrid();
mReactQueueConfiguration = ReactQueueConfigurationImpl.create(
ReactQueueConfigurationSpec,
new NativeExceptionHandler());
mBridgeIdleListeners = new CopyOnWriteArrayList<>();
mJavaRegistry = registry;
mJSModuleRegistry = jsModuleRegistry;
mJSBundleLoader = jsBundleLoader;
mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
mNativeModulesQueueThread = mReactQueueConfiguration.getNativeModulesQueueThread();
mTraceListener = new JSProfilerTraceListener(this);
FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge before initializeBridge");
initializeBridge(
new BridgeCallback(this),
jsExecutor,
mReactQueueConfiguration.getJSQueueThread(),
mNativeModulesQueueThread,
mJavaRegistry.getJavaModules(this),
mJavaRegistry.getCxxModules());
FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge after initializeBridge");
mMainExecutorToken = getMainExecutorToken();
}
示例13: onDraw
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@Override
public void onDraw(
AnimatedDrawable2 animatedDrawable,
FrameScheduler frameScheduler,
int frameNumberToDraw,
boolean frameDrawn,
boolean isAnimationRunning,
long animationStartTimeMs,
long animationTimeMs,
long lastFrameAnimationTimeMs,
long actualRenderTimeStartMs,
long actualRenderTimeEndMs,
long startRenderTimeForNextFrameMs,
long scheduledRenderTimeForNextFrameMs) {
if (animatedDrawable.getAnimationBackend() == null) {
return;
}
int frameCount = animatedDrawable.getAnimationBackend().getFrameCount();
long animationTimeDifference = animationTimeMs - lastFrameAnimationTimeMs;
mDrawCalls++;
int expectedNextFrameNumber = (mLastFrameNumber + 1) % frameCount;
if (expectedNextFrameNumber != frameNumberToDraw) {
// something went wrong...
if (mLastFrameNumber == frameNumberToDraw) {
mDuplicateFrames++;
} else {
int skippedFrameCount =
(frameNumberToDraw - expectedNextFrameNumber) % frameCount;
if (skippedFrameCount < 0) {
skippedFrameCount += frameCount;
}
mSkippedFrames += skippedFrameCount;
}
}
mLastFrameNumber = frameNumberToDraw;
FLog.d(
TAG,
"draw: frame: %2d, drawn: %b, delay: %3d ms, rendering: %3d ms, prev: %3d ms ago, duplicates: %3d, skipped: %3d, draw calls: %4d, anim time: %6d ms, next start: %6d ms, next scheduled: %6d ms",
frameNumberToDraw,
frameDrawn,
animationTimeMs % frameScheduler.getLoopDurationMs() -
frameScheduler.getTargetRenderTimeMs(frameNumberToDraw),
actualRenderTimeEndMs - actualRenderTimeStartMs,
animationTimeDifference,
mDuplicateFrames,
mSkippedFrames,
mDrawCalls,
animationTimeMs,
startRenderTimeForNextFrameMs,
scheduledRenderTimeForNextFrameMs);
}
示例14: onDrawFrameStart
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@Override
public void onDrawFrameStart(BitmapAnimationBackend backend, int frameNumber) {
mLastFrameStart = System.currentTimeMillis();
FLog.d(TAG, "Frame: event=start, number=%d", frameNumber);
}
示例15: translateTo
import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
public void translateTo(float distanceX, float distanceY) {
FLog.d(TAG, "Before translateTo: " + mActiveTransform.toShortString());
calculateTranslateTransform(mActiveTransform, distanceX, distanceY);
onTransformChanged();
}