整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 OSETWeatherDetailsActivity.java 源代码,内容仅作参考
package com.kc.openset.activity;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
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.OSETBanner;
import com.kc.openset.OSETListener;
import com.kc.openset.R;
import com.kc.openset.ad.u;
import com.kc.openset.bean.j;
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 com.od.a.c 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 OSETBanner v;
private Handler w = new c();
class a implements View.OnClickListener {
static {
OSETSDKProtected.interface11(168);
}
a() {
}
@Override
public native void onClick(View view);
}
public class b implements Callback {
static {
OSETSDKProtected.interface11(169);
}
b() {
}
@Override
public native void onFailure(Call call, IOException iOException);
@Override
public native void onResponse(Call call, Response response);
}
class c extends Handler {
c() {
}
@Override
public void handleMessage(Message message) {
super.handleMessage(message);
int i = message.what;
if (i == 0) {
OSETWeatherDetailsActivity.this.e();
} else if (i != 1) {
} else {
Toast.makeText(OSETWeatherDetailsActivity.this.j, OSETWeatherDetailsActivity.this.m, 0).show();
}
}
}
private void a() {
HashMap hashMap = new HashMap();
hashMap.put("deviceId", com.kc.openset.a.b(this.j));
hashMap.put("appKey", com.kc.openset.a.w);
hashMap.put("city", this.k);
com.kc.openset.b.a(this.j, "http://content-api.shenshiads.com/weather", hashMap, new b());
}
private String b() {
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 c() {
OSETBanner oSETBanner = OSETBanner.getInstance();
this.v = oSETBanner;
oSETBanner.show(this.j, this.t, this.i, new OSETListener() {
static {
OSETSDKProtected.interface11(167);
}
@Override
public native void onClick();
@Override
public native void onClose();
@Override
public native void onError(String str, String str2);
@Override
public native void onShow();
});
}
private void d() {
u.getInstance().setContext(this).setPosId(this.u).showAd(this);
}
public void e() {
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);
TextView textView2 = this.e;
textView2.setText(this.o + "°");
TextView textView3 = this.f;
textView3.setText("今日 " + b() + " | " + this.q + " | 湿度" + this.r + "%");
}
@Override
public void finish() {
super.finish();
OSETBanner oSETBanner = this.v;
if (oSETBanner != null) {
oSETBanner.destroy();
}
u.getInstance().a((Activity) this);
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.oset_activity_weather_details);
this.j = this;
this.a = (RecyclerView) 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));
com.od.a.c cVar = new com.od.a.c();
this.l = cVar;
this.a.setAdapter(cVar);
this.t = getIntent().getStringExtra("bannerId");
this.u = getIntent().getStringExtra("insertId");
a();
this.h.setOnClickListener(new a());
c();
d();
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}