Java 类com.facebook.react.bridge.GuardedResultAsyncTask 实例源码

项目:RNLearn_Project1    文件:ForwardingCookieHandler.java   
public void clearCookies(final Callback callback) {
  if (USES_LEGACY_STORE) {
    new GuardedResultAsyncTask<Boolean>(mContext) {
      @Override
      protected Boolean doInBackgroundGuarded() {
        getCookieManager().removeAllCookie();
        mCookieSaver.onCookiesModified();
        return true;
      }

      @Override
      protected void onPostExecuteGuarded(Boolean result) {
        callback.invoke(result);
      }
    }.execute();
  } else {
    clearCookiesAsync(callback);
  }
}
项目:RNLearn_Project1    文件:ForwardingCookieHandler.java   
public void clearCookies(final Callback callback) {
  if (USES_LEGACY_STORE) {
    new GuardedResultAsyncTask<Boolean>(mContext) {
      @Override
      protected Boolean doInBackgroundGuarded() {
        getCookieManager().removeAllCookie();
        mCookieSaver.onCookiesModified();
        return true;
      }

      @Override
      protected void onPostExecuteGuarded(Boolean result) {
        callback.invoke(result);
      }
    }.execute();
  } else {
    clearCookiesAsync(callback);
  }
}
项目:ReactNativeSignatureExample    文件:ForwardingCookieHandler.java   
public void clearCookies(final Callback callback) {
  if (USES_LEGACY_STORE) {
    new GuardedResultAsyncTask<Boolean>(mContext) {
      @Override
      protected Boolean doInBackgroundGuarded() {
        getCookieManager().removeAllCookie();
        mCookieSaver.onCookiesModified();
        return true;
      }

      @Override
      protected void onPostExecuteGuarded(Boolean result) {
        callback.invoke(result);
      }
    }.execute();
  } else {
    clearCookiesAsync(callback);
  }
}
项目:react-native-ibeacon-android    文件:ForwardingCookieHandler.java   
public void clearCookies(final Callback callback) {
  if (USES_LEGACY_STORE) {
    new GuardedResultAsyncTask<Boolean>(mContext) {
      @Override
      protected Boolean doInBackgroundGuarded() {
        getCookieManager().removeAllCookie();
        mCookieSaver.onCookiesModified();
        return true;
      }

      @Override
      protected void onPostExecuteGuarded(Boolean result) {
        callback.invoke(result);
      }
    }.execute();
  } else {
    clearCookiesAsync(callback);
  }
}
项目:react-native-box-loaders    文件:ForwardingCookieHandler.java   
public void clearCookies(final Callback callback) {
  if (USES_LEGACY_STORE) {
    new GuardedResultAsyncTask<Boolean>(mContext) {
      @Override
      protected Boolean doInBackgroundGuarded() {
        getCookieManager().removeAllCookie();
        mCookieSaver.onCookiesModified();
        return true;
      }

      @Override
      protected void onPostExecuteGuarded(Boolean result) {
        callback.invoke(result);
      }
    }.execute();
  } else {
    clearCookiesAsync(callback);
  }
}
项目:Ironman    文件:ForwardingCookieHandler.java   
public void clearCookies(final Callback callback) {
  if (USES_LEGACY_STORE) {
    new GuardedResultAsyncTask<Boolean>(mContext) {
      @Override
      protected Boolean doInBackgroundGuarded() {
        getCookieManager().removeAllCookie();
        mCookieSaver.onCookiesModified();
        return true;
      }

      @Override
      protected void onPostExecuteGuarded(Boolean result) {
        callback.invoke(result);
      }
    }.execute();
  } else {
    clearCookiesAsync(callback);
  }
}