本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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"));
}
示例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);
}
示例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);
}