导航菜单

页面标题

页面副标题

Online Loans v421.2.42 - NotificationTapReceiverActivity.java 源代码

正在查看: Online Loans v421.2.42 应用的 NotificationTapReceiverActivity.java JAVA 源代码文件

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


package org.infobip.mobile.messaging;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import java.util.Iterator;
import org.infobip.mobile.messaging.logging.MobileMessagingLogger;
import org.infobip.mobile.messaging.platform.AndroidBroadcaster;
import org.infobip.mobile.messaging.platform.Broadcaster;

public class NotificationTapReceiverActivity extends Activity {
    public Broadcaster a;
    public MobileMessagingCore b;

    public NotificationTapReceiverActivity() {
    }

    public Broadcaster broadcaster(Context context) {
        if (this.a == null) {
            this.a = new AndroidBroadcaster(context);
        }
        return this.a;
    }

    public void handleNotificationTap(Context context, Intent intent) {
        Bundle bundleExtra = intent.getBundleExtra(BroadcastParameter.EXTRA_MESSAGE);
        if (bundleExtra == null) {
            MobileMessagingLogger.e("Received no message in NotificationTapReceiverActivity");
            return;
        }
        Message createFrom = Message.createFrom(bundleExtra);
        if (createFrom == null) {
            MobileMessagingLogger.e("Received no message in NotificationTapReceiverActivity");
            return;
        }
        Iterator<MessageHandlerModule> it = mobileMessagingCore(context).getMessageHandlerModules().iterator();
        while (it.hasNext()) {
            if (it.next().messageTapped(createFrom)) {
                return;
            }
        }
        broadcaster(context).notificationTapped(createFrom);
        NotificationSettings notificationSettings = mobileMessagingCore(context).getNotificationSettings();
        if (notificationSettings != null && notificationSettings.markSeenOnTap()) {
            mobileMessagingCore(context).setMessagesSeen(createFrom.getMessageId());
        }
    }

    public MobileMessagingCore mobileMessagingCore(Context context) {
        if (this.b == null) {
            this.b = MobileMessagingCore.getInstance(context);
        }
        return this.b;
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        handleNotificationTap(this, getIntent());
        finish();
    }

    @Override
    public void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        handleNotificationTap(this, getIntent());
        finish();
    }

    public NotificationTapReceiverActivity(Broadcaster broadcaster, MobileMessagingCore mobileMessagingCore) {
        this.a = broadcaster;
        this.b = mobileMessagingCore;
    }
}