四虎影院 v4.1.6版本的 MD5 值为:3c86dc44d368396917a29935d39af88b
以下内容为反编译后的 AccountSettingActivity.java 源代码,内容仅作参考
package cn.luckxy.vod.ui.account;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.fragment.app.FragmentActivity;
import cn.luckxy.vod.base.BaseActivity;
import cn.luckxy.vod.bean.ChangeAvatorBean;
import cn.luckxy.vod.bean.LoginBean;
import cn.luckxy.vod.bean.LogoutBean;
import cn.luckxy.vod.bean.UserInfoBean;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.luck.picture.lib.PictureSelector;
import com.luck.picture.lib.config.PictureConfig;
import com.luck.picture.lib.config.PictureMimeType;
import com.luck.picture.lib.entity.LocalMedia;
import com.movie.all.R;
import g.a.b.netservice.VodService;
import g.a.b.utils.UserUtils;
import g.a.b.utils.j;
import gdut.bsx.share2.ShareContentType;
import h.a.a.p.q.c.l;
import h.a.a.t.h;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import kotlin.Metadata;
import kotlin.v1.internal.i0;
import master.flame.danmaku.danmaku.parser.IDataSource;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import org.greenrobot.eventbus.EventBus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\u0003\u001a\u00020\u0004H\u0014J\b\u0010\u0005\u001a\u00020\u0006H\u0014J\b\u0010\u0007\u001a\u00020\u0006H\u0014J\b\u0010\b\u001a\u00020\u0006H\u0002J\"\u0010\t\u001a\u00020\u00062\u0006\u0010\n\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\u00042\b\u0010\f\u001a\u0004\u0018\u00010\rH\u0014J\b\u0010\u000e\u001a\u00020\u0006H\u0002J\u0010\u0010\u000f\u001a\u00020\u00062\u0006\u0010\u0010\u001a\u00020\u0011H\u0002¨\u0006\u0012"}, d2 = {"Lcn/luckxy/vod/ui/account/AccountSettingActivity;", "Lcn/luckxy/vod/base/BaseActivity;", "()V", "getLayoutResID", "", "initListener", "", "initView", "logout", "onActivityResult", "requestCode", "resultCode", "data", "Landroid/content/Intent;", "openAlbum", "uploadImage", "imagePath", "", "app_release"}, k = 1, mv = {1, 1, 15})
public final class AccountSettingActivity extends BaseActivity {
public HashMap f3208f;
public static final class a implements View.OnClickListener {
public a() {
}
@Override
public final void onClick(View view) {
AccountSettingActivity.this.finish();
}
}
public static final class b implements View.OnClickListener {
public b() {
}
@Override
public final void onClick(View view) {
AccountSettingActivity.this.j();
}
}
public static final class c implements View.OnClickListener {
public static final c a = new c();
@Override
public final void onClick(View view) {
ActivityUtils.startActivity((Class<? extends Activity>) ChangeNicknameActivity.class);
}
}
public static final class d implements View.OnClickListener {
public d() {
}
@Override
public final void onClick(View view) {
AccountSettingActivity.this.i();
}
}
public static final class e extends h.e.a.a.a.b.d.b<String> {
public e(Context context) {
super(context, 0, false, false, 14, null);
}
@Override
public void a(@NotNull h.e.a.a.a.exception.d dVar) {
i0.f(dVar, "e");
}
@Override
public void a(@NotNull String str) {
i0.f(str, "data");
UserUtils.e();
EventBus.getDefault().post(new LogoutBean());
AccountSettingActivity.this.finish();
}
}
public static final class f extends h.e.a.a.a.b.d.b<ChangeAvatorBean> {
public final File f3211g;
public f(File file, Context context) {
super(context, 0, false, false, 14, null);
this.f3211g = file;
}
@Override
public void a(@NotNull h.e.a.a.a.exception.d dVar) {
i0.f(dVar, "e");
}
@Override
public void a(@NotNull ChangeAvatorBean changeAvatorBean) {
i0.f(changeAvatorBean, "data");
ToastUtils.showShort(R.string.change_avator_success);
EventBus.getDefault().post(new LoginBean());
ImageView imageView = (ImageView) AccountSettingActivity.this.a(cn.luckxy.vod.R.id.ivAvatar);
i0.a((Object) imageView, "ivAvatar");
imageView.setVisibility(0);
h.a.a.c.a((FragmentActivity) AccountSettingActivity.this.e()).a(this.f3211g).a((h.a.a.t.a<?>) h.c(new l())).a((ImageView) AccountSettingActivity.this.a(cn.luckxy.vod.R.id.ivAvatar));
}
}
private final void c(String str) {
File file = new File(str);
MultipartBody.c a2 = MultipartBody.c.f17338c.a(IDataSource.SCHEME_FILE_TAG, file.getName(), RequestBody.INSTANCE.a(MediaType.f17322i.d(ShareContentType.IMAGE), file));
VodService vodService = (VodService) j.INSTANCE.a(VodService.class);
if (g.a.b.utils.a.a(vodService)) {
return;
}
h.e.a.a.a.b.a.a(this, vodService.a(a2), new f(file, this));
}
public final void i() {
VodService vodService = (VodService) j.INSTANCE.a(VodService.class);
if (g.a.b.utils.a.a(vodService)) {
return;
}
h.e.a.a.a.b.a.a(this, vodService.d(), new e(this));
}
public final void j() {
PictureSelector.create(e()).openGallery(PictureMimeType.ofImage()).theme(2131755550).maxSelectNum(1).minSelectNum(1).imageSpanCount(4).selectionMode(1).previewImage(true).isCamera(true).isZoomAnim(true).enableCrop(true).compress(false).synOrAsy(true).glideOverride(160, 160).withAspectRatio(1, 1).hideBottomControls(false).isGif(false).freeStyleCropEnabled(true).circleDimmedLayer(true).showCropFrame(true).showCropGrid(false).openClickSound(false).previewEggs(false).minimumCompressSize(100).forResult(PictureConfig.CHOOSE_REQUEST);
}
@Override
public View a(int i2) {
if (this.f3208f == null) {
this.f3208f = new HashMap();
}
View view = (View) this.f3208f.get(Integer.valueOf(i2));
if (view != null) {
return view;
}
View findViewById = findViewById(i2);
this.f3208f.put(Integer.valueOf(i2), findViewById);
return findViewById;
}
@Override
public void b() {
HashMap hashMap = this.f3208f;
if (hashMap != null) {
hashMap.clear();
}
}
@Override
public int d() {
return R.layout.activity_account_setting;
}
@Override
public void f() {
super.f();
((RelativeLayout) a(cn.luckxy.vod.R.id.rlBack)).setOnClickListener(new a());
((LinearLayout) a(cn.luckxy.vod.R.id.tvChangeAvator)).setOnClickListener(new b());
((TextView) a(cn.luckxy.vod.R.id.tvChangeNickname)).setOnClickListener(c.a);
((TextView) a(cn.luckxy.vod.R.id.tvLogout)).setOnClickListener(new d());
}
@Override
public void g() {
super.g();
UserInfoBean c2 = UserUtils.c();
String B = c2 != null ? c2.B() : null;
if (B == null || B.length() == 0) {
ImageView imageView = (ImageView) a(cn.luckxy.vod.R.id.ivAvatar);
i0.a((Object) imageView, "ivAvatar");
imageView.setVisibility(8);
return;
}
ImageView imageView2 = (ImageView) a(cn.luckxy.vod.R.id.ivAvatar);
i0.a((Object) imageView2, "ivAvatar");
imageView2.setVisibility(0);
i0.a((Object) h.a.a.c.a((FragmentActivity) e()).load("https://cjt521.com/" + B).a((h.a.a.t.a<?>) h.c(new l())).a((ImageView) a(cn.luckxy.vod.R.id.ivAvatar)), "Glide.with(mActivity)\n … .into(ivAvatar)");
}
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == -1 && requestCode == 188) {
List<LocalMedia> obtainMultipleResult = PictureSelector.obtainMultipleResult(data);
if (obtainMultipleResult.size() >= 1) {
LocalMedia localMedia = obtainMultipleResult.get(0);
i0.a((Object) localMedia, "localMedia");
if (localMedia.isCut()) {
String cutPath = localMedia.getCutPath();
i0.a((Object) cutPath, "localMedia.cutPath");
c(cutPath);
} else {
String path = localMedia.getPath();
i0.a((Object) path, "localMedia.path");
c(path);
}
}
}
}
}