當前位置: 首頁>>代碼示例>>Java>>正文


Java FLog.i方法代碼示例

本文整理匯總了Java中com.facebook.common.logging.FLog.i方法的典型用法代碼示例。如果您正苦於以下問題:Java FLog.i方法的具體用法?Java FLog.i怎麽用?Java FLog.i使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.facebook.common.logging.FLog的用法示例。


在下文中一共展示了FLog.i方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: updateStats

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
private void updateStats() {
  final Runtime runtime = Runtime.getRuntime();
  final long heapMemory = runtime.totalMemory() - runtime.freeMemory();
  final StringBuilder sb = new StringBuilder(DEFAULT_MESSAGE_SIZE);
  // When changing format of output below, make sure to sync "run_comparison.py" as well
  sb.append("Heap: ");
  appendSize(sb, heapMemory);
  sb.append(" Java ");
  appendSize(sb, Debug.getNativeHeapSize());
  sb.append(" native\n");
  appendTime(sb, "Avg wait time: ", mPerfListener.getAverageWaitTime(), "\n");
  appendNumber(sb, "Requests: ", mPerfListener.getOutstandingRequests(), " outsdng ");
  appendNumber(sb, "", mPerfListener.getCancelledRequests(), " cncld\n");
  final String message = sb.toString();
  mStatsDisplay.setText(message);
  FLog.i(TAG, message);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:18,代碼來源:MainActivity.java

示例2: onStart

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
public void onStart() {
  Preconditions.checkNotNull(mTag);
  Preconditions.checkNotNull(mPerfListener);
  if (mState == ImageRequestState.STARTED) {
    onCancellation();
  }
  mStartTime = System.currentTimeMillis();
  mFinishTime = 0;
  mPerfListener.reportStart();
  mState = ImageRequestState.STARTED;
  FLog.i(TAG, "Image [%s]: loading started...", mTag);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:13,代碼來源:Instrumentation.java

示例3: onSuccess

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
public void onSuccess() {
  Preconditions.checkState(mState == ImageRequestState.STARTED);
  mState = ImageRequestState.SUCCESS;
  mFinishTime = System.currentTimeMillis();
  final long elapsedTime = mFinishTime - mStartTime;
  mPerfListener.reportSuccess(elapsedTime);
  FLog.i(TAG, "Image [%s]: loaded after %d ms", mTag, elapsedTime);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:9,代碼來源:Instrumentation.java

示例4: onFailure

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
public void onFailure() {
  Preconditions.checkState(mState == ImageRequestState.STARTED);
  mState = ImageRequestState.FAILURE;
  mFinishTime = System.currentTimeMillis();
  final long elapsedTime = mFinishTime - mStartTime;
  mPerfListener.reportFailure(elapsedTime);
  FLog.i(TAG, "Image [%s]: failed after %d ms", mTag, elapsedTime);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:9,代碼來源:Instrumentation.java

示例5: onCancellation

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
public void onCancellation() {
  if (mState != ImageRequestState.STARTED) {
    return;
  }
  mState = ImageRequestState.CANCELLATION;
  mFinishTime = System.currentTimeMillis();
  final long elapsedTime = mFinishTime - mStartTime;
  mPerfListener.reportCancellation(elapsedTime);
  FLog.i(TAG, "Image [%s]: cancelled after %d ms", mTag, elapsedTime);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:11,代碼來源:Instrumentation.java

示例6: onHostResume

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
@Override
public void onHostResume() {
    FLog.i(ReactConstants.TAG, "orientation detect enabled.");
    mOrientationListener.enable();

    final Activity activity = getCurrentActivity();
    if (activity == null) return;
    activity.registerReceiver(receiver, new IntentFilter("onConfigurationChanged"));
}
 
開發者ID:wonday,項目名稱:react-native-orientation-locker,代碼行數:10,代碼來源:OrientationModule.java

示例7: tryAutomaticBadge

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
private void tryAutomaticBadge(Context context, int number) {
    if (null == applyAutomaticBadger) {
        applyAutomaticBadger = ShortcutBadger.applyCount(context, number);
        if (applyAutomaticBadger) {
            FLog.i(LOG_TAG, "First attempt to use automatic badger succeeded; permanently enabling method.");
        } else {
            FLog.i(LOG_TAG, "First attempt to use automatic badger failed; permanently disabling method.");
        }
        return;
    } else if (!applyAutomaticBadger) {
        return;
    }
    ShortcutBadger.applyCount(context, number);
}
 
開發者ID:zzzkk2009,項目名稱:react-native-leancloud-sdk,代碼行數:15,代碼來源:ApplicationBadgeHelper.java

示例8: tryLegacySamsungBadge

import com.facebook.common.logging.FLog; //導入方法依賴的package包/類
private void tryLegacySamsungBadge(Context context, int number) {
    // First attempt to apply legacy samsung badge. Check if eligible, then attempt it.
    if (null == applySamsungBadger) {
        applySamsungBadger = isLegacySamsungLauncher(context) && applyLegacySamsungBadge(context, number);
        if (applySamsungBadger) {
            FLog.i(LOG_TAG, "First attempt to use legacy Samsung badger succeeded; permanently enabling method.");
        } else {
            FLog.w(LOG_TAG, "First attempt to use legacy Samsung badger failed; permanently disabling method.");
        }
        return;
    } else if (!applySamsungBadger) {
        return;
    }
    applyLegacySamsungBadge(context, number);
}
 
開發者ID:zzzkk2009,項目名稱:react-native-leancloud-sdk,代碼行數:16,代碼來源:ApplicationBadgeHelper.java


注:本文中的com.facebook.common.logging.FLog.i方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。