BuzzCast Porno v1.0.0.0版本的 MD5 值为:74d6ef6b6062f3b4dab5598ca2751841

以下内容为反编译后的 FileManagerLayout.java 源代码,内容仅作参考


package com.uc.filemanager;

import android.app.Dialog;
import android.content.Context;
import android.graphics.Point;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.support.compat.R;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.uc.browser.ActivityBrowser;
import com.uc.browser.UCTitleBar;
import com.uc.browser.ei;
import java.io.File;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Vector;
public class FileManagerLayout extends RelativeLayout implements AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener, com.uc.widget.g, sn, so, tu {
    Handler f3213a;
    private AdapterView f3214b;
    private a f3215c;
    private RelativeLayout f3216d;
    private File f3217e;
    private d f;
    private Vector g;
    private int h;
    private UCTitleBar i;
    private ImageView j;
    private View k;
    private Point l;
    private x m;
    private TextView n;
    private ei o;
    private sl p;
    private sm q;
    private Dialog r;
    private TextView s;
    private Runnable t;
    private Handler u;

    public FileManagerLayout(Context context) {
        super(context);
        this.h = 0;
        this.l = new Point();
        this.o = new ei(getContext());
        this.f3213a = new m(this);
        this.r = null;
        this.t = new n(this);
        e();
    }

    public FileManagerLayout(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.h = 0;
        this.l = new Point();
        this.o = new ei(getContext());
        this.f3213a = new m(this);
        this.r = null;
        this.t = new n(this);
        e();
    }

    public static Dialog a(FileManagerLayout fileManagerLayout, Context context) {
        LayoutInflater from = LayoutInflater.from(context);
        uh uhVar = new uh(context);
        View inflate = from.inflate(R.dimen.f, (ViewGroup) null);
        com.google.android.c2dm.a.a(inflate, 10069);
        TextView textView = (TextView) inflate.findViewById(2131165276);
        textView.setText(tt.b().a(555));
        tt.b();
        textView.setTextColor(tt.f(76));
        uhVar.setTitle(tt.b().a(176));
        uhVar.a(inflate);
        uhVar.b(18, new h(fileManagerLayout, (EditText) inflate.findViewById(2131165277), context));
        uhVar.a(17, new i());
        return uhVar;
    }

    public static void c(FileManagerLayout fileManagerLayout) {
        if (fileManagerLayout.n == null) {
            fileManagerLayout.n = new TextView(fileManagerLayout.getContext());
            fileManagerLayout.n.setBackgroundDrawable(tt.b().d(10116));
            TextView textView = fileManagerLayout.n;
            tt.b();
            textView.setTextColor(tt.f(163));
            fileManagerLayout.n.setTextSize(10.667f);
        }
        fileManagerLayout.n.setId(116);
        fileManagerLayout.n.setText(tt.b().a(116));
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);
        layoutParams.leftMargin = ks.a(fileManagerLayout.getContext(), 10.0f);
        np.a(fileManagerLayout.n);
        AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
        alphaAnimation.setDuration(150L);
        fileManagerLayout.n.setAnimation(alphaAnimation);
        fileManagerLayout.addView(fileManagerLayout.n, layoutParams);
        if (fileManagerLayout.n != null) {
            if (fileManagerLayout.u == null) {
                fileManagerLayout.u = new Handler();
            }
            fileManagerLayout.u.removeCallbacks(fileManagerLayout.t);
            fileManagerLayout.u.postDelayed(fileManagerLayout.t, 2000L);
        }
    }

    private void e() {
        this.f3216d = (RelativeLayout) LayoutInflater.from(getContext()).inflate(2130903079, (ViewGroup) null);
        addView(this.f3216d);
        this.s = (TextView) this.f3216d.findViewById(2131165461);
        this.s.setText(tt.b().a(316));
        this.i = (UCTitleBar) this.f3216d.findViewById(2131165472);
        this.i.setVisibility(8);
        this.i.setText(tt.b().a(315));
        this.i.setOnClickListener(new f(this));
        this.k = findViewById(2131165473);
        this.k.setBackgroundDrawable(tt.b().d(10292));
        this.j = (ImageView) this.k.findViewById(2131165474);
        this.j.setBackgroundDrawable(tt.b().d(10350));
        this.j.setImageDrawable(tt.b().d(10144));
        this.j.setOnClickListener(new o(this));
        this.j.setOnLongClickListener(new p(this));
        if (com.uc.platform.g.h().k()) {
            return;
        }
        g();
    }

    public static void f(FileManagerLayout fileManagerLayout) {
        if (fileManagerLayout.n != null) {
            fileManagerLayout.removeView(fileManagerLayout.n);
            fileManagerLayout.n = null;
        }
    }

    private void g() {
        if (this.f3214b != null) {
            this.f3216d.removeView(this.f3214b);
            this.f3214b = null;
        }
        this.j.setEnabled(false);
        this.s.setVisibility(0);
        this.s.bringToFront();
    }

    private boolean h() {
        File c2;
        if (this.f3215c == null || !com.uc.platform.g.h().k() || (c2 = this.f3215c.c()) == null) {
            return false;
        }
        String j = com.uc.platform.g.h().j();
        if (!pf.b(j) || j.equals(c2.getPath())) {
            return this.m != null && this.m.h();
        }
        File parentFile = c2.getParentFile();
        if (parentFile == null || !parentFile.exists()) {
            return false;
        }
        this.f3215c.a(parentFile);
        this.f3217e = parentFile;
        if (this.m != null) {
            this.m.a(this.f3217e);
        }
        return true;
    }

    public final void a() {
        if (tt.b() == null || this.s == null) {
            return;
        }
        if (ActivityBrowser.c()) {
            this.s.setTextColor(tt.f(202));
            this.s.setBackgroundColor(ViewCompat.MEASURED_STATE_MASK);
            return;
        }
        this.s.setTextColor(tt.f(202));
        this.s.setBackgroundColor(-1);
    }

    @Override
    public final void a(int i) {
        switch (i) {
            case 109:
                if (h()) {
                    return;
                }
                com.uc.browser.o.f();
                com.uc.browser.o.a_(nv.bm);
                return;
            case 116:
            default:
                return;
        }
    }

    public final boolean a(MenuItem menuItem) {
        int i = 0;
        switch (menuItem.getItemId()) {
            case 458753:
                if (this.g == null || this.g.size() <= 0) {
                    return true;
                }
                File file = (File) this.g.elementAt(0);
                File file2 = this.f.f3229b;
                if (file2 == null) {
                    file2 = this.f3215c.c();
                }
                switch (this.h) {
                    case 1:
                        if (file == null || !file.isDirectory() || !file2.getAbsolutePath().startsWith(file.getAbsolutePath())) {
                            new w(this, file, file2.getPath()).start();
                            this.f3215c.a(file2);
                            break;
                        } else {
                            Toast.makeText(getContext(), tt.b().a(144), 0).show();
                            break;
                        }
                    case 2:
                        if (file == null || !file.isDirectory() || !file2.getAbsolutePath().startsWith(file.getAbsolutePath())) {
                            if (file == null || !file.getParentFile().equals(file2)) {
                                byte b2 = com.uc.util.a.b(file, file2.getPath());
                                if (b2 == 2) {
                                    Context context = getContext();
                                    String path = file2.getPath();
                                    uh uhVar = new uh(context);
                                    uhVar.setTitle(tt.b().a(183));
                                    uhVar.a(tt.b().a(155));
                                    uhVar.b(194, new k(this, file, path));
                                    uhVar.a(193, new l());
                                    uhVar.show();
                                }
                                if (b2 == 0) {
                                    if (!file.getAbsolutePath().equals(file2.getPath() + "/" + file.getName())) {
                                        byte b3 = com.uc.util.a.b(file);
                                        if (b3 == 6) {
                                            Toast.makeText(getContext(), tt.b().a(319), 0).show();
                                        } else if (b3 == 7) {
                                            Toast.makeText(getContext(), tt.b().a(319), 0).show();
                                        }
                                    }
                                } else if (b2 == 7) {
                                    Toast.makeText(getContext(), tt.b().a(319), 0).show();
                                }
                                this.f3215c.a(file2);
                                break;
                            }
                        } else {
                            Toast.makeText(getContext(), tt.b().a(145), 0).show();
                            break;
                        }
                        break;
                    default:
                        this.f3215c.a(file2);
                        break;
                }
                this.g.clear();
                this.h = 0;
                return true;
            case 462849:
                lb.b("fm03");
                if (this.g == null) {
                    this.g = new Vector();
                }
                this.g.clear();
                if (this.f != null) {
                    this.g.add(this.f.f3229b);
                }
                this.h = 1;
                return true;
            case 462850:
                lb.b("fm04");
                if (this.g == null) {
                    this.g = new Vector();
                }
                this.g.clear();
                if (this.f != null) {
                    this.g.add(this.f.f3229b);
                }
                this.h = 2;
                return true;
            case 462851:
            case 462853:
                lb.b("fm05");
                Context context2 = getContext();
                LayoutInflater from = LayoutInflater.from(context2);
                uh uhVar2 = new uh(context2);
                uhVar2.setTitle(tt.b().a(181));
                uhVar2.a(tt.b().d(10081));
                View inflate = from.inflate(R.dimen.f, (ViewGroup) null);
                com.google.android.c2dm.a.a(inflate, 10069);
                TextView textView = (TextView) inflate.findViewById(2131165276);
                textView.setText(tt.b().a(555));
                tt.b();
                textView.setTextColor(tt.f(76));
                EditText editText = (EditText) inflate.findViewById(2131165277);
                File file3 = this.f.f3229b;
                uhVar2.a(inflate);
                if (this.f != null) {
                    editText.setText(this.f.f3229b.getName());
                    editText.setSelection(0, editText.length());
                }
                uhVar2.b(tt.b().a(194), new t(this, editText, context2, file3));
                uhVar2.a(tt.b().a(193), new u());
                uhVar2.show();
                if (com.uc.platform.f.i() <= 11) {
                    this.f3213a.sendEmptyMessageDelayed(4, 300L);
                    return true;
                }
                return true;
            case 462852:
            case 462854:
                lb.b("fm06");
                uh uhVar3 = new uh(getContext());
                tt b4 = tt.b();
                uhVar3.setTitle(b4.a(171));
                uhVar3.a(b4.d(10081));
                String a2 = b4.a(141);
                if (this.f != null && this.f.f3229b != null) {
                    a2 = (this.f.f3229b.isDirectory() ? b4.a(142) : b4.a(141)) + "\"" + this.f.f3229b.getName() + "\"?";
                }
                uhVar3.a(a2);
                uhVar3.b(194, new v(this));
                uhVar3.a(193, new g());
                uhVar3.show();
                return true;
            case 462855:
                lb.b("fm07");
                Context context3 = getContext();
                LayoutInflater from2 = LayoutInflater.from(context3);
                uh uhVar4 = new uh(context3);
                uhVar4.setTitle(tt.b().a(175));
                View inflate2 = from2.inflate(2130903077, (ViewGroup) null);
                com.google.android.c2dm.a.a(inflate2, 10069);
                TextView textView2 = (TextView) inflate2.findViewById(2131165463);
                tt.b();
                textView2.setTextColor(tt.f(76));
                textView2.setText(tt.b().a(148));
                tt.b();
                ((TextView) inflate2.findViewById(2131165464)).setTextColor(tt.f(76));
                TextView textView3 = (TextView) inflate2.findViewById(2131165465);
                tt.b();
                textView3.setTextColor(tt.f(76));
                textView3.setText(tt.b().a(152));
                tt.b();
                ((TextView) inflate2.findViewById(2131165466)).setTextColor(tt.f(76));
                TextView textView4 = (TextView) inflate2.findViewById(2131165467);
                tt.b();
                textView4.setTextColor(tt.f(76));
                textView4.setText(tt.b().a(149));
                tt.b();
                ((TextView) inflate2.findViewById(2131165468)).setTextColor(tt.f(76));
                uhVar4.a(inflate2);
                if (this.f != null && this.f.f3229b != null) {
                    TextView textView5 = (TextView) inflate2.findViewById(2131165468);
                    DecimalFormat decimalFormat = new DecimalFormat("0.##");
                    float a3 = com.uc.util.a.a(this.f.f3229b);
                    while (a3 > 1000.0f) {
                        a3 /= 1024.0f;
                        i++;
                    }
                    textView5.setText(decimalFormat.format(a3) + a.f3218b[i]);
                    ((TextView) inflate2.findViewById(2131165464)).setText(this.f.f3229b.getPath());
                    ((TextView) inflate2.findViewById(2131165466)).setText(new SimpleDateFormat("yyyy-MM-dd hh:mm").format(new Date(this.f.f3229b.lastModified())));
                }
                uhVar4.b(194, new j());
                uhVar4.show();
                return true;
            default:
                return true;
        }
    }

    public final void b() {
        File file = this.f3217e;
        if (!com.uc.platform.g.h().k()) {
            g();
            return;
        }
        if (file == null) {
            String j = kg.e().j();
            if (pf.b(j)) {
                this.f3217e = new File(j);
            }
            if (this.f3217e != null && !this.f3217e.exists()) {
                String l = com.uc.platform.g.h().l();
                if (pf.b(l)) {
                    this.f3217e = new File(l);
                }
            }
        } else {
            this.f3217e = file;
        }
        if (this.f3217e != null && this.m != null) {
            this.m.a(this.f3217e);
        }
        if (this.f3217e == null || !this.f3217e.exists()) {
            return;
        }
        if (this.f3215c == null) {
            File file2 = new File(com.uc.platform.g.h().j());
            this.f3215c = new a();
            this.f3215c.a(file2);
        }
        if (this.f3214b == null) {
            this.f3214b = new ListView(getContext());
            this.f3214b.setId(1048577);
            ListView listView = (ListView) this.f3214b;
            tt.b();
            listView.setDivider(new ColorDrawable(tt.f(274)));
            listView.setDividerHeight(1);
            listView.setPadding(0, 0, 0, 0);
            tt.b();
            int f = tt.f(269);
            listView.setBackgroundColor(f);
            listView.setCacheColorHint(f);
            Drawable d2 = tt.b().d(10364);
            if (d2 != null) {
                ((ListView) this.f3214b).setSelector(d2);
            }
            this.f3214b.setOnItemClickListener(this);
            this.f3214b.setOnItemLongClickListener(this);
        }
        if (this.f3216d.indexOfChild(this.f3214b) < 0) {
            RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
            layoutParams.addRule(3, 2131165472);
            layoutParams.addRule(2, 2131165473);
            this.f3216d.addView(this.f3214b, layoutParams);
            this.f3214b.setAdapter(this.f3215c);
        }
        this.f3215c.a(this.f3217e);
        a();
    }

    public final void c() {
        uh uhVar = new uh(getContext());
        uhVar.setTitle(tt.b().a(185));
        View inflate = LayoutInflater.from(getContext()).inflate(2130903113, (ViewGroup) null);
        com.google.android.c2dm.a.a(inflate, 10069);
        TextView textView = (TextView) inflate.findViewById(2131165627);
        tt.b();
        textView.setTextColor(tt.f(76));
        textView.setText(tt.b().a(157));
        uhVar.a(inflate);
        uhVar.setCancelable(false);
        this.r = uhVar;
        this.r.show();
    }

    public final int d() {
        return this.k.getHeight();
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent motionEvent) {
        this.l.x = Math.round(motionEvent.getRawX());
        this.l.y = Math.round(motionEvent.getRawY());
        return super.dispatchTouchEvent(motionEvent);
    }

    public final Point f() {
        return this.l;
    }

    @Override
    public void onItemClick(AdapterView adapterView, View view, int i, long j) {
        d dVar = (d) this.f3214b.getItemAtPosition(i);
        if (dVar.f3230c == -2) {
            if (h()) {
                return;
            }
            this.o.a();
        } else if (dVar.f3229b.isDirectory()) {
            this.f3215c.a(dVar.f3229b);
            this.f3217e = dVar.f3229b;
            if (this.m != null) {
                this.m.a(this.f3217e);
            }
            lb.b("fm01");
        } else {
            lb.b("fm01");
            if (!dVar.f3229b.getName().endsWith(".upp")) {
                try {
                    String url = dVar.f3229b.toURL().toString();
                    if (url.startsWith("file:/")) {
                        url = "file:///" + url.substring(6);
                    }
                    getContext();
                    vv.a(url, dVar.f3230c);
                    return;
                } catch (Exception e2) {
                    return;
                }
            }
            String absolutePath = dVar.f3229b.getAbsolutePath();
            uh uhVar = new uh(getContext());
            uhVar.setTitle(tt.b().a(618));
            uhVar.setCancelable(false);
            uhVar.a(tt.b().a(486));
            uhVar.b(69, new r(this, absolutePath));
            uhVar.a(46, new s());
            uhVar.show();
        }
    }

    @Override
    public boolean onItemLongClick(AdapterView adapterView, View view, int i, long j) {
        this.f = (d) this.f3215c.getItem(i);
        if (this.p == null) {
            this.p = new sl(getContext());
        }
        this.p.clear();
        if (this.q == null) {
            this.q = new sm(getContext());
            this.q.a();
            this.q.a(this);
        }
        this.q.a(this.p);
        this.q.a(this);
        this.p.a(this.q);
        this.p.b();
        this.q.show();
        this.q.setOnDismissListener(new q());
        sl slVar = this.p;
        if (slVar != null) {
            getContext();
            com.google.android.c2dm.a.a(si.d, slVar);
            if (this.f.f3230c == -2) {
                slVar.setGroupVisible(462848, false);
            }
            if (this.g == null || this.g.size() == 0) {
                slVar.findItem(458753).setVisible(false);
            }
            if (this.f.f3229b == null) {
                slVar.findItem(462854).setVisible(false);
                slVar.findItem(462853).setVisible(false);
                slVar.findItem(462852).setVisible(false);
                slVar.findItem(462851).setVisible(false);
            } else if (this.f.f3229b.isDirectory()) {
                slVar.findItem(462854).setVisible(true);
                slVar.findItem(462853).setVisible(true);
                slVar.findItem(462852).setVisible(false);
                slVar.findItem(462851).setVisible(false);
            } else {
                slVar.findItem(462854).setVisible(false);
                slVar.findItem(462853).setVisible(false);
                slVar.findItem(462852).setVisible(true);
                slVar.findItem(462851).setVisible(true);
            }
        }
        return false;
    }

    @Override
    public boolean onKeyDown(int i, KeyEvent keyEvent) {
        if (i == 4 && h()) {
            return true;
        }
        return super.onKeyDown(i, keyEvent);
    }

    @Override
    protected void onLayout(boolean z, int i, int i2, int i3, int i4) {
        int i5;
        super.onLayout(z, i, i2, i3, i4);
        if (this.n == null || indexOfChild(this.n) < 0) {
            return;
        }
        int i6 = ((RelativeLayout.LayoutParams) this.n.getLayoutParams()).leftMargin;
        int top = this.k.getTop() - this.n.getMeasuredHeight();
        int top2 = this.k.getTop();
        if (this.n.getId() == 116) {
            i5 = this.j.getLeft() + i6;
            i6 += this.j.getLeft() + this.n.getMeasuredWidth();
        } else {
            i5 = i6;
        }
        this.n.layout(i5, top, i6, top2);
    }

    public void setFile(File file) {
        this.f3217e = file;
    }

    public void v(x xVar) {
        this.m = xVar;
    }
}