导航菜单

页面标题

页面副标题

BAM Crawford v6.14.1 - r.java 源代码

正在查看: BAM Crawford v6.14.1 应用的 r.java JAVA 源代码文件

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


package uc;

import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.support.v4.media.session.MediaSessionCompat;
import android.text.TextUtils;
import androidx.core.app.l;
import com.google.android.gms.cast.framework.media.MediaIntentReceiver;
import com.google.android.gms.cast.framework.media.y0;
import com.google.android.gms.internal.cast.dc;
import com.google.android.gms.internal.cast.na;
import com.google.android.gms.internal.cast.t1;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import okhttp3.HttpUrl;

final class r {
    private static final xc.b y = new xc.b("MediaNotificationProxy");
    private final Context a;
    private final NotificationManager b;
    private final tc.b c;
    private final com.google.android.gms.cast.framework.media.h d;
    private final com.google.android.gms.cast.framework.media.c e;
    private final ComponentName f;
    private final ComponentName g;
    private List h = new ArrayList();
    private int[] i;
    private final long j;
    private final b k;
    private final com.google.android.gms.cast.framework.media.b l;
    private final Resources m;
    private m n;
    private n o;
    private Notification p;
    private l.a q;
    private l.a r;
    private l.a s;
    private l.a t;
    private l.a u;
    private l.a v;
    private l.a w;
    private l.a x;

    r(Context context) {
        this.a = context;
        NotificationManager notificationManager = (NotificationManager) context.getSystemService("notification");
        this.b = notificationManager;
        tc.b bVar = (tc.b) ed.r.j(tc.b.g());
        this.c = bVar;
        com.google.android.gms.cast.framework.media.a aVar = (com.google.android.gms.cast.framework.media.a) ed.r.j(((tc.c) ed.r.j(bVar.b())).g());
        com.google.android.gms.cast.framework.media.h hVar = (com.google.android.gms.cast.framework.media.h) ed.r.j(aVar.m());
        this.d = hVar;
        this.e = aVar.i();
        Resources resources = context.getResources();
        this.m = resources;
        this.f = new ComponentName(context.getApplicationContext(), aVar.j());
        if (TextUtils.isEmpty(hVar.L())) {
            this.g = null;
        } else {
            this.g = new ComponentName(context.getApplicationContext(), hVar.L());
        }
        this.j = hVar.G();
        int dimensionPixelSize = resources.getDimensionPixelSize(hVar.O());
        com.google.android.gms.cast.framework.media.b bVar2 = new com.google.android.gms.cast.framework.media.b(1, dimensionPixelSize, dimensionPixelSize);
        this.l = bVar2;
        this.k = new b(context.getApplicationContext(), bVar2);
        if (jd.m.h() && notificationManager != null) {
            NotificationChannel a = q.a("cast_media_notification", ((Context) ed.r.j(context)).getResources().getString(tc.s.media_notification_channel_name), 2);
            a.setShowBadge(false);
            notificationManager.createNotificationChannel(a);
        }
        dc.d(na.CAF_MEDIA_NOTIFICATION_PROXY);
    }

    static boolean e(tc.c cVar) {
        com.google.android.gms.cast.framework.media.h m;
        com.google.android.gms.cast.framework.media.a g = cVar.g();
        if (g == null || (m = g.m()) == null) {
            return false;
        }
        y0 W = m.W();
        if (W == null) {
            return true;
        }
        List f = z.f(W);
        int[] g2 = z.g(W);
        int size = f == null ? 0 : f.size();
        if (f == null || f.isEmpty()) {
            y.c(com.google.android.gms.cast.framework.media.g.class.getSimpleName().concat(" doesn't provide any action."), new Object[0]);
        } else if (f.size() > 5) {
            y.c(com.google.android.gms.cast.framework.media.g.class.getSimpleName().concat(" provides more than 5 actions."), new Object[0]);
        } else {
            if (g2 != null && (g2.length) != 0) {
                for (int i : g2) {
                    if (i < 0 || i >= size) {
                        y.c(com.google.android.gms.cast.framework.media.g.class.getSimpleName().concat("provides a compact view action whose index is out of bounds."), new Object[0]);
                    }
                }
                return true;
            }
            y.c(com.google.android.gms.cast.framework.media.g.class.getSimpleName().concat(" doesn't provide any actions for compact view."), new Object[0]);
        }
        return false;
    }

    private final l.a f(String str) {
        char c;
        int v;
        int P;
        switch (str.hashCode()) {
            case -1699820260:
                if (str.equals(MediaIntentReceiver.ACTION_REWIND)) {
                    c = 4;
                    break;
                }
                c = 65535;
                break;
            case -945151566:
                if (str.equals(MediaIntentReceiver.ACTION_SKIP_NEXT)) {
                    c = 1;
                    break;
                }
                c = 65535;
                break;
            case -945080078:
                if (str.equals(MediaIntentReceiver.ACTION_SKIP_PREV)) {
                    c = 2;
                    break;
                }
                c = 65535;
                break;
            case -668151673:
                if (str.equals(MediaIntentReceiver.ACTION_STOP_CASTING)) {
                    c = 5;
                    break;
                }
                c = 65535;
                break;
            case -124479363:
                if (str.equals(MediaIntentReceiver.ACTION_DISCONNECT)) {
                    c = 6;
                    break;
                }
                c = 65535;
                break;
            case 235550565:
                if (str.equals(MediaIntentReceiver.ACTION_TOGGLE_PLAYBACK)) {
                    c = 0;
                    break;
                }
                c = 65535;
                break;
            case 1362116196:
                if (str.equals(MediaIntentReceiver.ACTION_FORWARD)) {
                    c = 3;
                    break;
                }
                c = 65535;
                break;
            default:
                c = 65535;
                break;
        }
        PendingIntent pendingIntent = null;
        switch (c) {
            case 0:
                m mVar = this.n;
                int i = mVar.c;
                if (!mVar.b) {
                    if (this.q == null) {
                        Intent intent = new Intent(MediaIntentReceiver.ACTION_TOGGLE_PLAYBACK);
                        intent.setComponent(this.f);
                        PendingIntent broadcast = PendingIntent.getBroadcast(this.a, 0, intent, t1.a);
                        com.google.android.gms.cast.framework.media.h hVar = this.d;
                        this.q = new l.a.a(hVar.x(), this.m.getString(hVar.Q()), broadcast).a();
                    }
                    return this.q;
                }
                if (this.r == null) {
                    if (i == 2) {
                        com.google.android.gms.cast.framework.media.h hVar2 = this.d;
                        v = hVar2.J();
                        P = hVar2.K();
                    } else {
                        com.google.android.gms.cast.framework.media.h hVar3 = this.d;
                        v = hVar3.v();
                        P = hVar3.P();
                    }
                    Intent intent2 = new Intent(MediaIntentReceiver.ACTION_TOGGLE_PLAYBACK);
                    intent2.setComponent(this.f);
                    this.r = new l.a.a(v, this.m.getString(P), PendingIntent.getBroadcast(this.a, 0, intent2, t1.a)).a();
                }
                return this.r;
            case 1:
                boolean z = this.n.f;
                if (this.s == null) {
                    if (z) {
                        Intent intent3 = new Intent(MediaIntentReceiver.ACTION_SKIP_NEXT);
                        intent3.setComponent(this.f);
                        pendingIntent = PendingIntent.getBroadcast(this.a, 0, intent3, t1.a);
                    }
                    com.google.android.gms.cast.framework.media.h hVar4 = this.d;
                    this.s = new l.a.a(hVar4.E(), this.m.getString(hVar4.U()), pendingIntent).a();
                }
                return this.s;
            case 2:
                boolean z2 = this.n.g;
                if (this.t == null) {
                    if (z2) {
                        Intent intent4 = new Intent(MediaIntentReceiver.ACTION_SKIP_PREV);
                        intent4.setComponent(this.f);
                        pendingIntent = PendingIntent.getBroadcast(this.a, 0, intent4, t1.a);
                    }
                    com.google.android.gms.cast.framework.media.h hVar5 = this.d;
                    this.t = new l.a.a(hVar5.F(), this.m.getString(hVar5.V()), pendingIntent).a();
                }
                return this.t;
            case 3:
                long j = this.j;
                if (this.u == null) {
                    Intent intent5 = new Intent(MediaIntentReceiver.ACTION_FORWARD);
                    intent5.setComponent(this.f);
                    intent5.putExtra(MediaIntentReceiver.EXTRA_SKIP_STEP_MS, j);
                    this.u = new l.a.a(z.a(this.d, j), this.m.getString(z.b(this.d, j)), PendingIntent.getBroadcast(this.a, 0, intent5, t1.a | 134217728)).a();
                }
                return this.u;
            case 4:
                long j2 = this.j;
                if (this.v == null) {
                    Intent intent6 = new Intent(MediaIntentReceiver.ACTION_REWIND);
                    intent6.setComponent(this.f);
                    intent6.putExtra(MediaIntentReceiver.EXTRA_SKIP_STEP_MS, j2);
                    this.v = new l.a.a(z.c(this.d, j2), this.m.getString(z.d(this.d, j2)), PendingIntent.getBroadcast(this.a, 0, intent6, t1.a | 134217728)).a();
                }
                return this.v;
            case 5:
                if (this.x == null) {
                    Intent intent7 = new Intent(MediaIntentReceiver.ACTION_STOP_CASTING);
                    intent7.setComponent(this.f);
                    PendingIntent broadcast2 = PendingIntent.getBroadcast(this.a, 0, intent7, t1.a);
                    com.google.android.gms.cast.framework.media.h hVar6 = this.d;
                    this.x = new l.a.a(hVar6.k(), this.m.getString(hVar6.zza()), broadcast2).a();
                }
                return this.x;
            case 6:
                if (this.w == null) {
                    Intent intent8 = new Intent(MediaIntentReceiver.ACTION_DISCONNECT);
                    intent8.setComponent(this.f);
                    PendingIntent broadcast3 = PendingIntent.getBroadcast(this.a, 0, intent8, t1.a);
                    com.google.android.gms.cast.framework.media.h hVar7 = this.d;
                    this.w = new l.a.a(hVar7.k(), this.m.getString(hVar7.zza(), HttpUrl.FRAGMENT_ENCODE_SET), broadcast3).a();
                }
                return this.w;
            default:
                y.c("Action: %s is not a pre-defined action.", str);
                return null;
        }
    }

    public final void g() {
        PendingIntent g;
        l.a f;
        if (this.b == null || this.n == null) {
            return;
        }
        n nVar = this.o;
        l.e F = new l.e(this.a, "cast_media_notification").q(nVar == null ? null : nVar.b).z(this.d.H()).m(this.n.d).l(this.m.getString(this.d.i(), this.n.e)).u(true).y(false).F(1);
        ComponentName componentName = this.g;
        if (componentName == null) {
            g = null;
        } else {
            Intent intent = new Intent();
            intent.putExtra("targetActivity", componentName);
            intent.setAction(componentName.flattenToString());
            intent.setComponent(componentName);
            androidx.core.app.t f2 = androidx.core.app.t.f(this.a);
            f2.b(intent);
            g = f2.g(1, t1.a | 134217728);
        }
        if (g != null) {
            F.k(g);
        }
        y0 W = this.d.W();
        if (W != null) {
            y.a("actionsProvider != null", new Object[0]);
            int[] g2 = z.g(W);
            this.i = g2 != null ? (int[]) g2.clone() : null;
            List<com.google.android.gms.cast.framework.media.f> f3 = z.f(W);
            this.h = new ArrayList();
            if (f3 != null) {
                for (com.google.android.gms.cast.framework.media.f fVar : f3) {
                    String g3 = fVar.g();
                    if (g3.equals(MediaIntentReceiver.ACTION_TOGGLE_PLAYBACK) || g3.equals(MediaIntentReceiver.ACTION_SKIP_NEXT) || g3.equals(MediaIntentReceiver.ACTION_SKIP_PREV) || g3.equals(MediaIntentReceiver.ACTION_FORWARD) || g3.equals(MediaIntentReceiver.ACTION_REWIND) || g3.equals(MediaIntentReceiver.ACTION_STOP_CASTING) || g3.equals(MediaIntentReceiver.ACTION_DISCONNECT)) {
                        f = f(fVar.g());
                    } else {
                        Intent intent2 = new Intent(fVar.g());
                        intent2.setComponent(this.f);
                        f = new l.a.a(fVar.j(), fVar.i(), PendingIntent.getBroadcast(this.a, 0, intent2, t1.a)).a();
                    }
                    if (f != null) {
                        this.h.add(f);
                    }
                }
            }
        } else {
            y.a("actionsProvider == null", new Object[0]);
            this.h = new ArrayList();
            Iterator it = this.d.g().iterator();
            while (it.hasNext()) {
                l.a f4 = f((String) it.next());
                if (f4 != null) {
                    this.h.add(f4);
                }
            }
            this.i = (int[]) this.d.j().clone();
        }
        Iterator it2 = this.h.iterator();
        while (it2.hasNext()) {
            F.b((l.a) it2.next());
        }
        androidx.media.app.b bVar = new androidx.media.app.b();
        int[] iArr = this.i;
        if (iArr != null) {
            bVar.i(iArr);
        }
        MediaSessionCompat.Token token = this.n.a;
        if (token != null) {
            bVar.h(token);
        }
        F.B(bVar);
        Notification c = F.c();
        this.p = c;
        this.b.notify("castMediaNotification", 1, c);
    }

    final void c() {
        this.k.a();
        NotificationManager notificationManager = this.b;
        if (notificationManager != null) {
            notificationManager.cancel("castMediaNotification", 1);
        }
    }

    final void d(com.google.android.gms.cast.CastDevice r18, com.google.android.gms.cast.framework.media.i r19, android.support.v4.media.session.MediaSessionCompat r20, boolean r21) {
        throw new UnsupportedOperationException("Method not decompiled: uc.r.d(com.google.android.gms.cast.CastDevice, com.google.android.gms.cast.framework.media.i, android.support.v4.media.session.MediaSessionCompat, boolean):void");
    }
}