导航菜单

页面标题

页面副标题

SpinDisplay v2.0.2.6 - EditMediaActivity.java 源代码

正在查看: SpinDisplay v2.0.2.6 应用的 EditMediaActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.dmz.f20ad.activity;

import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import androidx.fragment.app.Fragment;
import b.b.k.l;
import b.u.y;
import butterknife.ButterKnife;
import com.dmz.f20ad.App;
import com.dmz.f20ad.activity.EditMediaActivity;
import com.dmz.f20ad.connect.UdpService;
import com.dmz.f20ad.model.MediaFile;
import com.dmz.f20ad.view.PaintView;
import d.a.a.f;
import d.e.a.n.s2;
import d.e.a.p.n0;
import d.e.a.p.p0;
import g.a.e;
import g.a.f;
import g.a.g;
import g.a.j;
import g.a.q.e.b.d;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import l.a.a.m;
import me.zhanghai.android.materialprogressbar.BuildConfig;
import org.greenrobot.eventbus.ThreadMode;

public class EditMediaActivity extends l {
    public static LinkedList<PaintView.a> z = new LinkedList<>();
    public Button mSend;
    public Fragment s;
    public g.a.n.b t;
    public String[] u;
    public String v;
    public List<String> w = new ArrayList();
    public MediaFile x;
    public d.e.a.a y;

    public interface b {
    }

    public interface c {
        MediaFile a(String str);
    }

    public void a(int i2, Uri uri, f fVar) {
        if (i2 == -1 && Build.VERSION.SDK_INT >= 29) {
            runOnUiThread(new s2(this));
            this.v = y.a(uri);
        }
        ((d.a) fVar).c();
    }

    public void a(d.a.a.f fVar, d.a.a.b bVar) {
        this.f75f.a();
    }

    public void doClick(View view) {
        if (view.getId() != 2131296345) {
            return;
        }
        onBackPressed();
    }

    @Override
    public void onBackPressed() {
        f.b bVar = new f.b(this);
        bVar.a(2131755192);
        bVar.c(2131755081);
        bVar.b(2131755041);
        bVar.A = new f.k() {
            @Override
            public final void a(d.a.a.f fVar, d.a.a.b bVar2) {
                EditMediaActivity.this.a(fVar, bVar2);
            }
        };
        bVar.b();
    }

    @m(threadMode = ThreadMode.MAIN)
    public void onBusEvent(p0 p0Var) {
        String str = p0Var.f5197a;
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        getWindow().addFlags(128);
        setContentView(2131492896);
        ButterKnife.a(this);
        if (bundle != null) {
            return;
        }
        this.u = getIntent().getStringArrayExtra("com.dmz.f20ad.extra.devices");
        String stringExtra = getIntent().getStringExtra("com.3ddisplay.extra.MEDIA_NAME");
        final int intExtra = getIntent().getIntExtra("com.f20ad.extra.MEDIA_TYPE", -1);
        int intExtra2 = getIntent().getIntExtra("com.f20ad.extra.MEDIA_FRAMES", 0);
        this.v = getIntent().getStringExtra("com.3ddisplay.extra.MEDIA_PATH");
        String stringExtra2 = getIntent().getStringExtra("com.3display.extra.DEVICE_ADDRESS");
        final Uri data = getIntent().getData();
        if (data == null) {
            y.e(2131755198);
            finish();
            return;
        }
        e.a(new g() {
            @Override
            public final void a(g.a.f fVar) {
                EditMediaActivity.this.a(intExtra, data, fVar);
            }
        }).b(g.a.s.b.b()).a(g.a.m.b.a.a()).a(new a(intExtra, data, stringExtra, stringExtra2, intExtra2));
        l.a.a.c.c().b(this);
        try {
            y.b(new File(String.format("%s/%s/", App.f2838g.d(), "clipvideo")));
            y.b(new File(String.format("%s/%s/", App.f2838g.d(), "clipimage")));
        } catch (Exception e2) {
            StringBuilder a2 = d.b.a.a.a.a("onCreate: ");
            a2.append(e2.getMessage());
            Log.d("wyt123", a2.toString());
        }
        for (String str : this.u) {
            n0 n0Var = UdpService.f3079f.get(str);
            n0Var.B = false;
            n0Var.A = 0;
            n0Var.z = null;
            n0Var.t = 0;
            for (d.e.a.t.e eVar : n0Var.p) {
                if (!this.w.contains(eVar.f5353a)) {
                    this.w.add(eVar.f5353a);
                }
            }
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        l.a.a.c.c().c(this);
        g.a.n.b bVar = this.t;
        if (bVar != null) {
            bVar.a();
        }
    }

    @Override
    public void onResume() {
        super.onResume();
        File a2 = App.f2838g.a();
        if (!a2.exists()) {
            a2.mkdirs();
        }
        y.a(a2);
    }

    public void w() {
        d.e.a.a aVar = this.y;
        if (aVar != null) {
            aVar.dismiss();
            this.y = null;
        }
    }

    public void x() {
        if (this.y == null) {
            this.y = new d.e.a.a(this, 2131492936, new int[0]);
            this.y.setCancelable(false);
        }
        this.y.show();
    }

    public class a implements j<Integer> {

        public final int f2914b;

        public final Uri f2915c;

        public final String f2916d;

        public final String f2917e;

        public final int f2918f;

        public a(int i2, Uri uri, String str, String str2, int i3) {
            this.f2914b = i2;
            this.f2915c = uri;
            this.f2916d = str;
            this.f2917e = str2;
            this.f2918f = i3;
        }

        public void a(d.a.a.f fVar, d.a.a.b bVar) {
            String obj = ((EditText) fVar.f3751d.s.findViewById(2131296618)).getText().toString();
            try {
                if (obj.getBytes("UTF-8").length > 40) {
                    y.e(2131755168);
                } else if (obj.equals(BuildConfig.FLAVOR)) {
                    y.e(2131755166);
                } else if (EditMediaActivity.this.w.contains(obj)) {
                    y.d(EditMediaActivity.this.getString(2131755167, new Object[]{obj}));
                } else {
                    fVar.dismiss();
                    App.f2843l = false;
                    EditMediaActivity.this.x = ((c) EditMediaActivity.this.s).a(obj);
                    Bundle bundle = new Bundle();
                    bundle.putStringArray("sendkeys", EditMediaActivity.this.u);
                    bundle.putParcelable("sendfile", EditMediaActivity.this.x);
                    EditMediaActivity.this.setResult(-1, EditMediaActivity.this.getIntent().putExtras(bundle));
                    EditMediaActivity.this.finish();
                }
            } catch (UnsupportedEncodingException e2) {
                e2.printStackTrace();
            }
        }

        @Override
        public void a(g.a.n.b bVar) {
        }

        @Override
        public void a(Integer num) {
        }

        @Override
        public void a(Throwable th) {
            EditMediaActivity.this.w();
            y.f(2131755354);
        }

        @Override
        public void c() {
            throw new UnsupportedOperationException("Method not decompiled: com.dmz.f20ad.activity.EditMediaActivity.a.c():void");
        }

        public void a(String str, Boolean bool) {
            if (EditMediaActivity.this.v.contains(" ")) {
                y.f(2131755194);
                return;
            }
            f.b bVar = new f.b(EditMediaActivity.this);
            bVar.d(2131755193);
            bVar.a(2131492930, true);
            bVar.R = false;
            bVar.c(2131755081);
            bVar.b(2131755041);
            bVar.B = new f.k() {
                @Override
                public final void a(d.a.a.f fVar, d.a.a.b bVar2) {
                    fVar.dismiss();
                }
            };
            bVar.A = new f.k() {
                @Override
                public final void a(d.a.a.f fVar, d.a.a.b bVar2) {
                    EditMediaActivity.a.this.a(fVar, bVar2);
                }
            };
            d.a.a.f fVar = new d.a.a.f(bVar);
            EditText editText = (EditText) fVar.f3751d.s.findViewById(2131296618);
            if (str.isEmpty()) {
                StringBuilder a2 = d.b.a.a.a.a("MD_");
                a2.append(d.e.a.u.a.a());
                str = a2.toString();
            }
            editText.setText(str);
            fVar.show();
        }
    }
}