花瓣 v4.6.12版本的 MD5 值为:6a3515d4d16d98931f1b3d25a91b257e
以下内容为反编译后的 f.java 源代码,内容仅作参考
package com.huaban.android.vendors;
import android.net.Uri;
import androidx.annotation.DrawableRes;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilder;
import com.facebook.drawee.generic.GenericDraweeHierarchy;
import com.facebook.drawee.view.DraweeView;
import com.facebook.imagepipeline.common.ResizeOptions;
import com.facebook.imagepipeline.listener.RequestListener;
import com.facebook.imagepipeline.request.ImageRequest;
import com.facebook.imagepipeline.request.ImageRequestBuilder;
import com.huaban.android.R;
import kotlin.x2.w.k0;
public final class f {
@h.c.a.d
public static final String a(@h.c.a.d String str, @h.c.a.d String str2) {
k0.p(str, "bucketName");
k0.p(str2, "bucketKey");
String c = com.huaban.android.h.c.c.c(str);
return c + '/' + str2;
}
@h.c.a.d
public static final String b(int i2, boolean z, @h.c.a.d String str, @h.c.a.d String str2, boolean z2, boolean z3) {
k0.p(str, "key");
k0.p(str2, "bucket");
StringBuilder sb = new StringBuilder();
sb.append(z ? "sq" : "fw");
sb.append(i2);
String sb2 = sb.toString();
String d2 = com.huaban.android.h.c.c.d();
if (i2 == Integer.MAX_VALUE) {
return d2 + '/' + str;
}
return d2 + '/' + str + "_" + sb2;
}
public static final void d(@h.c.a.d DraweeView<GenericDraweeHierarchy> draweeView, @h.c.a.e String str, @h.c.a.e RequestListener requestListener) {
k0.p(draweeView, "$this$loadAdUrl");
if (str == null || str.length() == 0) {
return;
}
draweeView.setController(Fresco.newDraweeControllerBuilder().setImageRequest(ImageRequestBuilder.newBuilderWithSource(Uri.parse(str)).setRequestListener(requestListener).build()).setAutoPlayAnimations(true).setOldController(draweeView.getController()).build());
}
public static final void e(@h.c.a.d DraweeView<GenericDraweeHierarchy> draweeView, long j) {
k0.p(draweeView, "$this$loadJobIconImage");
j(draweeView, "https://hbfile.huaban.com/img/jobs/mobile/" + j + ".png", null, null, 6, null);
}
public static final void f(@h.c.a.d DraweeView<GenericDraweeHierarchy> draweeView, @h.c.a.d String str) {
k0.p(draweeView, "$this$loadLocalImage");
k0.p(str, "url");
j(draweeView, "file://" + str, null, null, 6, null);
}
public static final void g(@h.c.a.d DraweeView<GenericDraweeHierarchy> draweeView) {
k0.p(draweeView, "$this$loadPlaceHolderImage");
h(draweeView, R.drawable.bg_image_place_holder);
}
public static final void h(@h.c.a.d DraweeView<GenericDraweeHierarchy> draweeView, @DrawableRes int i2) {
k0.p(draweeView, "$this$loadRes");
j(draweeView, "res:/" + i2, null, null, 6, null);
}
public static final void i(@h.c.a.d DraweeView<GenericDraweeHierarchy> draweeView, @h.c.a.e String str, @h.c.a.e ResizeOptions resizeOptions, @h.c.a.e String str2) {
k0.p(draweeView, "$this$loadUrl");
if (str == null || str.length() == 0) {
return;
}
ImageRequestBuilder newBuilderWithSource = ImageRequestBuilder.newBuilderWithSource(Uri.parse(str));
if (resizeOptions != null) {
k0.o(newBuilderWithSource, "requestBuilder");
newBuilderWithSource.setResizeOptions(resizeOptions);
}
PipelineDraweeControllerBuilder oldController = Fresco.newDraweeControllerBuilder().setImageRequest(newBuilderWithSource.build()).setAutoPlayAnimations(true).setOldController(draweeView.getController());
if (str2 != null) {
k0.o(oldController, "controllerBuilder");
oldController.setLowResImageRequest(ImageRequest.fromUri(Uri.parse(str2)));
}
draweeView.setController(oldController.build());
}
public static void j(DraweeView draweeView, String str, ResizeOptions resizeOptions, String str2, int i2, Object obj) {
if ((i2 & 2) != 0) {
resizeOptions = null;
}
if ((i2 & 4) != 0) {
str2 = null;
}
i(draweeView, str, resizeOptions, str2);
}
}