导航菜单

页面标题

页面副标题

Chaupal v3.2 - RichPushService.java 源代码

正在查看: Chaupal v3.2 应用的 RichPushService.java JAVA 源代码文件

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


package com.yupptv.ott.cloudmessaging;

import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.Service;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.IBinder;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.core.app.m;
import com.razorpay.R;
import com.yupptv.ott.OTTApplication;
import e3.g;
import f3.d;
import hd.h;

public class RichPushService extends Service {
    private static final String c = RichPushService.class.getSimpleName();
    public int a = 1;

    class a extends g<Bitmap> {
        final Intent e;

        a(Intent intent) {
            this.e = intent;
        }

        public void i(@NonNull Bitmap bitmap, d<? super Bitmap> dVar) {
            RichPushService.this.g(this.e, bitmap);
        }
    }

    class b extends g<Bitmap> {
        final Intent e;
        final Bitmap f;

        b(int i, int i2, Intent intent, Bitmap bitmap) {
            super(i, i2);
            this.e = intent;
            this.f = bitmap;
        }

        public void i(@NonNull Bitmap bitmap, d<? super Bitmap> dVar) {
            RichPushService.this.h(this.e, this.f, bitmap);
        }
    }

    public static float c(Resources resources) {
        return resources.getDisplayMetrics().density / 3.0f;
    }

    private int d() {
        return Build.VERSION.SDK_INT < 21 ? 2131232348 : 2131232349;
    }

    private void e(Intent intent) {
        if (!TextUtils.isEmpty(intent.getStringExtra("launchurl"))) {
            h.b("shared path", "handle intent " + intent.getStringExtra("launchurl"));
        }
        if (TextUtils.isEmpty(intent.getStringExtra("iconurl"))) {
            g(intent, null);
        } else {
            com.bumptech.glide.b.u(OTTApplication.o()).k().K0(intent.getStringExtra("iconurl")).C0(new a(intent));
        }
    }

    private void f() {
        if (Build.VERSION.SDK_INT < 26) {
            startForeground(1, new Notification());
            return;
        }
        String string = getString(R.string.app_name);
        ((NotificationManager) getSystemService("notification")).createNotificationChannel(new NotificationChannel(string, string, 4));
        startForeground(2, new m.i(this, string).R(true).Z(d()).y(getApplicationContext().getResources().getColor(2131100221)).D(getString(R.string.app_name)).T(2).v("service").s(true).G(1).g());
    }

    public void g(Intent intent, Bitmap bitmap) {
        if (TextUtils.isEmpty(intent.getStringExtra("imageurl"))) {
            h(intent, null, null);
        } else {
            com.bumptech.glide.b.u(OTTApplication.o()).k().K0(intent.getStringExtra("imageurl")).C0(new b(360, 200, intent, bitmap));
        }
    }

    public void h(@androidx.annotation.NonNull android.content.Intent r17, android.graphics.Bitmap r18, android.graphics.Bitmap r19) {
        throw new UnsupportedOperationException("Method not decompiled: com.yupptv.ott.cloudmessaging.RichPushService.h(android.content.Intent, android.graphics.Bitmap, android.graphics.Bitmap):void");
    }

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        f();
    }

    @Override
    public int onStartCommand(Intent intent, int i, int i2) {
        e(intent);
        return 2;
    }
}