导航菜单

页面标题

页面副标题

饼干视频 v4.1.0 - OSETWeatherDetailsActivity.java 源代码

正在查看: 饼干视频 v4.1.0 应用的 OSETWeatherDetailsActivity.java JAVA 源代码文件

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


package com.kc.openset.activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.jiagu.sdk.OSETSDKProtected;
import com.kc.openset.R;
import com.kc.openset.ad.banner.OSETBanner;
import com.kc.openset.ad.banner.OSETBannerAd;
import com.kc.openset.ad.intestitial.OSETInterstitialAd;
import com.kc.openset.ad.listener.OSETBannerAdLoadListener;
import com.kc.openset.ad.listener.OSETBannerListener;
import com.kc.openset.ad.listener.OSETInterstitialAdLoadListener;
import com.kc.openset.ad.listener.OSETInterstitialListener;
import com.kc.openset.adapter.OSETWeatherAdapter;
import com.kc.openset.bean.j;
import com.kc.openset.util.z;
import com.qihoo.SdkProtected.OSETSDK.ईऌओओआऊउउईउ;
import java.io.IOException;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

@ईऌओओआऊउउईउ
public class OSETWeatherDetailsActivity extends Activity {
    private RecyclerView a;
    private TextView b;
    private TextView c;
    private TextView d;
    private TextView e;
    private TextView f;
    private ImageView g;
    private ImageView h;
    private FrameLayout i;
    private Activity j;
    private String k;
    private OSETWeatherAdapter l;
    private String m;
    private String n;
    private String o;
    private String p;
    private String q;
    private String r;
    private List<j> s;
    private String t;
    private String u;
    private OSETInterstitialAd w;
    private OSETBannerAd x;
    private final Handler v = new c(Looper.getMainLooper());
    private final OSETBannerListener y = new f();

    @ईऌओओआऊउउईउ
    public class a implements View.OnClickListener {
        static {
            OSETSDKProtected.interface11(83);
        }

        public a() {
        }

        @Override
        public native void onClick(View view);
    }

    @ईऌओओआऊउउईउ
    public class b implements Callback {
        static {
            OSETSDKProtected.interface11(84);
        }

        public b() {
        }

        public native void onFailure(Call call, IOException iOException);

        public native void onResponse(Call call, Response response);
    }

    @ईऌओओआऊउउईउ
    public class c extends Handler {
        public c(Looper looper) {
            super(looper);
        }

        @Override
        public void handleMessage(Message message) {
            super.handleMessage(message);
            int i = message.what;
            if (i == 0) {
                OSETWeatherDetailsActivity.this.g();
            } else {
                if (i != 1) {
                    return;
                }
                Toast.makeText(OSETWeatherDetailsActivity.this.j, OSETWeatherDetailsActivity.this.m, 0).show();
            }
        }
    }

    @ईऌओओआऊउउईउ
    public class d implements OSETInterstitialAdLoadListener {

        @ईऌओओआऊउउईउ
        public class a implements OSETInterstitialListener {
            static {
                OSETSDKProtected.interface11(86);
            }

            public a() {
            }

            @Override
            public native void onClick();

            @Override
            public native void onClose();

            @Override
            public native void onError(String str, String str2);

            @Override
            public native void onShow();
        }

        static {
            OSETSDKProtected.interface11(87);
        }

        public d() {
        }

        @Override
        public native void onLoadFail(String str, String str2);

        @Override
        public native void onLoadSuccess(OSETInterstitialAd oSETInterstitialAd);
    }

    @ईऌओओआऊउउईउ
    public class e implements OSETBannerAdLoadListener {
        static {
            OSETSDKProtected.interface11(88);
        }

        public e() {
        }

        @Override
        public native void onLoadFail(String str, String str2);

        @Override
        public native void onLoadSuccess(OSETBannerAd oSETBannerAd);
    }

    @ईऌओओआऊउउईउ
    public class f implements OSETBannerListener {
        static {
            OSETSDKProtected.interface11(89);
        }

        public f() {
        }

        @Override
        public native void onClick(View view);

        @Override
        public native void onClose(View view);

        @Override
        public native void onError(String str, String str2);

        @Override
        public native void onRenderSuccess(View view);

        @Override
        public native void onShow(View view);
    }

    public void a() {
        OSETBannerAd oSETBannerAd = this.x;
        if (oSETBannerAd != null) {
            oSETBannerAd.destroy();
            this.x = null;
        }
    }

    public void b() {
        OSETInterstitialAd oSETInterstitialAd = this.w;
        if (oSETInterstitialAd != null) {
            oSETInterstitialAd.destroy();
            this.w = null;
        }
    }

    private void c() {
        HashMap hashMap = new HashMap();
        hashMap.put("deviceId", z.f());
        hashMap.put("appKey", com.kc.openset.config.d.l());
        hashMap.put("city", this.k);
        com.kc.openset.b.a("http://content-api.shenshiads.com/weather", hashMap, new b());
    }

    private String d() {
        Date date = new Date();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        int i = calendar.get(7);
        return i == 1 ? "星期日" : i == 2 ? "星期一" : i == 3 ? "星期二" : i == 4 ? "星期三" : i == 5 ? "星期四" : i == 6 ? "星期五" : i == 7 ? "星期六" : "";
    }

    private void e() {
        ((OSETBanner) ((OSETBanner) OSETBanner.getInstance().setPosId(this.t)).setContext(this)).loadAd(new e());
    }

    private void f() {
        com.kc.openset.ad.intestitial.c.a().setContext(this).setPosId(this.u).loadAd(new d());
    }

    public void g() {
        TextView textView;
        String str;
        ImageView imageView;
        int i;
        this.l.a(this.s);
        int parseInt = Integer.parseInt(this.p);
        if (parseInt <= 50) {
            textView = this.d;
            str = "优";
        } else if (parseInt <= 100) {
            textView = this.d;
            str = "良";
        } else if (parseInt <= 150) {
            textView = this.d;
            str = "轻";
        } else if (parseInt <= 200) {
            textView = this.d;
            str = "中";
        } else if (parseInt <= 300) {
            textView = this.d;
            str = "重";
        } else if (parseInt <= 500) {
            textView = this.d;
            str = "严";
        } else {
            textView = this.d;
            str = "危";
        }
        textView.setText(str);
        this.c.setText(this.n);
        if (this.n.indexOf("晴") >= 0) {
            imageView = this.g;
            i = R.mipmap.oset_weather_fine;
        } else if (this.n.indexOf("雷") >= 0) {
            imageView = this.g;
            i = R.mipmap.oset_weather_thunder;
        } else if (this.n.indexOf("雨") >= 0) {
            imageView = this.g;
            i = R.mipmap.oset_weather_rain;
        } else {
            imageView = this.g;
            i = R.mipmap.oset_weather_cloud;
        }
        imageView.setImageResource(i);
        this.e.setText(this.o + "°");
        this.f.setText("今日 " + d() + "  |  " + this.q + "  |  湿度" + this.r + "%");
    }

    @Override
    public void finish() {
        super.finish();
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R.layout.oset_activity_weather_details);
        this.j = this;
        this.a = findViewById(R.id.rv_weather);
        this.b = (TextView) findViewById(R.id.tv_city);
        this.d = (TextView) findViewById(R.id.tv_aqi);
        this.e = (TextView) findViewById(R.id.tv_temperature);
        this.f = (TextView) findViewById(R.id.tv_desc);
        this.c = (TextView) findViewById(R.id.tv_weather);
        this.g = (ImageView) findViewById(R.id.iv_weather);
        this.h = (ImageView) findViewById(R.id.iv_back);
        this.i = (FrameLayout) findViewById(R.id.fl_banner);
        String stringExtra = getIntent().getStringExtra("city");
        this.k = stringExtra;
        this.b.setText(stringExtra);
        this.a.setLayoutManager(new LinearLayoutManager(this.j, 0, false));
        OSETWeatherAdapter oSETWeatherAdapter = new OSETWeatherAdapter();
        this.l = oSETWeatherAdapter;
        this.a.setAdapter(oSETWeatherAdapter);
        this.t = getIntent().getStringExtra("bannerId");
        this.u = getIntent().getStringExtra("insertId");
        c();
        this.h.setOnClickListener(new a());
        e();
        f();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        b();
        a();
        this.v.removeCallbacksAndMessages(null);
    }
}