导航菜单

页面标题

页面副标题

Vi App v10.18.0 - PTPushNotificationReceiver.java 源代码

正在查看: Vi App v10.18.0 应用的 PTPushNotificationReceiver.java JAVA 源代码文件

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


package com.clevertap.android.pushtemplates;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.clevertap.android.sdk.CleverTapAPI;
import com.clevertap.android.sdk.Constants;
import com.clevertap.android.sdk.pushnotification.CTPushNotificationReceiver;
import com.clevertap.android.sdk.task.CTExecutorFactory;
import java.util.concurrent.Callable;

public class PTPushNotificationReceiver extends CTPushNotificationReceiver {
    @Override
    public void onReceive(final Context context, final Intent intent) {
        if (intent.getStringExtra(Constants.DEEP_LINK_KEY) == null) {
            intent.removeExtra(Constants.DEEP_LINK_KEY);
        }
        super.onReceive(context, intent);
        Bundle extras = intent.getExtras();
        if (extras == null) {
            return;
        }
        CleverTapAPI globalInstance = CleverTapAPI.getGlobalInstance(context, extras.getString(Constants.WZRK_ACCT_ID_KEY));
        if (globalInstance == null) {
            PTLog.verbose("clevertap instance is null, not running PTPushNotificationReceiver#cleanUpFiles");
            return;
        }
        try {
            CTExecutorFactory.executors(globalInstance.getCoreState().getConfig()).postAsyncSafelyTask().execute("PTPushNotificationReceiver#cleanUpFiles", new Callable<Void>() {
                @Override
                public Void call() throws Exception {
                    try {
                        Utils.deleteImageFromStorage(context, intent);
                        Utils.deleteSilentNotificationChannel(context);
                        return null;
                    } catch (Throwable th) {
                        PTLog.verbose("Couldn't clean up images and/or couldn't delete silent notification channel: " + th.getLocalizedMessage());
                        return null;
                    }
                }
            });
        } catch (Exception e) {
            PTLog.verbose("Couldn't clean up images and/or couldn't delete silent notification channel: " + e.getLocalizedMessage());
        }
    }
}