导航菜单

页面标题

页面副标题

Namma Yatri v3.3.7 - i.java 源代码

正在查看: Namma Yatri v3.3.7 应用的 i.java JAVA 源代码文件

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


package Lb;

import Hb.r;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Handler;
import android.os.Looper;
import android.util.AttributeSet;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import java.io.InputStream;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import jd.InterfaceC1012l;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.m;
import sd.AbstractC1172m;

public final class i extends WebView implements Hb.f, r.b {
    private InterfaceC1012l a;
    private final HashSet b;
    private final Handler c;
    private boolean d;

    public static final class a extends WebChromeClient {
        a() {
        }

        @Override
        public Bitmap getDefaultVideoPoster() {
            Bitmap defaultVideoPoster = super.getDefaultVideoPoster();
            return defaultVideoPoster == null ? Bitmap.createBitmap(1, 1, Bitmap.Config.RGB_565) : defaultVideoPoster;
        }
    }

    public i(Context context, AttributeSet attributeSet, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
        this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i);
    }

    public static final void n(i this$0, String videoId, float f) {
        m.i(this$0, "this$0");
        m.i(videoId, "$videoId");
        this$0.loadUrl("javascript:cueVideo('" + videoId + "', " + f + ')');
    }

    private final void o(Jb.a aVar) {
        getSettings().setJavaScriptEnabled(true);
        getSettings().setMediaPlaybackRequiresUserGesture(false);
        getSettings().setCacheMode(-1);
        addJavascriptInterface(new r(this), "YouTubePlayerBridge");
        Kb.d dVar = Kb.d.a;
        InputStream openRawResource = getResources().openRawResource(Gb.f.a);
        m.h(openRawResource, "resources.openRawResourc…R.raw.ayp_youtube_player)");
        loadDataWithBaseURL(aVar.b(), AbstractC1172m.A(dVar.b(openRawResource), "<<injectedPlayerVars>>", aVar.toString(), false, 4, null), "text/html", "utf-8", null);
        setWebChromeClient(new a());
    }

    public static final void r(i this$0, String videoId, float f) {
        m.i(this$0, "this$0");
        m.i(videoId, "$videoId");
        this$0.loadUrl("javascript:loadVideo('" + videoId + "', " + f + ')');
    }

    public static final void s(i this$0) {
        m.i(this$0, "this$0");
        this$0.loadUrl("javascript:pauseVideo()");
    }

    public static final void t(i this$0) {
        m.i(this$0, "this$0");
        this$0.loadUrl("javascript:playVideo()");
    }

    public static final void u(i this$0, float f) {
        m.i(this$0, "this$0");
        this$0.loadUrl("javascript:seekTo(" + f + ')');
    }

    public static final void v(i this$0, Hb.b playbackRate) {
        m.i(this$0, "this$0");
        m.i(playbackRate, "$playbackRate");
        this$0.loadUrl("javascript:setPlaybackRate(" + Hb.e.a(playbackRate) + ')');
    }

    public static final void w(i this$0, int i) {
        m.i(this$0, "this$0");
        this$0.loadUrl("javascript:setVolume(" + i + ')');
    }

    @Override
    public void a(final float f) {
        this.c.post(new Runnable() {
            @Override
            public final void run() {
                i.u(i.this, f);
            }
        });
    }

    @Override
    public void b() {
        InterfaceC1012l interfaceC1012l = this.a;
        if (interfaceC1012l == null) {
            m.x("youTubePlayerInitListener");
            interfaceC1012l = null;
        }
        interfaceC1012l.invoke(this);
    }

    @Override
    public void c(final String videoId, final float f) {
        m.i(videoId, "videoId");
        this.c.post(new Runnable() {
            @Override
            public final void run() {
                i.n(i.this, videoId, f);
            }
        });
    }

    @Override
    public boolean d(Ib.c listener) {
        m.i(listener, "listener");
        return this.b.remove(listener);
    }

    @Override
    public void destroy() {
        this.b.clear();
        this.c.removeCallbacksAndMessages(null);
        super.destroy();
    }

    @Override
    public void e(final String videoId, final float f) {
        m.i(videoId, "videoId");
        this.c.post(new Runnable() {
            @Override
            public final void run() {
                i.r(i.this, videoId, f);
            }
        });
    }

    @Override
    public boolean f(Ib.c listener) {
        m.i(listener, "listener");
        return this.b.add(listener);
    }

    @Override
    public Collection<Ib.c> getListeners() {
        Collection<Ib.c> unmodifiableCollection = Collections.unmodifiableCollection(new HashSet(this.b));
        m.h(unmodifiableCollection, "unmodifiableCollection(H…(youTubePlayerListeners))");
        return unmodifiableCollection;
    }

    @Override
    protected void onWindowVisibilityChanged(int i) {
        if (this.d && (i == 8 || i == 4)) {
            return;
        }
        super.onWindowVisibilityChanged(i);
    }

    public final void p(InterfaceC1012l initListener, Jb.a aVar) {
        m.i(initListener, "initListener");
        this.a = initListener;
        if (aVar == null) {
            aVar = Jb.a.b.a();
        }
        o(aVar);
    }

    @Override
    public void pause() {
        this.c.post(new Runnable() {
            @Override
            public final void run() {
                i.s(i.this);
            }
        });
    }

    @Override
    public void play() {
        this.c.post(new Runnable() {
            @Override
            public final void run() {
                i.t(i.this);
            }
        });
    }

    public final boolean q() {
        return this.d;
    }

    public final void setBackgroundPlaybackEnabled$core_release(boolean z) {
        this.d = z;
    }

    public void setPlaybackRate(final Hb.b playbackRate) {
        m.i(playbackRate, "playbackRate");
        this.c.post(new Runnable() {
            @Override
            public final void run() {
                i.v(i.this, playbackRate);
            }
        });
    }

    public void setVolume(final int i) {
        if (i < 0 || i > 100) {
            throw new IllegalArgumentException("Volume must be between 0 and 100".toString());
        }
        this.c.post(new Runnable() {
            @Override
            public final void run() {
                i.w(i.this, i);
            }
        });
    }

    public i(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        m.i(context, "context");
        this.b = new HashSet();
        this.c = new Handler(Looper.getMainLooper());
    }

    @Override
    public Hb.f getInstance() {
        return this;
    }
}