正在查看: Kahramaa v15.23.3 应用的 HomeFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Kahramaa v15.23.3 应用的 HomeFragment.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.qa.kahramaa.kahramaa.home.fragments;
import android.annotation.TargetApi;
import android.app.KeyguardManager;
import android.content.ActivityNotFoundException;
import android.content.ContentProviderOperation;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.hardware.fingerprint.FingerprintManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.provider.ContactsContract;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView;
import android.widget.Toast;
import androidx.appcompat.app.b;
import androidx.viewpager.widget.ViewPager;
import butterknife.BindView;
import com.qa.kahramaa.kahramaa.base.retrofit.WebServiceFactoryV2;
import com.qa.kahramaa.kahramaa.base.ui.views.FooterBarNewUI;
import com.qa.kahramaa.kahramaa.home.fragments.e;
import ib.s;
import ib.w;
import java.util.ArrayList;
import java.util.Locale;
import nb.q;
import oc.m;
import oc.n;
import oc.o;
import oc.r;
import org.conscrypt.NativeConstants;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import zb.p;
public class HomeFragment extends hb.a {
public static q f4341s0 = null;
public static boolean f4342t0 = false;
@BindView
public ImageView img_help;
public Locale f4343k0;
public mc.e f4346n0;
@BindView
public ViewPager newsPager;
public ArrayList<ContentProviderOperation> f4347o0;
public e.a f4349q0;
public zb.a f4350r0;
@BindView
public ImageView tv_facebook;
@BindView
public ImageView tv_instagram;
@BindView
public ImageView tv_twitter;
@BindView
public ImageView tv_whatsapp;
public int f4344l0 = 0;
public int f4345m0 = 0;
public Handler f4348p0 = new Handler();
public class a implements jb.d {
public final bb.a f4351a;
public a(bb.a aVar) {
this.f4351a = aVar;
}
@Override
public final void a(String str) {
if (!str.equalsIgnoreCase("login") && str.equalsIgnoreCase("cancel")) {
rc.a.a();
HomeFragment.f4342t0 = true;
s.d(this.f4351a.L.f8724a, "finger_print_emp", "true");
}
HomeFragment.f4341s0.dismiss();
}
}
public class b implements Callback<zb.a> {
public b() {
}
@Override
public final void onFailure(Call<zb.a> call, Throwable th) {
}
@Override
public final void onResponse(Call<zb.a> call, Response<zb.a> response) {
try {
HomeFragment.this.f4350r0 = response.body();
if (HomeFragment.this.f4350r0.a().a() != null && !"".equalsIgnoreCase(HomeFragment.this.f4350r0.a().a())) {
HomeFragment homeFragment = HomeFragment.this;
HomeFragment.z0(homeFragment, homeFragment.f4350r0.a().a());
}
HomeFragment homeFragment2 = HomeFragment.this;
HomeFragment.y0(homeFragment2, homeFragment2.f4350r0);
HomeFragment homeFragment3 = HomeFragment.this;
homeFragment3.f8208h0.F(homeFragment3.f4350r0);
} catch (Exception e10) {
HomeFragment homeFragment4 = HomeFragment.this;
q qVar = HomeFragment.f4341s0;
homeFragment4.f8208h0.F(homeFragment4.f4350r0);
e10.printStackTrace();
}
}
}
public static void y0(HomeFragment homeFragment, zb.a aVar) {
homeFragment.getClass();
int t10 = aVar.a().t();
homeFragment.f4344l0 = t10;
if (t10 > 0) {
homeFragment.s0().q.setVisibility(0);
homeFragment.s0().setNotificationCount(homeFragment.f4344l0 + "");
}
}
public static void z0(HomeFragment homeFragment, String str) {
homeFragment.getClass();
if (new u.c(str).a(homeFragment.f8208h0.f()) && homeFragment.p0() != null && homeFragment.D()) {
b.a aVar = new b.a(homeFragment.p0(), 2131755229);
aVar.f955a.f939d = homeFragment.w().getString(2131689543);
aVar.f955a.f = homeFragment.z(2131689540);
aVar.f(homeFragment.z(2131690226), new r(homeFragment));
androidx.appcompat.app.b a10 = aVar.a();
a10.setCanceledOnTouchOutside(false);
a10.show();
}
}
public final void A0(bb.a aVar, KeyguardManager keyguardManager) {
try {
startActivityForResult(keyguardManager.createConfirmDeviceCredentialIntent(aVar.getResources().getString(2131690547), aVar.getResources().getString(2131689655)), 221);
} catch (Exception unused) {
try {
startActivityForResult(new Intent("android.settings.SECURITY_SETTINGS"), 233);
} catch (Exception unused2) {
}
}
}
public final void B0() {
o0(new Intent("android.intent.action.DIAL", Uri.parse("tel:991")));
}
public final void C0() {
com.qa.kahramaa.kahramaa.base.retrofit.q c7 = WebServiceFactoryV2.c(new com.qa.kahramaa.kahramaa.base.retrofit.c(com.qa.kahramaa.kahramaa.base.retrofit.d.a().f3469d, 0));
r0().A();
c7.r(new p("", "")).enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(p0(), new b()));
}
@TargetApi(NativeConstants.SSL3_RT_APPLICATION_DATA)
public final void D0(bb.a aVar) {
FingerprintManager fingerprintManager = (FingerprintManager) aVar.getSystemService("fingerprint");
KeyguardManager keyguardManager = (KeyguardManager) aVar.getSystemService("keyguard");
f4341s0 = new q(aVar, fingerprintManager, keyguardManager);
if (fingerprintManager.isHardwareDetected()) {
if (fingerprintManager.hasEnrolledFingerprints()) {
if (this.f1673t.getString("finger").equalsIgnoreCase("")) {
f4341s0.show(aVar.getFragmentManager(), "");
} else if (s.a(aVar.L.f8724a).getBoolean("finger_print_auth", false)) {
f4341s0.b(p0(), fingerprintManager, keyguardManager, null);
} else if (Build.VERSION.SDK_INT >= 23) {
rc.a.a();
}
} else if (keyguardManager.isDeviceSecure()) {
A0(p0(), keyguardManager);
}
} else if (keyguardManager.isDeviceSecure()) {
A0(p0(), keyguardManager);
} else if (this.f8208h0.k() != null) {
aVar.v(0);
new CustomerFragmentNewUI();
aVar.t(CustomerFragmentNewUI.G0(this.f8208h0.k()));
} else {
new HomeFragment();
HomeFragment homeFragment = new HomeFragment();
Bundle bundle = new Bundle();
bundle.putSerializable("finger", "");
homeFragment.k0(bundle);
aVar.t(homeFragment);
}
f4341s0.f11037o = new a(aVar);
}
@Override
public final void F(int i10, int i11, Intent intent) {
if (i10 != 221) {
if (i10 == 233) {
if (((KeyguardManager) p0().getSystemService("keyguard")).isKeyguardSecure()) {
Toast.makeText(p0(), w().getString(2131689719), 0).show();
A0(p0(), null);
} else {
p0().L.H(true);
}
}
} else if (i11 == -1) {
p0().L.H(false);
p0().v(0);
bb.a p02 = p0();
new CustomerFragmentNewUI();
p02.t(CustomerFragmentNewUI.G0(p0().L.k()));
}
super.F(i10, i11, intent);
}
@Override
public final void I(Bundle bundle) {
super.I(bundle);
}
@Override
public final View J(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
return layoutInflater.inflate(2131492998, viewGroup, false);
}
@Override
public final void Q() {
this.R = true;
Handler handler = this.f4348p0;
if (handler != null) {
handler.removeCallbacks(this.f4349q0);
}
}
@Override
public final void R(int i10, String[] strArr, int[] iArr) {
if (i10 != 100) {
if (i10 != 112) {
return;
}
if (iArr.length <= 0 || iArr[0] != 0) {
w.g(p0(), w().getString(2131690545));
return;
} else {
B0();
return;
}
}
if (iArr.length <= 0 || iArr[0] != 0) {
w.g(p0(), w().getString(2131690545));
return;
}
ArrayList<ContentProviderOperation> arrayList = new ArrayList<>();
this.f4347o0 = arrayList;
arrayList.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI).withValue("account_type", null).withValue("account_name", null).build());
this.f4347o0.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).withValueBackReference("raw_contact_id", 0).withValue("mimetype", "vnd.android.cursor.item/name").withValue("data1", "Kahramaa").build());
this.f4347o0.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).withValueBackReference("raw_contact_id", 0).withValue("mimetype", "vnd.android.cursor.item/email_v2").withValue("data1", "[email protected]").withValue("data2", 2).build());
this.f4347o0.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).withValueBackReference("raw_contact_id", 0).withValue("mimetype", "vnd.android.cursor.item/phone_v2").withValue("data1", "30303991").withValue("data2", 3).build());
this.f4347o0.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI).withValueBackReference("raw_contact_id", 0).withValue("mimetype", "vnd.android.cursor.item/organization").withValue("data1", "Kahramaa").withValue("data2", 1).withValue("data2", 1).build());
try {
p0().getContentResolver().applyBatch("com.android.contacts", this.f4347o0);
String string = w().getString(2131690493);
String string2 = w().getString(2131689597);
String string3 = w().getString(2131690130);
p0();
o oVar = new o(this);
b.a aVar = new b.a(p0(), 2131755016);
aVar.f955a.f = string;
aVar.f(string3, oVar);
aVar.d(string2, oVar);
aVar.h();
} catch (Exception e10) {
e10.printStackTrace();
w.g(p0(), w().getString(2131690545));
}
}
@Override
public final void S() {
this.R = true;
this.f8208h0.J("HOME");
if (this.f8208h0.g().isEmpty()) {
if (Locale.getDefault().getDisplayLanguage().equalsIgnoreCase("English")) {
this.f8208h0.O("en");
return;
} else {
this.f8208h0.O("ar");
return;
}
}
Configuration configuration = new Configuration();
if (this.f8208h0.g().equalsIgnoreCase("en")) {
Locale locale = new Locale("en");
this.f4343k0 = locale;
Locale.setDefault(locale);
configuration.locale = this.f4343k0;
} else if (this.f8208h0.g().equalsIgnoreCase("ar")) {
Locale locale2 = new Locale("ar");
this.f4343k0 = locale2;
Locale.setDefault(locale2);
configuration.locale = this.f4343k0;
}
p0().getResources().updateConfiguration(configuration, null);
this.f4348p0.postDelayed(this.f4349q0, 10000L);
}
@Override
public final void V() {
this.R = true;
q0().setScrollingInFooterBar(false);
Handler handler = this.f4348p0;
if (handler != null) {
handler.removeCallbacks(this.f4349q0);
}
}
@Override
public final void W(View view, Bundle bundle) {
String str;
String str2;
super.W(view, bundle);
((InputMethodManager) p0().getSystemService("input_method")).hideSoftInputFromWindow(this.T.getWindowToken(), 0);
String str3 = null;
if (this.f8208h0.g().isEmpty()) {
Configuration configuration = new Configuration();
if (Locale.getDefault().getDisplayLanguage().equalsIgnoreCase("English")) {
Locale locale = new Locale("en");
this.f4343k0 = locale;
Locale.setDefault(locale);
configuration.locale = this.f4343k0;
this.f8208h0.O("en");
} else {
Locale locale2 = new Locale("ar");
this.f4343k0 = locale2;
Locale.setDefault(locale2);
configuration.locale = this.f4343k0;
this.f8208h0.O("ar");
}
p0().getResources().updateConfiguration(configuration, null);
} else {
Configuration configuration2 = new Configuration();
if (this.f8208h0.g().equalsIgnoreCase("en")) {
Locale locale3 = new Locale("en");
this.f4343k0 = locale3;
Locale.setDefault(locale3);
configuration2.locale = this.f4343k0;
} else if (this.f8208h0.g().equalsIgnoreCase("ar")) {
Locale locale4 = new Locale("ar");
this.f4343k0 = locale4;
Locale.setDefault(locale4);
configuration2.locale = this.f4343k0;
}
p0().getResources().updateConfiguration(configuration2, null);
}
zb.a aVar = new zb.a();
this.f4350r0 = aVar;
this.f8208h0.F(aVar);
C0();
s0().c();
q0().f();
WebServiceFactoryV2.c(new com.qa.kahramaa.kahramaa.base.retrofit.c[0]).R(this.f8208h0.g()).enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(p0(), new e(this)));
this.newsPager.setOnPageChangeListener(new m(this));
String replaceAll = (Build.MANUFACTURER + "" + Build.MODEL).replaceAll("\\s", "");
if (this.f8208h0.e().isEmpty()) {
WebServiceFactoryV2.c(new com.qa.kahramaa.kahramaa.base.retrofit.c(com.qa.kahramaa.kahramaa.base.retrofit.d.a().f3469d, 0)).g0(replaceAll).enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(p0(), new oc.q(this)));
}
s.d(this.f8208h0.f8724a, "home", "Guest");
try {
if (this.f8208h0.k() != null) {
if (this.f8208h0.k() != null && Build.VERSION.SDK_INT >= 23) {
D0(p0());
} else if (Build.VERSION.SDK_INT < 23) {
KeyguardManager keyguardManager = (KeyguardManager) p0().getSystemService("keyguard");
if (this.f8208h0.k() != null) {
if (((KeyguardManager) p0().getSystemService("keyguard")).isKeyguardSecure()) {
A0(p0(), keyguardManager);
} else {
p0().v(0);
bb.a p02 = p0();
new CustomerFragmentNewUI();
p02.t(CustomerFragmentNewUI.G0(this.f8208h0.k()));
}
}
} else if (this.f8208h0.k() != null) {
p0().v(0);
bb.a p03 = p0();
new CustomerFragmentNewUI();
p03.t(CustomerFragmentNewUI.G0(this.f8208h0.k()));
}
}
} catch (Exception e10) {
e10.printStackTrace();
}
try {
str = Build.VERSION.RELEASE;
} catch (Throwable unused) {
str = null;
}
String str4 = "Not found";
if (str != null) {
try {
str3 = Build.VERSION.RELEASE;
} catch (Throwable unused2) {
}
str2 = str3;
} else {
str2 = "Not found";
}
try {
if (ib.r.c() != null) {
str4 = ib.r.c();
}
} catch (Exception e11) {
e11.printStackTrace();
}
WebServiceFactoryV2.c(new com.qa.kahramaa.kahramaa.base.retrofit.c(com.qa.kahramaa.kahramaa.base.retrofit.d.a().f3469d, 0)).l1(new zb.d("", "", this.f8208h0.t(), this.f8208h0.g(), this.f8208h0.f(), str2, str4)).enqueue(new com.qa.kahramaa.kahramaa.base.retrofit.h(p0(), new oa.d()));
}
@Override
public final void X(Bundle bundle) {
this.R = true;
w.b(p0(), 2131099971);
s0().setTitleBarBackgroundColor(w().getColor(2131099703));
zb.a aVar = new zb.a();
this.f4350r0 = aVar;
this.f8208h0.F(aVar);
if (this.f8208h0.g().isEmpty()) {
Configuration configuration = new Configuration();
if (Locale.getDefault().getDisplayLanguage().equalsIgnoreCase("English")) {
Locale locale = new Locale("en");
this.f4343k0 = locale;
Locale.setDefault(locale);
configuration.locale = this.f4343k0;
this.f8208h0.O("en");
} else {
Locale locale2 = new Locale("ar");
this.f4343k0 = locale2;
Locale.setDefault(locale2);
configuration.locale = this.f4343k0;
this.f8208h0.O("ar");
}
C0();
p0().getResources().updateConfiguration(configuration, null);
} else {
Configuration configuration2 = new Configuration();
if (this.f8208h0.g().equalsIgnoreCase("en")) {
Locale locale3 = new Locale("en");
this.f4343k0 = locale3;
Locale.setDefault(locale3);
configuration2.locale = this.f4343k0;
} else if (this.f8208h0.g().equalsIgnoreCase("ar")) {
Locale locale4 = new Locale("ar");
this.f4343k0 = locale4;
Locale.setDefault(locale4);
configuration2.locale = this.f4343k0;
}
C0();
p0().getResources().updateConfiguration(configuration2, null);
}
q0().getClass();
throw null;
}
@Override
public final void onClick(View view) {
boolean z = true;
switch (view.getId()) {
case 2131296967:
String string = w().getString(2131689595);
String string2 = w().getString(2131689597);
String string3 = w().getString(2131689593);
p0();
n nVar = new n(this);
b.a aVar = new b.a(p0(), 2131755016);
aVar.f955a.f = string;
aVar.f(string3, nVar);
aVar.d(string2, nVar);
aVar.h();
break;
case 2131297828:
try {
q().getPackageManager().getPackageInfo("com.facebook.katana", 1);
} catch (PackageManager.NameNotFoundException unused) {
z = false;
}
try {
StringBuilder sb2 = new StringBuilder();
sb2.append(z ? "fb://facewebmodal/f?href=" : "");
sb2.append("https://www.facebook.com/Kahramaa/");
o0(new Intent("android.intent.action.VIEW", Uri.parse(sb2.toString())));
break;
} catch (Exception unused2) {
o0(new Intent("android.intent.action.VIEW", Uri.parse("https://www.facebook.com/kahramaa")));
return;
}
case 2131297849:
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("http://instagram.com/_u/kahramaa"));
intent.setPackage("com.instagram.android");
try {
o0(intent);
break;
} catch (ActivityNotFoundException unused3) {
o0(new Intent("android.intent.action.VIEW", Uri.parse("http://instagram.com/_u/kahramaa")));
return;
}
case 2131297945:
try {
o0(new Intent("android.intent.action.VIEW", Uri.parse("twitter://user?screen_name=Kahramaa")));
break;
} catch (Exception unused4) {
o0(new Intent("android.intent.action.VIEW", Uri.parse("https://twitter.com/#!/Kahramaa")));
return;
}
case 2131297965:
try {
q().getPackageManager().getPackageInfo("com.whatsapp", 1);
} catch (PackageManager.NameNotFoundException unused5) {
z = false;
}
if (!z) {
b.a aVar2 = new b.a(s(), 2131755229);
aVar2.f955a.f939d = w().getString(2131689543);
aVar2.f955a.f = w().getString(2131690131);
aVar2.f(s().getString(2131689721), new oc.p());
androidx.appcompat.app.b a10 = aVar2.a();
a10.setCanceledOnTouchOutside(false);
a10.show();
break;
} else {
try {
Intent intent2 = new Intent("android.intent.action.VIEW");
intent2.setData(Uri.parse("https://api.whatsapp.com/send?phone=+97430303991"));
o0(intent2);
break;
} catch (Exception unused6) {
w.g(p0(), w().getString(2131690284));
return;
}
}
}
}
@Override
public final void v0(FooterBarNewUI footerBarNewUI) {
footerBarNewUI.f();
}
@Override
public final void w0() {
this.img_help.setOnClickListener(this);
this.tv_whatsapp.setOnClickListener(this);
this.tv_instagram.setOnClickListener(this);
this.tv_twitter.setOnClickListener(this);
this.tv_facebook.setOnClickListener(this);
}
}