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

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


package com.mxtech.cast.controller;

import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.database.sqlite.SQLiteException;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import com.google.android.gms.cast.MediaQueueItem;
import com.google.android.gms.cast.framework.CastSession;
import com.google.android.gms.cast.framework.media.ImageHints;
import com.google.android.gms.cast.framework.media.MediaQueue;
import com.google.android.gms.cast.framework.media.RemoteMediaClient;
import com.google.android.gms.cast.framework.media.uicontroller.UIMediaController;
import com.google.android.gms.cast.framework.media.widget.ControlButtonsContainer;
import com.google.android.gms.common.images.WebImage;
import gc0;
import java.util.List;
import o90;
import org.greenrobot.eventbus.ThreadMode;
import q90;
import qa0;
public class a extends Fragment implements ControlButtonsContainer, sa0, RemoteMediaClient.ProgressListener {
    public View f1425c;
    public TextView f1426d;
    public TextView f1427e;
    public ImageView f;
    public ImageView g;
    public UIMediaController i;
    public Activity j;
    public Resources k;
    public RemoteMediaClient l;
    public String n;
    public String o;
    public tb0 r;
    public MediaQueue s;
    public b t;
    public C0246a u;
    public boolean h = true;
    public long m = 0;
    public boolean p = false;
    public boolean q = false;

    public class C0246a extends RemoteMediaClient.Callback {
        public C0246a() {
        }

        public void onQueueStatusUpdated() {
            if (hc0.d() == 0) {
                a.this.z();
            }
        }

        public void onStatusUpdated() {
            if (hc0.a()) {
                a.b(a.this);
            }
        }
    }

    public class b extends MediaQueue.Callback {
        public b() {
        }

        public void mediaQueueChanged() {
            int i = 2 << 0;
            j80.a(this, "MediaQueueCallback_mediaQueueChanged:", new String[]{toString()});
            a.this.r.d();
            a.this.E();
        }
    }

    public static void b(a aVar) {
        if (aVar == null) {
            throw null;
        }
        aVar.n = hc0.a("playUri");
        aVar.o = hc0.a("feed_id");
        if (!TextUtils.isEmpty(aVar.n)) {
            j80.a(g90.l, aVar.n);
        }
        aVar.B();
        RemoteMediaClient remoteMediaClient = aVar.l;
        if (remoteMediaClient == null || !aVar.q) {
            return;
        }
        remoteMediaClient.pause();
        aVar.q = false;
    }

    public void A() {
        View view = this.f1425c;
        if (view != null && view.getVisibility() != 8) {
            this.f1425c.setVisibility(8);
        }
    }

    public final void B() {
        MediaQueueItem currentItem;
        List b2;
        E();
        String a2 = j80.a(g90.l);
        if (!TextUtils.isEmpty(a2)) {
            if (a2.contains("file:///")) {
                RemoteMediaClient remoteMediaClient = this.l;
                if (remoteMediaClient != null && (currentItem = remoteMediaClient.getCurrentItem()) != null && (b2 = hc0.b(currentItem)) != null && b2.size() != 0) {
                    ys1.a().a(((WebImage) b2.get(0)).getUrl().toString(), this.f);
                }
            } else {
                UIMediaController uIMediaController = this.i;
                if (uIMediaController != null) {
                    uIMediaController.bindImageViewToImageOfCurrentItem(this.f, new ImageHints(2, 112, 64), 0);
                }
            }
        }
        this.g.setVisibility(0);
    }

    public final void C() {
        j80.a(this, "registRemoteMediaClientListener", new String[]{toString()});
        RemoteMediaClient k = hc0.k();
        this.l = k;
        if (k != null) {
            k.registerCallback(this.u);
            this.l.addProgressListener(this, 200L);
            MediaQueue mediaQueue = this.s;
            if (mediaQueue != null) {
                mediaQueue.registerCallback(this.t);
            }
        }
    }

    public final void D() {
        String a2 = j80.a(g90.l);
        if (TextUtils.isEmpty(a2) || this.m == 0) {
            return;
        }
        if (a2.contains("file:///")) {
            hc0.a(Uri.parse(a2), (int) this.m);
            return;
        }
        o90 o90Var = new o90(o90.a.c);
        o90Var.c = this.o;
        b12.b().b(o90Var);
    }

    public final void E() {
        int d2 = hc0.d();
        this.f1427e.setVisibility(0);
        if (d2 == 0) {
            this.f1427e.setVisibility(8);
            this.r.a();
        } else {
            TextView textView = this.f1427e;
            Activity activity = this.j;
            textView.setText(d2 > 1 ? activity.getString(zs0.cast_videos, new Object[]{Integer.valueOf(d2)}) : activity.getString(zs0.cast_video, new Object[]{Integer.valueOf(d2)}));
        }
    }

    public void G() {
        View view = this.f1425c;
        if (view == null || view.getVisibility() == 0 || !this.h) {
            return;
        }
        this.f1425c.setVisibility(0);
    }

    public final void H() {
        j80.a(this, "unRegistRemoteMediaClientListener", new String[]{toString()});
        RemoteMediaClient k = hc0.k();
        this.l = k;
        if (k != null) {
            k.unregisterCallback(this.u);
            this.l.removeProgressListener(this);
            MediaQueue mediaQueue = this.s;
            if (mediaQueue != null) {
                mediaQueue.unregisterCallback(this.t);
            }
        }
    }

    public final String a(int i, ViewGroup viewGroup) {
        if (viewGroup == null) {
            return "";
        }
        hc0.a(viewGroup.getContext());
        String string = viewGroup.getContext().getResources().getString(i, hc0.a);
        return string.contains("%1$s") ? viewGroup.getContext().getResources().getString(i, "ChromeCast") : string;
    }

    public ImageView getButtonImageViewAt(int i) {
        return null;
    }

    public UIMediaController getUIMediaController() {
        return this.i;
    }

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.r = tb0.a(g90.l);
        this.u = new C0246a();
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        j80.a(this, "addListener", new String[]{toString()});
        if (qa0.b.a != null) {
            ta0.c().b(this);
        }
        FragmentActivity activity = getActivity();
        this.j = activity;
        if (activity != null) {
            this.k = activity.getResources();
        }
        if (!b12.b().a(this)) {
            b12.b().c(this);
        }
        this.i = new UIMediaController(this.j);
        View inflate = layoutInflater.inflate(vs0.fragment_mini_controller, viewGroup, false);
        this.f1425c = inflate;
        inflate.setVisibility(8);
        this.f1425c.findViewById(ss0.open_expand).setOnClickListener(new com.mxtech.cast.controller.b(this));
        ImageView imageView = (ImageView) this.f1425c.findViewById(ss0.arrow);
        this.f = (ImageView) this.f1425c.findViewById(ss0.icon_view);
        this.f1426d = (TextView) this.f1425c.findViewById(ss0.title_view);
        this.f1427e = (TextView) this.f1425c.findViewById(ss0.subtitle_view);
        this.g = (ImageView) this.f1425c.findViewById(ss0.play_pause);
        ProgressBar progressBar = (ProgressBar) this.f1425c.findViewById(ss0.progressBar);
        Resources resources = this.k;
        if (resources != null) {
            Drawable drawable = resources.getDrawable(rs0.mxskin__ic_cast_pause__dark);
            Drawable drawable2 = this.k.getDrawable(rs0.mxskin__ic_cast_play__dark);
            UIMediaController uIMediaController = this.i;
            if (uIMediaController != null) {
                uIMediaController.bindImageViewToPlayPauseToggle(this.g, drawable2, drawable, drawable, (View) null, false);
                this.i.bindTextViewToMetadataOfCurrentItem(this.f1426d, "com.google.android.gms.cast.metadata.TITLE");
                this.i.bindProgressBar(progressBar);
                this.i.bindImageViewToImageOfCurrentItem(this.f, new ImageHints(2, 112, 64), 0);
            }
        }
        if (hc0.e()) {
            if (hc0.a()) {
                B();
            } else {
                z();
            }
        }
        return this.f1425c;
    }

    public void onDestroyView() {
        j80.a(this, "removeListener", new String[]{toString()});
        if (qa0.b.a != null) {
            ta0.c().a.remove(this);
        }
        if (b12.b().a(this)) {
            b12.b().d(this);
        }
        H();
        UIMediaController uIMediaController = this.i;
        if (uIMediaController != null) {
            uIMediaController.dispose();
            this.i = null;
        }
        super.onDestroyView();
    }

    @i12(threadMode = ThreadMode.MAIN)
    public void onEvent(q90 q90Var) {
        Uri parse;
        if (getContext() == null) {
            return;
        }
        if (hc0.e()) {
            q90.a aVar = q90Var.c;
            if (aVar == q90.a.e) {
                G();
            } else if (aVar == q90.a.d) {
                A();
            } else if (aVar == q90.a.j) {
                z();
                if (hc0.g()) {
                    if (!TextUtils.isEmpty(this.n) && (parse = Uri.parse(this.n)) != null) {
                        try {
                            tt0 o = tt0.o();
                            o.a(parse);
                            o.l();
                        } catch (SQLiteException e2) {
                            Context h = g90.h();
                            j80.a(h, e2.getMessage(), new String[]{h.toString()});
                        }
                    }
                } else if (gc0.a.c.equalsIgnoreCase(gc0.a.d.c) && !TextUtils.isEmpty(this.o)) {
                    o90 o90Var = new o90(o90.a.d);
                    o90Var.c = this.o;
                    b12.b().b(o90Var);
                }
            } else if (aVar == q90.a.k) {
                z();
            } else if (aVar == q90.a.l) {
                D();
            }
        }
    }

    public void onProgressUpdated(long j, long j2) {
        this.m = j;
    }

    public void onResume() {
        super.onResume();
        if (!hc0.e()) {
            A();
            return;
        }
        C();
        G();
    }

    public void onSessionConnected(CastSession castSession) {
        o90 o90Var;
        G();
        z();
        this.l = castSession.getRemoteMediaClient();
        this.s = hc0.b();
        this.t = new b();
        C();
        if (hc0.e) {
            String a2 = j80.a(g90.l);
            if (!this.p || TextUtils.isEmpty(a2)) {
                return;
            }
            if (a2.contains("file:///")) {
                o90Var = new o90(o90.a.f);
                o90Var.d = a2;
                if (hc0.b(Uri.parse(a2)) == 0) {
                    return;
                }
            } else {
                o90Var = new o90(o90.a.e);
                o90Var.c = this.o;
            }
            if (b12.b().a(this)) {
                b12.b().b(o90Var);
            }
            this.q = true;
        }
    }

    public void onSessionDisconnected(CastSession castSession, int i) {
        A();
        fa0.i = "";
        this.f1426d.setVisibility(8);
        this.f1427e.setText("");
        this.f1427e.setVisibility(8);
        H();
        D();
        this.r.c();
    }

    public void onSessionStarting(CastSession castSession) {
        G();
        this.f1426d.setVisibility(0);
        this.f1426d.setText(a(zs0.cast_connecting, (ViewGroup) this.f1425c));
    }

    public int v() {
        return 0;
    }

    public int w(int i) {
        return 0;
    }

    public final void z() {
        TextView textView = this.f1426d;
        if (textView != null && this.f1427e != null && this.g != null && this.f != null) {
            textView.setVisibility(0);
            this.f1427e.setVisibility(0);
            this.g.setVisibility(8);
            this.f1426d.setText(a(zs0.connected_successful, (ViewGroup) this.f1425c));
            this.f1427e.setText(a(zs0.cast_ready, (ViewGroup) this.f1425c));
            this.f.setImageResource(rs0.cast_logo_bg);
        }
    }
}