org.bitcoinj.core.Utils.isAndroidRuntime()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.bitcoinj.core.Utils.isAndroidRuntime()方法的一些代码示例,展示了Utils.isAndroidRuntime()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.isAndroidRuntime()方法的具体详情如下:
包路径:org.bitcoinj.core.Utils
类名称:Utils
方法名:isAndroidRuntime

Utils.isAndroidRuntime介绍

暂无

代码示例

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

public static ReentrantLock lock(String name) {
  if (Utils.isAndroidRuntime())
    return new ReentrantLock(true);
  else
    return factory.newReentrantLock(name);
}

代码示例来源:origin: fr.acinq/bitcoinj-core

public static ReentrantLock lock(String name) {
  if (Utils.isAndroidRuntime())
    return new ReentrantLock(true);
  else
    return factory.newReentrantLock(name);
}

代码示例来源:origin: greenaddress/GreenBits

public static ReentrantLock lock(String name) {
  if (Utils.isAndroidRuntime())
    return new ReentrantLock(true);
  else
    return factory.newReentrantLock(name);
}

代码示例来源:origin: HashEngineering/dashj

public static ReentrantLock lock(String name) {
  if (Utils.isAndroidRuntime())
    return new ReentrantLock(true);
  else
    return factory.newReentrantLock(name);
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

done = true;
if (Utils.isAndroidRuntime())
  return;
try {

代码示例来源:origin: fr.acinq/bitcoinj-core

done = true;
if (Utils.isAndroidRuntime())
  return;
try {

代码示例来源:origin: greenaddress/GreenBits

done = true;
if (Utils.isAndroidRuntime())
  return;
try {

代码示例来源:origin: HashEngineering/dashj

done = true;
if (Utils.isAndroidRuntime())
  return;
try {

代码示例来源:origin: greenaddress/GreenBits

/**
 * Returns the difference of {@link Transaction#getValueSentToMe(TransactionBag)} and {@link Transaction#getValueSentFromMe(TransactionBag)}.
 */
public Coin getValue(TransactionBag wallet) throws ScriptException {
  // FIXME: TEMP PERF HACK FOR ANDROID - this crap can go away once we have a real payments API.
  boolean isAndroid = Utils.isAndroidRuntime();
  if (isAndroid && cachedValue != null && cachedForBag == wallet)
    return cachedValue;
  Coin result = getValueSentToMe(wallet).subtract(getValueSentFromMe(wallet));
  if (isAndroid) {
    cachedValue = result;
    cachedForBag = wallet;
  }
  return result;
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

/**
 * Returns the difference of {@link Transaction#getValueSentToMe(TransactionBag)} and {@link Transaction#getValueSentFromMe(TransactionBag)}.
 */
public Coin getValue(TransactionBag wallet) throws ScriptException {
  // FIXME: TEMP PERF HACK FOR ANDROID - this crap can go away once we have a real payments API.
  boolean isAndroid = Utils.isAndroidRuntime();
  if (isAndroid && cachedValue != null && cachedForBag == wallet)
    return cachedValue;
  Coin result = getValueSentToMe(wallet).subtract(getValueSentFromMe(wallet));
  if (isAndroid) {
    cachedValue = result;
    cachedForBag = wallet;
  }
  return result;
}

代码示例来源:origin: fr.acinq/bitcoinj-core

/**
 * Returns the difference of {@link Transaction#getValueSentToMe(TransactionBag)} and {@link Transaction#getValueSentFromMe(TransactionBag)}.
 */
public Coin getValue(TransactionBag wallet) throws ScriptException {
  // FIXME: TEMP PERF HACK FOR ANDROID - this crap can go away once we have a real payments API.
  boolean isAndroid = Utils.isAndroidRuntime();
  if (isAndroid && cachedValue != null && cachedForBag == wallet)
    return cachedValue;
  Coin result = getValueSentToMe(wallet).subtract(getValueSentFromMe(wallet));
  if (isAndroid) {
    cachedValue = result;
    cachedForBag = wallet;
  }
  return result;
}

代码示例来源:origin: HashEngineering/dashj

/**
 * Returns the difference of {@link Transaction#getValueSentToMe(TransactionBag)} and {@link Transaction#getValueSentFromMe(TransactionBag)}.
 */
public Coin getValue(TransactionBag wallet) throws ScriptException {
  // FIXME: TEMP PERF HACK FOR ANDROID - this crap can go away once we have a real payments API.
  boolean isAndroid = Utils.isAndroidRuntime();
  if (isAndroid && cachedValue != null && cachedForBag == wallet)
    return cachedValue;
  Coin result = getValueSentToMe(wallet).subtract(getValueSentFromMe(wallet));
  if (isAndroid) {
    cachedValue = result;
    cachedForBag = wallet;
  }
  return result;
}

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

if (!Utils.isAndroidRuntime() && useLocalhostPeerWhenPossible && maybeCheckForLocalhostPeer() && firstRun) {
  log.info("Localhost peer detected, trying to use it instead of P2P discovery");
  maxConnections = 0;

代码示例来源:origin: greenaddress/GreenBits

if (!Utils.isAndroidRuntime() && useLocalhostPeerWhenPossible && maybeCheckForLocalhostPeer() && firstRun) {
  log.info("Localhost peer detected, trying to use it instead of P2P discovery");
  maxConnections = 0;

代码示例来源:origin: fr.acinq/bitcoinj-core

if (!Utils.isAndroidRuntime() && useLocalhostPeerWhenPossible && maybeCheckForLocalhostPeer() && firstRun) {
  log.info("Localhost peer detected, trying to use it instead of P2P discovery");
  maxConnections = 0;

代码示例来源:origin: HashEngineering/dashj

if (!Utils.isAndroidRuntime() && useLocalhostPeerWhenPossible && maybeCheckForLocalhostPeer() && firstRun) {
  log.info("Localhost peer detected, trying to use it instead of P2P discovery");
  maxConnections = 0;

代码示例来源:origin: cash.bitcoinj/bitcoinj-core

if (checkpoints == null && !Utils.isAndroidRuntime()) {
  checkpoints = CheckpointManager.openStream(params);

代码示例来源:origin: greenaddress/GreenBits

if (checkpoints == null && !Utils.isAndroidRuntime()) {
  checkpoints = CheckpointManager.openStream(params);

代码示例来源:origin: HashEngineering/dashj

if (checkpoints == null && !Utils.isAndroidRuntime()) {
  checkpoints = CheckpointManager.openStream(params);

相关文章