Java 类com.bumptech.glide.util.Synthetic 实例源码

项目:GitHub    文件:EngineJob.java   
@Synthetic
void handleExceptionOnMainThread() {
  stateVerifier.throwIfRecycled();
  if (isCancelled) {
    release(false /*isRemovedFromQueue*/);
    return;
  } else if (cbs.isEmpty()) {
    throw new IllegalStateException("Received an exception without any callbacks to notify");
  } else if (hasLoadFailed) {
    throw new IllegalStateException("Already failed once");
  }
  hasLoadFailed = true;

  listener.onEngineJobComplete(key, null);

  for (ResourceCallback cb : cbs) {
    if (!isInIgnoredCallbacks(cb)) {
      cb.onLoadFailed(exception);
    }
  }

  release(false /*isRemovedFromQueue*/);
}
项目:GitHub    文件:EngineJob.java   
@Synthetic
void handleExceptionOnMainThread() {
  stateVerifier.throwIfRecycled();
  if (isCancelled) {
    release(false /*isRemovedFromQueue*/);
    return;
  } else if (cbs.isEmpty()) {
    throw new IllegalStateException("Received an exception without any callbacks to notify");
  } else if (hasLoadFailed) {
    throw new IllegalStateException("Already failed once");
  }
  hasLoadFailed = true;

  listener.onEngineJobComplete(key, null);

  for (ResourceCallback cb : cbs) {
    if (!isInIgnoredCallbacks(cb)) {
      cb.onLoadFailed(exception);
    }
  }

  release(false /*isRemovedFromQueue*/);
}
项目:GitHub    文件:ViewTarget.java   
@Synthetic
void checkCurrentDimens() {
  if (cbs.isEmpty()) {
    return;
  }

  int currentWidth = getTargetWidth();
  int currentHeight = getTargetHeight();
  if (!isViewStateAndSizeValid(currentWidth, currentHeight)) {
    return;
  }

  notifyCbs(currentWidth, currentHeight);
  clearCallbacksAndListener();
}
项目:GitHub    文件:DefaultConnectivityMonitor.java   
@Synthetic
boolean isConnected(Context context) {
  ConnectivityManager connectivityManager =
      (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
  NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
  return networkInfo != null && networkInfo.isConnected();
}
项目:GitHub    文件:EngineJob.java   
@Synthetic
void handleResultOnMainThread() {
  stateVerifier.throwIfRecycled();
  if (isCancelled) {
    resource.recycle();
    release(false /*isRemovedFromQueue*/);
    return;
  } else if (cbs.isEmpty()) {
    throw new IllegalStateException("Received a resource without any callbacks to notify");
  } else if (hasResource) {
    throw new IllegalStateException("Already have resource");
  }
  engineResource = engineResourceFactory.build(resource, isCacheable);
  hasResource = true;

  // Hold on to resource for duration of request so we don't recycle it in the middle of
  // notifying if it synchronously released by one of the callbacks.
  engineResource.acquire();
  listener.onEngineJobComplete(key, engineResource);

  for (ResourceCallback cb : cbs) {
    if (!isInIgnoredCallbacks(cb)) {
      engineResource.acquire();
      cb.onResourceReady(engineResource, dataSource);
    }
  }
  // Our request is complete, so we can release the resource.
  engineResource.release();

  release(false /*isRemovedFromQueue*/);
}
项目:GitHub    文件:EngineJob.java   
@Synthetic
void handleCancelledOnMainThread() {
  stateVerifier.throwIfRecycled();
  if (!isCancelled) {
    throw new IllegalStateException("Not cancelled");
  }
  listener.onEngineJobCancelled(this, key);
  release(false /*isRemovedFromQueue*/);
}
项目:GitHub    文件:ViewTarget.java   
@Synthetic
void checkCurrentDimens() {
  if (cbs.isEmpty()) {
    return;
  }

  int currentWidth = getTargetWidth();
  int currentHeight = getTargetHeight();
  if (!isViewStateAndSizeValid(currentWidth, currentHeight)) {
    return;
  }

  notifyCbs(currentWidth, currentHeight);
  clearCallbacksAndListener();
}
项目:GitHub    文件:DefaultConnectivityMonitor.java   
@SuppressWarnings("WeakerAccess")
@Synthetic
// Permissions are checked in the factory instead.
@SuppressLint("MissingPermission")
boolean isConnected(Context context) {
  ConnectivityManager connectivityManager =
      (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
  NetworkInfo networkInfo =
      Preconditions.checkNotNull(connectivityManager).getActiveNetworkInfo();
  return networkInfo != null && networkInfo.isConnected();
}
项目:GitHub    文件:EngineJob.java   
@Synthetic
void handleResultOnMainThread() {
  stateVerifier.throwIfRecycled();
  if (isCancelled) {
    resource.recycle();
    release(false /*isRemovedFromQueue*/);
    return;
  } else if (cbs.isEmpty()) {
    throw new IllegalStateException("Received a resource without any callbacks to notify");
  } else if (hasResource) {
    throw new IllegalStateException("Already have resource");
  }
  engineResource = engineResourceFactory.build(resource, isCacheable);
  hasResource = true;

  // Hold on to resource for duration of request so we don't recycle it in the middle of
  // notifying if it synchronously released by one of the callbacks.
  engineResource.acquire();
  listener.onEngineJobComplete(key, engineResource);

  int size = cbs.size();
  for (int i = 0; i < size; i++) {
    ResourceCallback cb = cbs.get(i);
    if (!isInIgnoredCallbacks(cb)) {
      engineResource.acquire();
      cb.onResourceReady(engineResource, dataSource);
    }
  }
  // Our request is complete, so we can release the resource.
  engineResource.release();

  release(false /*isRemovedFromQueue*/);
}
项目:GitHub    文件:EngineJob.java   
@Synthetic
void handleCancelledOnMainThread() {
  stateVerifier.throwIfRecycled();
  if (!isCancelled) {
    throw new IllegalStateException("Not cancelled");
  }
  listener.onEngineJobCancelled(this, key);
  release(false /*isRemovedFromQueue*/);
}
项目:GitHub    文件:ActiveResources.java   
@Synthetic
@SuppressWarnings("WeakerAccess")
ResourceWeakReference(
    Key key, EngineResource<?> r, ReferenceQueue<? super EngineResource<?>> q) {
  super(r, q);
  this.key = Preconditions.checkNotNull(key);
  this.resource = Preconditions.checkNotNull(r.getResource());
  isCacheable = r.isCacheable();
}
项目:GitHub    文件:SingleRequest.java   
@Synthetic
SingleRequest() {
  // just create, instances are reused with recycle/init
}
项目:GitHub    文件:RequestManagerFragment.java   
@Synthetic
FragmentRequestManagerTreeNode() { }
项目:GitHub    文件:SupportRequestManagerFragment.java   
@Synthetic
SupportFragmentRequestManagerTreeNode() { }
项目:GitHub    文件:GifFrameLoader.java   
@Synthetic
FrameLoaderCallback() { }
项目:GitHub    文件:TransformationUtils.java   
@Synthetic
NoLock() { }
项目:GitHub    文件:DownsampleStrategy.java   
@Synthetic
FitCenter() { }
项目:GitHub    文件:DownsampleStrategy.java   
@Synthetic
CenterOutside() { }
项目:GitHub    文件:DownsampleStrategy.java   
@Synthetic
AtLeast() { }
项目:GitHub    文件:DownsampleStrategy.java   
@Synthetic
AtMost() { }
项目:GitHub    文件:DownsampleStrategy.java   
@Synthetic
None() { }
项目:GitHub    文件:DownsampleStrategy.java   
@Synthetic
CenterInside() { }
项目:GitHub    文件:HttpUrlFetcher.java   
@Synthetic
DefaultHttpUrlConnectionFactory() { }
项目:GitHub    文件:BitmapPreFillRunner.java   
@Synthetic
UniqueKey() { }
项目:GitHub    文件:LockedResource.java   
@Synthetic
LockedResource() { }
项目:GitHub    文件:SizeConfigStrategy.java   
@Synthetic
static String getBitmapString(int size, Bitmap.Config config) {
  return "[" + size + "](" + config + ")";
}
项目:GitHub    文件:LruArrayPool.java   
@Synthetic
KeyPool() { }
项目:GitHub    文件:SizeStrategy.java   
@Synthetic
static String getBitmapString(int size) {
  return "[" + size + "]";
}
项目:GitHub    文件:LruBitmapPool.java   
@Synthetic
NullBitmapTracker() { }
项目:GitHub    文件:AttributeStrategy.java   
@Synthetic
static String getBitmapString(int width, int height, Bitmap.Config config) {
  return "[" + width + "x" + height + "], " + config;
}
项目:GitHub    文件:ResourceRecycler.java   
@Synthetic
ResourceRecyclerCallback() { }
项目:GitHub    文件:EngineJob.java   
@Synthetic
MainThreadCallback() { }
项目:GitHub    文件:DecodeJob.java   
@Synthetic
DecodeCallback(DataSource dataSource) {
  this.dataSource = dataSource;
}
项目:GitHub    文件:DecodeJob.java   
@Synthetic
ReleaseManager() { }
项目:GitHub    文件:DecodeJob.java   
@Synthetic
DeferredEncodeManager() { }
项目:GitHub    文件:DiskCacheWriteLocker.java   
@Synthetic
WriteLock() { }
项目:GitHub    文件:DiskCacheWriteLocker.java   
@Synthetic
WriteLockPool() { }
项目:GitHub    文件:ModelLoaderRegistry.java   
@Synthetic
ModelLoaderCache() { }
项目:GitHub    文件:MultiModelLoaderFactory.java   
@Synthetic
EmptyModelLoader() { }
项目:GitHub    文件:ResourceEncoderRegistry.java   
@Synthetic
boolean handles(Class<?> resourceClass) {
  return this.resourceClass.isAssignableFrom(resourceClass);
}