翰林优商.apk(点击下载) / NativeAdBroadcastReceiver.java


package com.sigmob.sdk.nativead;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import com.czhj.sdk.common.utils.Preconditions;
import com.sigmob.sdk.base.common.BaseBroadcastReceiver;
import com.sigmob.sdk.base.models.IntentActions;
import com.sigmob.sdk.nativead.c;

public class NativeAdBroadcastReceiver extends BaseBroadcastReceiver {
    private static IntentFilter a;
    private c.a b;

    public NativeAdBroadcastReceiver(c.a aVar, String str) {
        super(str);
        this.b = aVar;
        a();
    }

    @Override // com.sigmob.sdk.base.common.BaseBroadcastReceiver
    public IntentFilter a() {
        if (a == null) {
            IntentFilter intentFilter = new IntentFilter();
            a = intentFilter;
            intentFilter.addAction(IntentActions.ACTION_NATIVE_TEMPLIE_SHOW);
            a.addAction(IntentActions.ACTION_NATIVE_TEMPLE_CLICK);
            a.addAction(IntentActions.ACTION_NATIVE_TEMPLE_DISMISS);
            a.addAction(IntentActions.ACTION_LANDPAGE_SHOW);
            a.addAction(IntentActions.ACTION_LANDPAGE_DISMISS);
        }
        return a;
    }

    @Override // com.sigmob.sdk.base.common.BaseBroadcastReceiver
    public void b(BroadcastReceiver broadcastReceiver) {
        super.b(broadcastReceiver);
        this.b = null;
    }

    public void onReceive(Context context, Intent intent) {
        Preconditions.NoThrow.checkNotNull(context);
        Preconditions.NoThrow.checkNotNull(intent);
        if (this.b != null && a(intent)) {
            String action = intent.getAction();
            action.hashCode();
            char c = 65535;
            switch (action.hashCode()) {
                case -2086188808:
                    if (action.equals(IntentActions.ACTION_NATIVE_TEMPLE_CLICK)) {
                        c = 0;
                        break;
                    }
                    break;
                case -1655972816:
                    if (action.equals(IntentActions.ACTION_LANDPAGE_SHOW)) {
                        c = 1;
                        break;
                    }
                    break;
                case -1487323017:
                    if (action.equals(IntentActions.ACTION_LANDPAGE_DISMISS)) {
                        c = 2;
                        break;
                    }
                    break;
                case -482465395:
                    if (action.equals(IntentActions.ACTION_NATIVE_TEMPLIE_SHOW)) {
                        c = 3;
                        break;
                    }
                    break;
                case 1733433850:
                    if (action.equals(IntentActions.ACTION_NATIVE_TEMPLE_DISMISS)) {
                        c = 4;
                        break;
                    }
                    break;
            }
            switch (c) {
                case 0:
                    this.b.d();
                    return;
                case 1:
                    this.b.a();
                    return;
                case 2:
                    this.b.b();
                    return;
                case 3:
                    this.b.c();
                    return;
                case 4:
                    this.b.e();
                    return;
                default:
                    return;
            }
        }
    }
}