正在查看: 95爱播免登录版 v3.1.9 应用的 ShowselfService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 95爱播免登录版 v3.1.9 应用的 ShowselfService.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.showself.ui;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.AlarmManager;
import android.app.Dialog;
import android.app.PendingIntent;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.SystemClock;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.view.Display;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import chat.entity.GuideActionInfo;
import chat.entity.MessageDataInfo;
import chat.entity.PushMessageInfo;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.mifeng.ui.R;
import com.showself.domain.LoginResultInfo;
import com.showself.domain.PhotoInfo;
import com.showself.domain.Reward;
import com.showself.fragment.ActivitytFragment;
import com.showself.fragment.SettingFragment;
import com.showself.ui.activity.ActivityDiscussActivity;
import com.showself.ui.fragments.NearByFragment;
import com.showself.ui.photo.PhotoCommentsActivity;
import com.showself.utils.Utils;
import com.showself.utils.k0;
import com.showself.utils.r0;
import com.showself.view.a0;
import com.vivo.push.PushClientConstants;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.packet.Packet;
import org.json.JSONException;
import org.json.JSONObject;
public class ShowselfService extends Service implements com.showself.service.e {
private static ShowselfService o;
public static boolean p;
private Timer a;
private LoginResultInfo b;
public PacketListener c;
private com.showself.provider.f d;
private com.showself.provider.i f2872e;
private com.showself.provider.c f2873f;
private s f2874g;
Dialog f2876i;
private List<GuideActionInfo> f2877j;
private String f2878k;
private com.showself.view.m l;
public int n;
public Handler f2875h = new n();
private int m = -100;
class a implements Runnable {
final TextView a;
final RelativeLayout b;
a(TextView textView, RelativeLayout relativeLayout) {
this.a = textView;
this.b = relativeLayout;
}
@Override
public void run() {
int lineCount = this.a.getLineCount();
ViewGroup.LayoutParams layoutParams = this.b.getLayoutParams();
layoutParams.height = com.showself.utils.r.b(ShowselfService.this.getApplicationContext(), ((lineCount - 1) * 15) + 90);
this.b.setLayoutParams(layoutParams);
}
}
class b implements View.OnClickListener {
final GuideActionInfo a;
b(GuideActionInfo guideActionInfo) {
this.a = guideActionInfo;
}
@Override
public void onClick(View view) {
ShowselfService.this.f2876i.cancel();
GuideActionInfo guideActionInfo = this.a;
if (guideActionInfo != null && Integer.parseInt(guideActionInfo.getAction_type()) == 1) {
ShowselfService.this.w(this.a);
return;
}
ShowselfService.this.m++;
if (ShowselfService.this.f2877j.size() >= ShowselfService.this.m + 1) {
GuideActionInfo guideActionInfo2 = (GuideActionInfo) ShowselfService.this.f2877j.get(ShowselfService.this.m);
if (Integer.parseInt(guideActionInfo2.getAction_type()) == 1) {
ShowselfService.this.F(guideActionInfo2);
} else if (Integer.parseInt(guideActionInfo2.getAction_type()) == 2) {
ShowselfService.this.w(guideActionInfo2);
} else if (Integer.parseInt(guideActionInfo2.getAction_type()) == 3) {
ShowselfService.this.F(guideActionInfo2);
}
}
}
}
class c implements View.OnClickListener {
c() {
}
@Override
public void onClick(View view) {
ShowselfService.this.f2876i.cancel();
}
}
class d implements View.OnClickListener {
d() {
}
@Override
public void onClick(View view) {
((ShowSelfApp) ShowselfService.this.getApplication()).g().startActivity(new Intent(((ShowSelfApp) ShowselfService.this.getApplication()).g(), (Class<?>) HomeActivity.class));
ShowselfService.this.f2876i.cancel();
}
}
class e implements Runnable {
final TextView a;
final RelativeLayout b;
e(TextView textView, RelativeLayout relativeLayout) {
this.a = textView;
this.b = relativeLayout;
}
@Override
public void run() {
int lineCount = this.a.getLineCount();
ViewGroup.LayoutParams layoutParams = this.b.getLayoutParams();
layoutParams.height = com.showself.utils.r.b(ShowselfService.this.getApplicationContext(), ((lineCount - 1) * 15) + 90);
this.b.setLayoutParams(layoutParams);
}
}
class f implements View.OnClickListener {
final PushMessageInfo a;
final List b;
f(PushMessageInfo pushMessageInfo, List list) {
this.a = pushMessageInfo;
this.b = list;
}
@Override
public void onClick(View view) {
HashMap hashMap = new HashMap();
hashMap.put("type", 2);
hashMap.put("pushid", Integer.valueOf(Integer.parseInt(this.a.getPushid())));
hashMap.put("foxid", 0);
com.showself.service.g.c(new com.showself.service.f(10073, hashMap), ShowselfService.this);
List list = this.b;
if (list != null && list.size() > 0) {
ShowselfService.this.B(this.b);
ShowselfService.this.C(0);
GuideActionInfo guideActionInfo = (GuideActionInfo) this.b.get(0);
if (Integer.parseInt(guideActionInfo.getAction_type()) != 3) {
ShowselfService.this.w(guideActionInfo);
}
}
ShowselfService.this.f2876i.cancel();
}
}
class g implements View.OnClickListener {
final PushMessageInfo a;
g(PushMessageInfo pushMessageInfo) {
this.a = pushMessageInfo;
}
@Override
public void onClick(View view) {
HashMap hashMap = new HashMap();
hashMap.put("type", 1);
hashMap.put("pushid", Integer.valueOf(Integer.parseInt(this.a.getPushid())));
hashMap.put("foxid", 0);
com.showself.service.g.c(new com.showself.service.f(10073, hashMap), ShowselfService.this);
ShowselfService.this.f2876i.cancel();
}
}
class h implements View.OnClickListener {
h() {
}
@Override
public void onClick(View view) {
((ShowSelfApp) ShowselfService.this.getApplication()).g().startActivity(new Intent(((ShowSelfApp) ShowselfService.this.getApplication()).g(), (Class<?>) HomeActivity.class));
ShowselfService.this.f2876i.cancel();
}
}
class i extends Thread {
final ArrayList a;
final ArrayList b;
final Message c;
final HashMap d;
i(ArrayList arrayList, ArrayList arrayList2, Message message, HashMap hashMap) {
this.a = arrayList;
this.b = arrayList2;
this.c = message;
this.d = hashMap;
}
@Override
public void run() {
try {
Iterator it = this.a.iterator();
while (it.hasNext()) {
Reward reward = (Reward) it.next();
reward.bitmap = BitmapFactory.decodeStream(new URL(reward.icon_url).openStream());
}
Iterator it2 = this.b.iterator();
while (it2.hasNext()) {
Reward reward2 = (Reward) it2.next();
reward2.bitmap = BitmapFactory.decodeStream(new URL(reward2.icon_url).openStream());
}
Message message = this.c;
message.what = 5;
message.obj = this.d;
ShowselfService.this.f2875h.sendMessage(message);
} catch (Exception unused) {
}
}
}
class j extends Thread {
j() {
}
@Override
public void run() {
com.showself.utils.j.f().d(ShowselfService.this.b.getUserId());
ShowselfService.this.K();
}
}
class k extends TimerTask {
k() {
}
@Override
public void run() {
boolean z;
com.showself.view.m h2;
try {
if (ShowselfService.this.b == null || ShowselfService.this.b.getUserId() == 0) {
ShowselfService showselfService = ShowselfService.this;
showselfService.b = r0.y(showselfService.getApplicationContext());
}
if (ShowselfService.this.z() && ShowselfService.this.b.getSessionId() != null) {
long I = r0.I(ShowselfService.this.b.getUserId());
if (I == 0) {
r0.z0(ShowselfService.this.b.getUserId());
} else {
if (System.currentTimeMillis() - I <= 86400000) {
z = false;
com.showself.net.f.D0().E0(null, null, ShowselfService.this.getApplicationContext(), ShowselfService.this.f2875h, z);
h2 = com.showself.view.m.h();
if (h2 == null && com.showself.view.m.r && h2.l()) {
ShowselfService.this.f2875h.sendEmptyMessage(6);
return;
}
return;
}
r0.z0(ShowselfService.this.b.getUserId());
}
z = true;
com.showself.net.f.D0().E0(null, null, ShowselfService.this.getApplicationContext(), ShowselfService.this.f2875h, z);
h2 = com.showself.view.m.h();
if (h2 == null) {
}
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
class l extends Thread {
l() {
}
@Override
public void run() {
if (ShowselfService.this.b == null || ShowselfService.this.b.getUserId() == 0) {
ShowselfService showselfService = ShowselfService.this;
showselfService.b = r0.y(showselfService.getApplicationContext());
}
if (ShowselfService.this.b.getUserId() != 0) {
com.showself.utils.j.f().j(0);
}
}
}
class m implements Runnable {
m(ShowselfService showselfService) {
}
@Override
public void run() {
com.showself.utils.j.f().c();
}
}
class n extends Handler {
n() {
}
@Override
public void handleMessage(Message message) {
switch (message.what) {
case 1:
ShowselfService.this.H((String) message.obj);
break;
case 2:
if (!com.showself.view.m.j() && ShowselfService.this.z() && !"LoginListActivity_LoginActivity_FindPassGetIdentifyActivity_FindPassSubmitIdentifyActivity_RegisterActivity_TogetherActivity".contains(((ShowSelfApp) ShowselfService.this.getApplication()).g().getClass().getSimpleName())) {
com.showself.view.m.i(ShowselfService.this).n();
break;
}
break;
case 3:
PushMessageInfo pushMessageInfo = (PushMessageInfo) message.obj;
if (Integer.parseInt(((GuideActionInfo) pushMessageInfo.getActionInfos().get(0)).getAction_type()) != 10) {
Dialog dialog = ShowselfService.this.f2876i;
if (dialog != null && dialog.isShowing()) {
ShowselfService.this.f2876i.dismiss();
}
com.showself.view.m h2 = com.showself.view.m.h();
if (h2 != null) {
h2.k();
}
String simpleName = ((ShowSelfApp) ShowselfService.this.getApplication()).g().getClass().getSimpleName();
if (ShowselfService.this.z() && !"LoginListActivity_LoginActivity_FindPassGetIdentifyActivity_FindPassSubmitIdentifyActivity_RegisterActivity_TogetherActivity".contains(simpleName)) {
if (h2 != null && com.showself.view.m.r) {
h2.m();
}
ShowselfService.this.G(pushMessageInfo);
break;
}
} else {
HashMap hashMap = new HashMap();
hashMap.put("category", 10);
hashMap.put("sub_category", Integer.valueOf(Integer.parseInt(((GuideActionInfo) pushMessageInfo.getActionInfos().get(0)).getAction_sub_type())));
hashMap.put("pushid", Integer.valueOf(Integer.parseInt(pushMessageInfo.getPushid())));
com.showself.service.f fVar = new com.showself.service.f(10121, hashMap);
com.showself.service.g.b(ShowselfService.this);
com.showself.service.g.c(fVar, ShowselfService.this);
break;
}
break;
case 4:
com.showself.service.f fVar2 = new com.showself.service.f(10089, new HashMap());
com.showself.service.g.b(ShowselfService.this);
com.showself.service.g.c(fVar2, ShowselfService.this);
break;
case 5:
HashMap hashMap2 = (HashMap) message.obj;
Dialog dialog2 = ShowselfService.this.f2876i;
if (dialog2 != null && dialog2.isShowing()) {
ShowselfService.this.f2876i.dismiss();
}
String simpleName2 = ((ShowSelfApp) ShowselfService.this.getApplication()).g().getClass().getSimpleName();
if (ShowselfService.this.z() && !"LoginListActivity_LoginActivity_FindPassGetIdentifyActivity_FindPassSubmitIdentifyActivity_RegisterActivity_TogetherActivity".contains(simpleName2)) {
a0 n = a0.n(ShowselfService.this);
if (!n.p()) {
n.q(((Integer) hashMap2.get("day")).intValue(), (ArrayList) hashMap2.get("rewards"), (ArrayList) hashMap2.get("extra_rewards"));
n.r(false, false);
break;
}
}
break;
case 6:
com.showself.view.m h3 = com.showself.view.m.h();
if (h3 != null && com.showself.view.m.r) {
h3.m();
break;
}
break;
case 7:
HashMap hashMap3 = new HashMap();
hashMap3.put("category", 1);
com.showself.service.f fVar3 = new com.showself.service.f(10121, hashMap3);
com.showself.service.g.b(ShowselfService.this);
com.showself.service.g.c(fVar3, ShowselfService.this);
break;
case 8:
Activity g2 = ((ShowSelfApp) ShowselfService.this.getApplication()).g();
if (g2 != null) {
"LoginListActivity_LoginActivity_FindPassGetIdentifyActivity_FindPassSubmitIdentifyActivity_RegisterActivity_TogetherActivity".contains(g2.getClass().getSimpleName());
break;
}
break;
}
}
}
class o implements Runnable {
o(ShowselfService showselfService) {
}
@Override
public void run() {
com.showself.utils.j.f().c();
}
}
class p implements Runnable {
final TextView a;
final RelativeLayout b;
p(TextView textView, RelativeLayout relativeLayout) {
this.a = textView;
this.b = relativeLayout;
}
@Override
public void run() {
int lineCount = this.a.getLineCount();
ViewGroup.LayoutParams layoutParams = this.b.getLayoutParams();
layoutParams.height = com.showself.utils.r.b(ShowselfService.this.getApplicationContext(), ((lineCount - 1) * 15) + 90);
this.b.setLayoutParams(layoutParams);
}
}
class q implements View.OnClickListener {
q() {
}
@Override
public void onClick(View view) {
ShowselfService.this.f2876i.cancel();
}
}
class r implements View.OnClickListener {
r() {
}
@Override
public void onClick(View view) {
ShowselfService.this.f2876i.cancel();
}
}
private class s extends BroadcastReceiver {
private s() {
}
@Override
public void onReceive(Context context, Intent intent) {
if (intent != null) {
if ("com.showself.action_enter_background".equals(intent.getAction())) {
ShowselfService.this.M();
ShowselfService.this.J();
ShowselfService.this.N();
} else if ("com.showself.action_enter_foreground".equals(intent.getAction())) {
ShowselfService.this.I();
ShowselfService.this.K();
ShowselfService.this.J();
} else if ("com.showself.action_finish_launch".equals(intent.getAction())) {
ShowselfService.this.I();
ShowselfService.this.K();
ShowselfService.this.J();
}
}
}
s(ShowselfService showselfService, j jVar) {
this();
}
}
private class t extends PhoneStateListener {
private t() {
}
@Override
public void onCallStateChanged(int i2, String str) {
if (i2 == 1) {
Dialog dialog = ShowselfService.this.f2876i;
if (dialog != null && dialog.isShowing()) {
ShowselfService.this.f2876i.dismiss();
}
a0 n = a0.n(ShowselfService.this);
if (n.p()) {
n.m();
}
ShowselfService.this.sendBroadcast(new Intent("com.showself.pause_play"));
}
super.onCallStateChanged(i2, str);
}
t(ShowselfService showselfService, j jVar) {
this();
}
}
public class u implements PacketListener {
public u() {
}
@Override
public void processPacket(org.jivesoftware.smack.packet.Packet r73) {
throw new UnsupportedOperationException("Method not decompiled: com.showself.ui.ShowselfService.u.processPacket(org.jivesoftware.smack.packet.Packet):void");
}
}
public void A(Packet packet, MessageDataInfo messageDataInfo) {
String[] split = packet.getFrom().trim().split("@");
if (messageDataInfo == null || TextUtils.isEmpty(messageDataInfo.getId())) {
return;
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("_res", messageDataInfo.getId());
com.showself.utils.j.f().i(split[0], jSONObject.toString(), getApplicationContext());
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public void F(GuideActionInfo guideActionInfo) {
try {
Dialog dialog = this.f2876i;
if (dialog != null && dialog.isShowing()) {
this.f2876i.dismiss();
this.f2876i = null;
}
this.f2876i = new Dialog(this, 2131755755);
View inflate = LayoutInflater.from(this).inflate(R.layout.message_second_dialog, (ViewGroup) null);
Button button = (Button) inflate.findViewById(R.id.btn_cancel);
RelativeLayout relativeLayout = (RelativeLayout) inflate.findViewById(R.id.rl_message_content);
TextView textView = (TextView) inflate.findViewById(R.id.tv_content);
ImageView imageView = (ImageView) inflate.findViewById(R.id.iv_message_dialog_close);
ImageView imageView2 = (ImageView) inflate.findViewById(R.id.iv_fox);
textView.setText(guideActionInfo.getContent());
button.setText(guideActionInfo.getFirst_button());
new Handler().postDelayed(new a(textView, relativeLayout), 100L);
this.f2876i.setContentView(inflate);
this.f2876i.setCancelable(true);
this.f2876i.getWindow().setType(2008);
this.f2876i.getWindow().setType(PushConstants.NOTIFICATION_SERVICE_SEND_MESSAGE);
this.f2876i.show();
WindowManager.LayoutParams attributes = this.f2876i.getWindow().getAttributes();
Display defaultDisplay = ((WindowManager) getSystemService("window")).getDefaultDisplay();
if (defaultDisplay.getHeight() > defaultDisplay.getWidth()) {
attributes.width = (int) (defaultDisplay.getWidth() * 1.0d);
} else {
attributes.width = (int) (defaultDisplay.getWidth() * 0.5d);
}
this.f2876i.getWindow().setAttributes(attributes);
button.setOnClickListener(new b(guideActionInfo));
imageView.setOnClickListener(new c());
imageView2.setOnClickListener(new d());
} catch (Exception e2) {
e2.printStackTrace();
}
}
public void G(PushMessageInfo pushMessageInfo) {
try {
List actionInfos = pushMessageInfo.getActionInfos();
Dialog dialog = this.f2876i;
if (dialog != null && dialog.isShowing()) {
this.f2876i.dismiss();
this.f2876i = null;
}
this.f2876i = new Dialog(this, 2131755755);
View inflate = LayoutInflater.from(this).inflate(R.layout.message_second_dialog, (ViewGroup) null);
Button button = (Button) inflate.findViewById(R.id.btn_cancel);
RelativeLayout relativeLayout = (RelativeLayout) inflate.findViewById(R.id.rl_message_content);
TextView textView = (TextView) inflate.findViewById(R.id.tv_content);
ImageView imageView = (ImageView) inflate.findViewById(R.id.iv_message_dialog_close);
ImageView imageView2 = (ImageView) inflate.findViewById(R.id.iv_fox);
textView.setText(((GuideActionInfo) actionInfos.get(0)).getContent());
button.setText(((GuideActionInfo) actionInfos.get(0)).getFirst_button());
new Handler().postDelayed(new e(textView, relativeLayout), 100L);
this.f2876i.setContentView(inflate);
this.f2876i.setCancelable(true);
this.f2876i.getWindow().setType(2008);
this.f2876i.getWindow().setType(PushConstants.NOTIFICATION_SERVICE_SEND_MESSAGE);
this.f2876i.show();
WindowManager.LayoutParams attributes = this.f2876i.getWindow().getAttributes();
Display defaultDisplay = ((WindowManager) getSystemService("window")).getDefaultDisplay();
if (defaultDisplay.getHeight() > defaultDisplay.getWidth()) {
attributes.width = (int) (defaultDisplay.getWidth() * 1.0d);
} else {
attributes.width = (int) (defaultDisplay.getWidth() * 0.5d);
}
this.f2876i.getWindow().setAttributes(attributes);
button.setOnClickListener(new f(pushMessageInfo, actionInfos));
imageView.setOnClickListener(new g(pushMessageInfo));
imageView2.setOnClickListener(new h());
} catch (Exception e2) {
e2.printStackTrace();
}
}
public void H(String str) {
try {
Dialog dialog = this.f2876i;
if (dialog != null && dialog.isShowing()) {
this.f2876i.dismiss();
this.f2876i = null;
}
this.f2876i = new Dialog(this, 2131755755);
View inflate = LayoutInflater.from(this).inflate(R.layout.message_second_dialog, (ViewGroup) null);
Button button = (Button) inflate.findViewById(R.id.btn_cancel);
RelativeLayout relativeLayout = (RelativeLayout) inflate.findViewById(R.id.rl_message_content);
TextView textView = (TextView) inflate.findViewById(R.id.tv_content);
ImageView imageView = (ImageView) inflate.findViewById(R.id.iv_message_dialog_close);
textView.setText(str);
new Handler().postDelayed(new p(textView, relativeLayout), 100L);
this.f2876i.setContentView(inflate);
this.f2876i.setCancelable(true);
this.f2876i.getWindow().setType(2008);
this.f2876i.getWindow().setType(PushConstants.NOTIFICATION_SERVICE_SEND_MESSAGE);
this.f2876i.show();
WindowManager.LayoutParams attributes = this.f2876i.getWindow().getAttributes();
Display defaultDisplay = ((WindowManager) getSystemService("window")).getDefaultDisplay();
if (defaultDisplay.getHeight() > defaultDisplay.getWidth()) {
attributes.width = (int) (defaultDisplay.getWidth() * 1.0d);
} else {
attributes.width = (int) (defaultDisplay.getWidth() * 0.5d);
}
this.f2876i.getWindow().setAttributes(attributes);
button.setOnClickListener(new q());
imageView.setOnClickListener(new r());
} catch (Exception e2) {
e2.printStackTrace();
}
}
public void I() {
LoginResultInfo loginResultInfo = this.b;
if (loginResultInfo == null || loginResultInfo.getSessionId() == null) {
return;
}
M();
this.a = new Timer();
int notificationInterval = this.b.getNotificationInterval();
if (notificationInterval < 60) {
notificationInterval = 60;
}
this.a.scheduleAtFixedRate(new k(), 0L, notificationInterval * 1000);
}
public void J() {
k0 k2 = k0.k();
L();
AlarmManager alarmManager = (AlarmManager) getSystemService("alarm");
if (z()) {
int o2 = k2.o();
Intent intent = new Intent(getApplicationContext(), (Class<?>) ShowselfService.class);
intent.setAction("com.showself.ui.mid_notification");
alarmManager.setRepeating(3, SystemClock.elapsedRealtime(), o2 * 1000, PendingIntent.getService(getApplicationContext(), 0, intent, 134217728));
}
}
public void K() {
if (k0.y()) {
return;
}
new l().start();
}
private void L() {
try {
AlarmManager alarmManager = (AlarmManager) getSystemService("alarm");
Intent intent = new Intent(getApplicationContext(), (Class<?>) ShowselfService.class);
intent.setAction("com.showself.ui.mid_notification");
alarmManager.cancel(PendingIntent.getService(getApplicationContext(), 0, intent, 134217728));
} catch (Exception e2) {
e2.printStackTrace();
}
}
public void M() {
Timer timer = this.a;
if (timer != null) {
timer.cancel();
this.a = null;
}
}
public void N() {
if (k0.y()) {
return;
}
new Thread(new m(this)).start();
}
public static ShowselfService x() {
return o;
}
public boolean z() {
String packageName = getPackageName();
List<ActivityManager.RunningTaskInfo> runningTasks = ((ActivityManager) getSystemService(PushConstants.INTENT_ACTIVITY_NAME)).getRunningTasks(1);
return runningTasks.size() > 0 && packageName.equals(runningTasks.get(0).topActivity.getPackageName());
}
public void B(List<GuideActionInfo> list) {
this.f2877j = list;
}
public void C(int i2) {
this.m = i2;
}
public void D(com.showself.view.m mVar) {
this.l = mVar;
}
public void E(String str) {
this.f2878k = str;
}
@Override
public void a(Object... objArr) {
int intValue = ((Integer) objArr[0]).intValue();
if (intValue != 10073) {
com.showself.service.g.j(this);
}
HashMap hashMap = (HashMap) objArr[1];
if (hashMap != null) {
int intValue2 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
String str = (String) hashMap.get(com.showself.net.e.o1);
if (intValue != 10021 && intValue != 10052) {
if (intValue == 10068) {
if (intValue2 == com.showself.net.e.m1) {
return;
}
Utils.Z0(this, str);
return;
}
if (intValue != 10074) {
if (intValue == 10089) {
new i((ArrayList) hashMap.get("rewards"), (ArrayList) hashMap.get("extra_rewards"), this.f2875h.obtainMessage(), hashMap).start();
return;
}
if (intValue != 10121) {
return;
}
if (intValue2 != com.showself.net.e.m1) {
Utils.Z0(this, str);
return;
}
Message obtainMessage = this.f2875h.obtainMessage();
HashMap hashMap2 = (HashMap) hashMap.get("allData");
if (((Integer) hashMap2.get("show_type")).intValue() == 1) {
obtainMessage.arg1 = 1;
} else {
obtainMessage.arg1 = 2;
}
obtainMessage.what = 8;
obtainMessage.obj = hashMap2;
this.f2875h.sendMessage(obtainMessage);
return;
}
}
if (intValue2 != com.showself.net.e.m1) {
Utils.Z0(getApplicationContext(), str);
return;
}
Utils.Z0(getApplicationContext(), str);
if (this.m == 0) {
com.showself.provider.f.h().e(this.f2878k, this.n);
}
com.showself.view.m mVar = this.l;
if (mVar != null) {
mVar.k();
}
this.m++;
int size = this.f2877j.size();
int i2 = this.m;
if (size >= i2 + 1) {
GuideActionInfo guideActionInfo = this.f2877j.get(i2);
if (Integer.parseInt(guideActionInfo.getAction_type()) == 1) {
F(guideActionInfo);
} else if (Integer.parseInt(guideActionInfo.getAction_type()) == 2) {
w(guideActionInfo);
} else if (Integer.parseInt(guideActionInfo.getAction_type()) == 3) {
F(guideActionInfo);
}
}
}
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onCreate() {
super.onCreate();
this.b = r0.y(getApplicationContext());
o = this;
j jVar = null;
this.f2874g = new s(this, jVar);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction("com.showself.action_enter_background");
intentFilter.addAction("com.showself.action_enter_foreground");
intentFilter.addAction("com.showself.action_finish_launch");
registerReceiver(this.f2874g, intentFilter);
y();
if (!k0.y()) {
new j().start();
}
I();
J();
try {
((TelephonyManager) getSystemService("phone")).listen(new t(this, jVar), 32);
} catch (Exception unused) {
}
}
@Override
public void onDestroy() {
super.onDestroy();
M();
L();
s sVar = this.f2874g;
if (sVar != null) {
unregisterReceiver(sVar);
}
com.showself.service.g.j(this);
new Thread(new o(this)).start();
}
@Override
public void onStart(Intent intent, int i2) {
o = this;
super.onStart(intent, i2);
}
@Override
public int onStartCommand(Intent intent, int i2, int i3) {
LoginResultInfo loginResultInfo;
String action = intent != null ? intent.getAction() : null;
if (action != null && action.equals("com.showself.ui.mid_notification") && ((loginResultInfo = this.b) == null || loginResultInfo.getUserId() == 0)) {
this.b = r0.y(getApplicationContext());
}
return super.onStartCommand(intent, i2, i3);
}
public void w(GuideActionInfo guideActionInfo) {
try {
int parseInt = Integer.parseInt(guideActionInfo.getAction_sub_type());
if (parseInt == 1) {
HashMap hashMap = new HashMap();
hashMap.put("pid", Integer.valueOf(Integer.parseInt(guideActionInfo.getPid())));
hashMap.put("type", "praisephoto");
com.showself.service.f fVar = new com.showself.service.f(10021, hashMap);
com.showself.service.g.b(this);
com.showself.service.g.c(fVar, this);
} else if (parseInt == 2) {
HashMap hashMap2 = new HashMap();
hashMap2.put("pid", Integer.valueOf(Integer.parseInt(guideActionInfo.getFuid())));
hashMap2.put("type", "love");
hashMap2.put("note", "");
com.showself.service.f fVar2 = new com.showself.service.f(10021, hashMap2);
com.showself.service.g.b(this);
com.showself.service.g.c(fVar2, this);
} else if (parseInt == 3) {
HashMap hashMap3 = new HashMap();
hashMap3.put("fuid", Integer.valueOf(Integer.parseInt(guideActionInfo.getFuid())));
hashMap3.put("type", 1);
com.showself.service.f fVar3 = new com.showself.service.f(10052, hashMap3);
com.showself.service.g.b(this);
com.showself.service.g.c(fVar3, this);
} else if (parseInt == 4) {
HashMap hashMap4 = new HashMap();
hashMap4.put("pid", guideActionInfo.getAct_id());
hashMap4.put("type", "vote");
hashMap4.put("fuid", guideActionInfo.getFuid());
com.showself.service.f fVar4 = new com.showself.service.f(10021, hashMap4);
com.showself.service.g.b(this);
com.showself.service.g.c(fVar4, this);
} else if (parseInt == 13) {
Intent intent = new Intent();
intent.setClass(((ShowSelfApp) getApplication()).g(), FindActivity.class);
intent.putExtra(PushClientConstants.TAG_CLASS_NAME, NearByFragment.class.getName());
intent.putExtra("title", "附近");
((ShowSelfApp) getApplication()).g().startActivity(intent);
} else if (parseInt == 19) {
d.c.a.S(((ShowSelfApp) getApplication()).g(), Integer.parseInt(guideActionInfo.getFuid()), guideActionInfo.getAvatar(), guideActionInfo.getNickname(), "0");
} else if (parseInt == 29) {
F(guideActionInfo);
} else if (parseInt == 35) {
((ShowSelfApp) getApplication()).g().startActivity(new Intent("android.intent.action.VIEW", Uri.parse(guideActionInfo.getBigurl())));
com.showself.provider.f.h().e(this.f2878k, this.n);
} else if (parseInt == 15) {
Intent intent2 = new Intent(((ShowSelfApp) getApplication()).g(), (Class<?>) GiftActivity.class);
intent2.putExtra("fuid", Integer.parseInt(guideActionInfo.getFuid()));
((ShowSelfApp) getApplication()).g().startActivity(intent2);
} else if (parseInt != 16) {
switch (parseInt) {
case 6:
HashMap hashMap5 = new HashMap();
hashMap5.put("pid", Integer.valueOf(Integer.parseInt(guideActionInfo.getPid())));
com.showself.service.f fVar5 = new com.showself.service.f(10074, hashMap5);
com.showself.service.g.b(this);
com.showself.service.g.c(fVar5, this);
break;
case 7:
((ShowSelfApp) getApplication()).g().startActivity(new Intent(((ShowSelfApp) getApplication()).g(), (Class<?>) HomeActivity.class));
break;
case 8:
Intent intent3 = new Intent(((ShowSelfApp) getApplication()).g(), (Class<?>) CardActivity.class);
intent3.putExtra("id", Integer.parseInt(guideActionInfo.getFuid()));
intent3.putExtra("tab", 2);
((ShowSelfApp) getApplication()).g().startActivity(intent3);
break;
case 9:
Intent intent4 = new Intent(((ShowSelfApp) getApplication()).g(), (Class<?>) CardActivity.class);
intent4.putExtra("id", Integer.parseInt(guideActionInfo.getFuid()));
intent4.putExtra("tab", 1);
((ShowSelfApp) getApplication()).g().startActivity(intent4);
break;
case 10:
com.showself.utils.c1.e.a(((ShowSelfApp) getApplication()).g());
break;
case 11:
Intent intent5 = new Intent();
intent5.setClass(((ShowSelfApp) getApplication()).g(), FragmentContainerActivity.class);
intent5.putExtra(PushClientConstants.TAG_CLASS_NAME, ActivitytFragment.class.getName());
((ShowSelfApp) getApplication()).g().startActivity(intent5);
break;
default:
switch (parseInt) {
case 23:
Intent intent6 = new Intent();
intent6.setClass(((ShowSelfApp) getApplication()).g(), FragmentContainerActivity.class);
intent6.putExtra(PushClientConstants.TAG_CLASS_NAME, SettingFragment.class.getName());
((ShowSelfApp) getApplication()).g().startActivity(intent6);
break;
case 24:
Intent intent7 = new Intent(((ShowSelfApp) getApplication()).g(), (Class<?>) ActivityDiscussActivity.class);
intent7.putExtra("aid", Integer.parseInt(guideActionInfo.getAct_id()));
intent7.putExtra("aname", guideActionInfo.getAct_title());
intent7.putExtra("ruleUrl", guideActionInfo.getAct_rule());
((ShowSelfApp) getApplication()).g().startActivity(intent7);
break;
case 25:
Intent intent8 = new Intent();
intent8.setClass(((ShowSelfApp) getApplication()).g(), SearchUserActivity.class);
((ShowSelfApp) getApplication()).g().startActivity(intent8);
break;
case 26:
ArrayList arrayList = new ArrayList();
PhotoInfo photoInfo = new PhotoInfo();
photoInfo.setPid(Integer.parseInt(guideActionInfo.getPid()));
photoInfo.setBigUrl(guideActionInfo.getBigurl());
photoInfo.setCommentNum(Integer.parseInt(guideActionInfo.getComment_num()));
photoInfo.setPraiseNum(Integer.parseInt(guideActionInfo.getPraise_num()));
photoInfo.setUid(Integer.parseInt(guideActionInfo.getFuid()));
photoInfo.setGender(Integer.parseInt(guideActionInfo.getGender()));
photoInfo.setAvatar(guideActionInfo.getAvatar());
photoInfo.setNickName(guideActionInfo.getNickname());
photoInfo.setActionid(Integer.parseInt(guideActionInfo.getIs_prise()));
arrayList.add(photoInfo);
com.showself.ui.f.b(arrayList);
Intent intent9 = new Intent(((ShowSelfApp) getApplication()).g(), (Class<?>) PhotoScrollActivity.class);
intent9.putExtra("index", 0);
intent9.putExtra("phototype", 3);
((ShowSelfApp) getApplication()).g().startActivity(intent9);
break;
}
}
} else {
Intent intent10 = new Intent(((ShowSelfApp) getApplication()).g(), (Class<?>) PhotoCommentsActivity.class);
intent10.putExtra("pid", Integer.parseInt(guideActionInfo.getPid()));
intent10.putExtra("fuid", Integer.parseInt(guideActionInfo.getFuid()));
intent10.putExtra("fnickname", guideActionInfo.getNickname());
intent10.putExtra("imageurl", guideActionInfo.getBigurl());
((ShowSelfApp) getApplication()).g().startActivity(intent10);
}
} catch (Exception unused) {
com.showself.utils.p.d("ShowselfService", "executeAction()-->error");
}
}
public void y() {
this.c = new u();
}
}