/** Builds a new {@link GlideExecutor} with any previously specified options. */publicGlideExecutorbuild(){if(TextUtils.isEmpty(name)){thrownewIllegalArgumentException("Name must be non-null and non-empty, but given: "+name);}ThreadPoolExecutorexecutor=newThreadPoolExecutor(corePoolSize,maximum...
throw new IllegalArgumentException( "Name must be non-null and non-empty, but given: " + name); } ThreadPoolExecutor executor = new ThreadPoolExecutor( corePoolSize, maximumPoolSize, /*keepAliveTime=*/ threadTimeoutMillis, TimeUnit.MILLISECONDS, new PriorityBlockingQueue<Runnable>(), new Defa...
into(target, null); } //分流程5 public void into(ImageView target, Callback callback) { long started = System.nanoTime(); //检查当前操作是否在UI线程,如果不在,抛出异常 checkMain(); //检查当前要显示的视图控件是否为null if (target == null) { throw new IllegalArgumentException("Target m...
class.isAssignableFrom(clazz)) { return (Target<Z>) new DrawableImageViewTarget(view); } else { throw new IllegalArgumentException(""); } } buildTarget()方法中会根据传入的class参数来构建不同的Target对象。默认情况下DrawableTypeRequest在构造函数调用super()方法中向父类中的transcodeClass变量传递...
@NonNullpublicRequestManagerget(@NonNull Context context){if(context==null){thrownewIllegalArgumentException("You cannot start a load on a null Context");}elseif(Util.isOnMainThread()&&!(contextinstanceofApplication)){if(contextinstanceofFragmentActivity){returnget((FragmentActivity)context);}elseif...
// Context could be null for other reasons (ie the user passes in null), but in practice it will // only occur due to errors with the Fragmentlifecycle. Preconditions.checkNotNull( context, "You cannot start a load on a not yet attached View or a Fragment where getActivity() " ...
isModelSet) { throw new IllegalArgumentException("You must first set a model (try #load())"); } Request previous = target.getRequest(); if (previous != null) { previous.clear(); requestTracker.removeRequest(previous); previous.recycle(); } //看看它是怎么生成我们request请求 Request ...
= null && streamModelLoader == null && fileDescriptorModelLoader == null) { throw new IllegalArgumentException("Unknown type " + modelClass + ". You must provide a Model of a type for" + " which there is a registered ModelLoader, if you are using a custom model, you must first call"...
I don't want to do this in the main thread, but the into line will report java.lang.IllegalArgumentException: You must call this method on the main thread. I can't find an alternative method? How can I not convert the stream to an array in the main thread? And it’s Glide because...
Preconditions.checkNotNull(target);if(!isModelSet) {thrownewIllegalArgumentException("You must call #load() before calling #into()"); }Requestprevious=target.getRequest();if(previous !=null) { requestManager.clear(target); } requestOptions.lock();Requestrequest=buildRequest(target); ...