正在查看: Meine NEW v2.0.3616 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Meine NEW v2.0.3616 应用的 i.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package m5;
import android.R;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.IntentSender;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.graphics.Bitmap;
import android.location.LocationManager;
import android.media.AudioManager;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Build;
import android.os.Bundle;
import android.os.Message;
import android.preference.PreferenceManager;
import android.speech.tts.TextToSpeech;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.inputmethod.InputMethodManager;
import android.webkit.ClientCertRequest;
import android.webkit.DownloadListener;
import android.webkit.GeolocationPermissions;
import android.webkit.HttpAuthHandler;
import android.webkit.PermissionRequest;
import android.webkit.SslErrorHandler;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.EditText;
import android.widget.LinearLayout;
import androidx.appcompat.app.AlertController;
import androidx.appcompat.app.e;
import androidx.appcompat.widget.h1;
import androidx.core.content.FileProvider;
import androidx.fragment.app.Fragment;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.google.android.gms.auth.api.signin.GoogleSignIn;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.fitness.Fitness;
import com.google.android.gms.fitness.data.DataType;
import com.google.android.gms.nearby.Nearby;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.microsoft.identity.common.adal.internal.AuthenticationConstants;
import com.microsoft.identity.common.internal.authscheme.PopAuthenticationSchemeInternal;
import com.microsoft.identity.common.internal.eststelemetry.SchemaConstants;
import com.new_service_gmbh.mapp.ActivityPDF;
import com.new_service_gmbh.mapp.MainApplication;
import com.new_service_gmbh.mapp.PopupActivity;
import com.new_service_gmbh.mapp.views.ZoomableWebView;
import g5.b0;
import g5.m0;
import java.io.File;
import java.util.Iterator;
import org.json.JSONException;
import org.json.JSONObject;
import w1.l;
public class i extends Fragment implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
public static j5.a B;
public static i C;
public View c;
public long d;
public ZoomableWebView e;
public SwipeRefreshLayout j;
public View k;
public ValueCallback<Uri[]> l;
public String m;
public TextToSpeech n;
public BottomNavigationView o;
public MenuItem p;
public MenuItem q;
public y2.a r;
public GoogleApiClient s;
public k5.g t;
public androidx.activity.result.c<Intent> v;
public androidx.activity.result.c<Intent> w;
public androidx.activity.result.c<Intent> x;
public androidx.activity.result.c<Intent> y;
public int f = 0;
public int g = 0;
public boolean h = true;
public String i = null;
public boolean u = true;
public final a z = new a();
public final d A = new d();
public class a extends BroadcastReceiver {
public a() {
}
@Override
public final void onReceive(Context context, Intent intent) {
i.b(i.this);
}
}
public class b extends WebChromeClient {
public b() {
}
@Override
public final void onCloseWindow(WebView webView) {
super.onCloseWindow(webView);
i iVar = i.this;
if (iVar.getActivity().isTaskRoot()) {
return;
}
iVar.getActivity().finish();
}
@Override
public final boolean onCreateWindow(WebView webView, boolean z, boolean z2, Message message) {
i iVar = i.this;
Intent intent = new Intent(iVar.getActivity().getBaseContext(), (Class<?>) PopupActivity.class);
((MainApplication) iVar.getActivity().getApplicationContext()).j = message;
j5.a aVar = i.B;
intent.putExtra("useragent", aVar != null ? aVar.t : null);
iVar.startActivity(intent);
return true;
}
@Override
public final void onGeolocationPermissionsShowPrompt(String str, GeolocationPermissions.Callback callback) {
j5.a aVar = i.B;
i iVar = i.this;
if (b0.a.checkSelfPermission(iVar.getActivity(), "android.permission.ACCESS_FINE_LOCATION") != 0) {
g5.j.m("Location permission has not been granted.");
a0.a.a(iVar.getActivity(), new String[]{"android.permission.ACCESS_FINE_LOCATION"}, 14);
}
callback.invoke(str, true, false);
}
@Override
public final void onPermissionRequest(PermissionRequest permissionRequest) {
i iVar = i.this;
if (b0.a.checkSelfPermission(iVar.getActivity(), "android.permission.CAMERA") == 0) {
permissionRequest.grant(permissionRequest.getResources());
} else {
g5.j.m("Camera permission has not been granted.");
a0.a.a(iVar.getActivity(), new String[]{"android.permission.CAMERA"}, 18);
}
}
@Override
public final void onReceivedTitle(WebView webView, String str) {
super.onReceivedTitle(webView, str);
if (!i.B.H || TextUtils.isEmpty(str)) {
return;
}
i.this.getActivity().getSupportActionBar().v(str);
}
@Override
public final boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> valueCallback, WebChromeClient.FileChooserParams fileChooserParams) {
i iVar = i.this;
ValueCallback<Uri[]> valueCallback2 = iVar.l;
if (valueCallback2 != null) {
valueCallback2.onReceiveValue(null);
}
iVar.l = valueCallback;
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
if (intent.resolveActivity(iVar.getActivity().getPackageManager()) != null) {
try {
File file = new File(iVar.getActivity().getFilesDir(), "images");
if (!file.exists()) {
file.mkdirs();
}
Uri b = FileProvider.a(iVar.getActivity().getApplicationContext(), "de.new_energie.meinenew.provider").b(new File(file, "image.jpg"));
iVar.m = b.toString();
iVar.getActivity().getApplicationContext().grantUriPermission(iVar.getActivity().getApplicationContext().getPackageName(), b, 3);
intent.putExtra("output", b);
} catch (Exception e) {
g5.j.l(e);
g5.j.m("Unable to create Image File");
}
}
Intent intent2 = new Intent("android.intent.action.GET_CONTENT");
intent2.addCategory("android.intent.category.OPENABLE");
intent2.setType("image/*");
Intent[] intentArr = {intent};
Intent intent3 = new Intent("android.intent.action.CHOOSER");
intent3.putExtra("android.intent.extra.INTENT", intent2);
intent3.putExtra("android.intent.extra.TITLE", iVar.getString(2131886233));
intent3.putExtra("android.intent.extra.INITIAL_INTENTS", intentArr);
iVar.x.a(intent3);
return true;
}
}
public class c extends WebViewClient {
public static final int d = 0;
public final SharedPreferences a;
public final j5.p b;
public c(SharedPreferences sharedPreferences, j5.p pVar) {
this.a = sharedPreferences;
this.b = pVar;
}
@Override
public final void doUpdateVisitedHistory(WebView webView, String str, boolean z) {
super.doUpdateVisitedHistory(webView, str, z);
i.this.t.getClass();
}
@Override
public final void onPageFinished(WebView webView, String str) {
j5.p pVar = this.b;
i iVar = i.this;
k5.g gVar = iVar.t;
int i = 0;
if (!gVar.m && gVar.a != null) {
gVar.c.runOnUiThread(new k5.b(gVar, i));
}
iVar.k.animate().alpha(0.0f).setDuration(250L);
iVar.j.setEnabled(false);
iVar.j.setRefreshing(false);
if (iVar.getActivity().getIntent().getBooleanExtra("feedback", false) && iVar.getActivity().getIntent().hasExtra("screenshot")) {
String stringExtra = iVar.getActivity().getIntent().getStringExtra("screenshot");
iVar.e.loadUrl("javascript:if (typeof __setScreenshot === 'function') __setScreenshot('data:image/jpeg;base64," + stringExtra + "'); void 0");
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("persid", this.a.getString("persid", ""));
jSONObject.put("pwd", j5.o.f(iVar.getActivity().getApplicationContext()));
jSONObject.put("providerid", k5.g.c(iVar.getActivity().getApplicationContext()));
jSONObject.put("deviceid", m0.i(iVar.getActivity().getApplicationContext()));
jSONObject.put("companynumber", pVar.k("profile_companynumber", ""));
jSONObject.put("department", pVar.k("profile_department", ""));
jSONObject.put("name", pVar.k("profile_name", ""));
jSONObject.put("email", pVar.k("profile_email", ""));
if (!pVar.k("vouchercode", "").equals("")) {
jSONObject.put("vouchercode", pVar.k("vouchercode", ""));
}
if (!pVar.k("newcardcode", "").equals("")) {
jSONObject.put("newcardcode", pVar.k("newcardcode", ""));
}
if (!pVar.k("newcardchilds", "").equals("")) {
jSONObject.put("newcardchilds", pVar.k("newcardchilds", SchemaConstants.Value.FALSE));
}
try {
PackageInfo packageInfo = iVar.getActivity().getPackageManager().getPackageInfo("com.google.android.webview", 0);
jSONObject.put("webviewversionname", packageInfo.versionName);
jSONObject.put("webviewversioncode", packageInfo.versionCode);
} catch (PackageManager.NameNotFoundException unused) {
}
try {
jSONObject.put("gpsenabled", ((LocationManager) iVar.getActivity().getSystemService("location")).isProviderEnabled("gps"));
} catch (Exception unused2) {
}
try {
jSONObject.put("appversion", iVar.getActivity().getPackageManager().getPackageInfo(iVar.getActivity().getPackageName(), 0).versionName);
} catch (Exception unused3) {
}
jSONObject.put("osversion", Build.VERSION.RELEASE);
jSONObject.put("devicetype", Build.MODEL);
jSONObject.put("update", i.B.c);
jSONObject.put("article_id", i.B.a);
if (iVar.getActivity().getPreferences(0).getBoolean("fitness_active", false)) {
jSONObject.put("fitness_enabled", true);
}
if (iVar.i != null) {
JSONObject jSONObject2 = new JSONObject(iVar.i);
jSONObject.put("extraparameters", jSONObject2);
JSONObject jSONObject3 = new JSONObject(jSONObject2.toString());
jSONObject3.remove("once");
iVar.i = jSONObject3.toString();
}
} catch (Exception unused4) {
}
iVar.e.loadUrl("javascript:if (typeof __setNEWProperties === 'function') __setNEWProperties(" + jSONObject.toString() + "); void 0");
if (iVar.getActivity().getPreferences(0).getBoolean("fitness_active", false)) {
iVar.e.loadUrl("javascript:if (typeof __setStepStart === 'function') __setStepStart(true); void 0");
}
if (i.B.k) {
iVar.e.requestFocus(130);
((InputMethodManager) iVar.getActivity().getSystemService("input_method")).showSoftInput(iVar.e, 1);
}
String str2 = i.B.E;
if (str2 != null) {
iVar.e.loadUrl(str2);
}
JSONObject jSONObject4 = i.B.F;
if (jSONObject4 == null || !jSONObject4.has(str)) {
return;
}
try {
iVar.e.loadUrl(i.B.F.getString(str));
} catch (Exception e) {
g5.j.l(e);
}
}
@Override
public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
super.onPageStarted(webView, str, bitmap);
i.this.k.animate().alpha(1.0f).setDuration(250L);
}
@Override
public final void onReceivedClientCertRequest(WebView webView, ClientCertRequest clientCertRequest) {
g5.j.m("onReceivedClientCertRequest");
super.onReceivedClientCertRequest(webView, clientCertRequest);
}
@Override
@TargetApi(23)
public final void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
if (webResourceError.getErrorCode() != -2) {
super.onReceivedError(webView, webResourceRequest, webResourceError);
return;
}
if (i.B.A) {
StringBuilder sb = new StringBuilder("<html><head><title>Fehlerseite</title><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\"></head><body><div style=\"-webkit-transform: translate(-50%,-50%);position: absolute;left:50%;top:50%;text-align: center;\"><img src=\"");
i iVar = i.this;
sb.append(iVar.getString(2131886138));
sb.append("\"><p style=\"margin-top:40px;font-size:20px;font-family: sans-serif;\">Beim Laden des Inhaltes ist ein Fehler unterlaufen.</p></div></body></html>");
iVar.e.loadData(sb.toString(), "text/html; charset=UTF-8", null);
iVar.e.j = true;
}
}
@Override
public final void onReceivedHttpAuthRequest(WebView webView, final HttpAuthHandler httpAuthHandler, String str, String str2) {
g5.j.m("");
i iVar = i.this;
final EditText editText = new EditText(iVar.getActivity());
editText.setHint(2131886570);
final EditText editText2 = new EditText(iVar.getActivity());
editText2.setHint(2131886503);
editText2.setInputType(129);
LinearLayout linearLayout = new LinearLayout(iVar.getActivity());
linearLayout.setOrientation(1);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
layoutParams.setMargins(30, 20, 30, 0);
linearLayout.addView(editText, layoutParams);
linearLayout.addView(editText2, layoutParams);
linearLayout.setPadding(0, (int) (25 * iVar.getResources().getDisplayMetrics().density), 0, 0);
e.a aVar = new e.a(iVar.getActivity());
String str3 = i.B.b;
AlertController.b bVar = aVar.a;
bVar.e = str3;
bVar.q = linearLayout;
bVar.l = false;
aVar.c(2131886307, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
httpAuthHandler.proceed(editText.getText().toString(), editText2.getText().toString());
dialogInterface.dismiss();
}
});
g5.d dVar = new g5.d(webView, 4);
bVar.j = bVar.a.getText(2131886108);
bVar.k = dVar;
if (webView != null) {
aVar.e();
}
}
@Override
public final void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
g5.j.m(sslError.toString());
if (sslError.getPrimaryError() != 3) {
g5.j.m(sslError.toString());
sslErrorHandler.cancel();
} else if (sslError.getCertificate().getIssuedBy().getCName().equals("NEW-SUBCA-02")) {
sslErrorHandler.proceed();
} else {
g5.j.m(sslError.toString());
sslErrorHandler.cancel();
}
}
@Override
public final WebResourceResponse shouldInterceptRequest(WebView webView, String str) {
return super.shouldInterceptRequest(webView, str);
}
@Override
public final boolean shouldOverrideUrlLoading(final android.webkit.WebView r28, java.lang.String r29) {
throw new UnsupportedOperationException("Method not decompiled: m5.i.c.shouldOverrideUrlLoading(android.webkit.WebView, java.lang.String):boolean");
}
@Override
@TargetApi(21)
public final WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
WebResourceResponse webResourceResponse;
WebResourceResponse webResourceResponse2;
if (webResourceRequest.getUrl().toString().startsWith("https://login.microsoftonline.com/494aa4dd-1c7b-453f-88b1-513bbe6982d0/saml1") || webResourceRequest.getUrl().toString().startsWith("https://login.microsoftonline.com/494aa4dd-1c7b-453f-88b1-513bbe6982d0/saml2")) {
i.this.t.g(i.B, webResourceRequest.getUrl().toString());
}
String uri = webResourceRequest.getUrl().toString();
if (uri.contains("/favicon.ico")) {
try {
webResourceResponse2 = new WebResourceResponse("", "", 404, "Not found", null, null);
} catch (NoSuchMethodError unused) {
webResourceResponse = new WebResourceResponse("image/*", "base64", webView.getResources().openRawResource(2131820547));
}
} else {
if (uri.endsWith("/fonts/MaterialIcons-Regular.woff2")) {
webResourceResponse = new WebResourceResponse("application/octet-stream", "base64", webView.getResources().openRawResource(2131820552));
} else if (uri.endsWith("/fonts/MaterialIcons-Regular.woff")) {
webResourceResponse = new WebResourceResponse("application/octet-stream", "base64", webView.getResources().openRawResource(2131820551));
} else if (uri.endsWith("/fonts/MaterialIcons-Regular.ttf")) {
webResourceResponse = new WebResourceResponse("application/octet-stream", "base64", webView.getResources().openRawResource(2131820550));
} else {
try {
String a = ((MainApplication) webView.getContext().getApplicationContext()).a(uri);
if (a != null) {
webResourceResponse2 = ((MainApplication) webView.getContext().getApplicationContext()).b().l(a);
}
} catch (Exception unused2) {
}
webResourceResponse2 = null;
}
webResourceResponse2 = webResourceResponse;
}
return webResourceResponse2 == null ? super.shouldInterceptRequest(webView, webResourceRequest) : webResourceResponse2;
}
@Override
public final void onReceivedError(WebView webView, int i, String str, String str2) {
super.onReceivedError(webView, i, str, str2);
}
}
public class d extends BroadcastReceiver {
public d() {
}
@Override
public final void onReceive(android.content.Context r10, android.content.Intent r11) {
throw new UnsupportedOperationException("Method not decompiled: m5.i.d.onReceive(android.content.Context, android.content.Intent):void");
}
}
public static void b(i iVar) {
int streamVolume = ((AudioManager) iVar.getActivity().getSystemService("audio")).getStreamVolume(3);
a aVar = iVar.z;
try {
if (streamVolume == 0) {
iVar.c.findViewById(2131297005).setVisibility(0);
iVar.getActivity().registerReceiver(aVar, new IntentFilter("android.media.VOLUME_CHANGED_ACTION"));
} else {
iVar.c.findViewById(2131297005).setVisibility(8);
iVar.getActivity().unregisterReceiver(aVar);
}
} catch (Exception unused) {
}
iVar.c.findViewById(2131297005).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
j5.a aVar2 = i.B;
view.setVisibility(8);
}
});
}
public final void a(String str) {
getActivity().runOnUiThread(new h1((Object) null, 11));
androidx.appcompat.app.e a2 = new e.a(getActivity()).a();
a2.setTitle(2131886255);
a2.d(R.drawable.ic_menu_info_details);
a2.c(-1, "OK", new b0(2));
a2.e(str);
a2.show();
}
public final void c() {
int i = 0;
getActivity().getPreferences(0).edit().putBoolean("fitness_active", true).apply();
if (GoogleSignIn.getLastSignedInAccount(getActivity()) == null) {
this.e.loadUrl("javascript:if (typeof __setStepStart === 'function') __setStepStart(false); void 0");
} else {
Fitness.getRecordingClient(getActivity(), GoogleSignIn.getLastSignedInAccount(getActivity())).subscribe(DataType.TYPE_STEP_COUNT_CUMULATIVE).addOnSuccessListener(new m5.b(this, i)).addOnFailureListener(new m5.c(this, i));
}
}
public final void d(j5.a aVar) {
if (aVar != null) {
String str = aVar.b;
if (str != null && !str.equals("")) {
getActivity().getSupportActionBar().v(aVar.b);
}
if (aVar.e.startsWith("http://") || aVar.e.startsWith(AuthenticationConstants.Broker.REDIRECT_SSL_PREFIX)) {
if (aVar.x) {
i5.e.a(this.e.getContext(), aVar.e);
}
this.e.loadUrl(aVar.e);
} else {
this.e.loadDataWithBaseURL("https://meine.new.de", aVar.e, "text/html", "UTF-8", null);
}
SharedPreferences preferences = getActivity().getPreferences(0);
if (aVar.y) {
this.e.getSettings().setTextZoom(preferences.getInt("article_size", this.e.getSettings().getTextZoom()));
}
}
}
public final void e() {
if (getActivity().getPackageManager().hasSystemFeature("android.hardware.bluetooth_le")) {
this.s = new GoogleApiClient.Builder(getActivity()).addApi(Nearby.MESSAGES_API).addConnectionCallbacks(this).enableAutoManage(getActivity(), this).build();
} else {
this.e.loadUrl("javascript:if (typeof __BTError === 'function') __BTError('Bluetooth Low Energy nicht verfügbar!'); void 0");
}
}
public final void onActivityResult(int i, int i2, Intent intent) {
g5.j.m("onActivityResult:" + i + ":" + i2);
j5.a aVar = B;
if (aVar != null && aVar.u && i == 1001) {
return;
}
if (i != 6001) {
if (i == 26 && i2 == -1) {
c();
return;
}
return;
}
if (i2 != -1) {
g5.j.m("GoogleApiClient connection failed. Unable to resolve.");
return;
}
GoogleApiClient googleApiClient = this.s;
if (googleApiClient != null) {
googleApiClient.connect();
}
}
public final void onAttach(Context context) {
super.onAttach(context);
this.v = registerForActivityResult(new b.c(), new m5.d(this, 0));
int i = 1;
this.w = registerForActivityResult(new b.c(), new m5.b(this, i));
this.x = registerForActivityResult(new b.c(), new m5.c(this, i));
this.y = registerForActivityResult(new b.c(), new m5.d(this, i));
}
public final boolean onBackPressed() {
ZoomableWebView zoomableWebView = this.e;
if (zoomableWebView == null || !zoomableWebView.canGoBack()) {
return true;
}
ZoomableWebView zoomableWebView2 = this.e;
if (zoomableWebView2.j || zoomableWebView2.getUrl().equals(B.s)) {
return true;
}
this.e.goBack();
return false;
}
public final void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
int i = configuration.orientation;
}
public final void onConnectionFailed(ConnectionResult connectionResult) {
if (!connectionResult.hasResolution()) {
g5.j.m(connectionResult.toString());
return;
}
try {
connectionResult.startResolutionForResult(getActivity(), 6001);
} catch (IntentSender.SendIntentException e) {
g5.j.l(e);
}
}
public final void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
boolean z;
menuInflater.inflate(2131623938, menu);
MenuItem findItem = menu.findItem(2131296714);
this.p = findItem;
j5.a aVar = B;
if (aVar != null && findItem != null && aVar.l == 1) {
if (aVar.p) {
findItem.setVisible(true);
this.p.setEnabled(true);
}
Iterator<j5.f> it = ((MainApplication) getActivity().getApplicationContext()).b().i().iterator();
while (true) {
if (!it.hasNext()) {
z = false;
break;
} else if (it.next().a == B.a + 1000000) {
z = true;
break;
}
}
if (z) {
this.p.setIcon(2131230952);
this.p.setChecked(true);
} else {
this.p.setIcon(2131230951);
this.p.setChecked(false);
}
}
j5.a aVar2 = B;
if (aVar2 == null || !aVar2.z || getActivity().getIntent().getBooleanExtra("feedback", false)) {
menu.findItem(2131296715).setVisible(false);
}
}
public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(2131492955, viewGroup, false);
this.c = inflate;
return inflate;
}
public final void onDestroy() {
ZoomableWebView zoomableWebView = this.e;
if (zoomableWebView != null) {
zoomableWebView.loadUrl("javascript:if (typeof __onWebViewDestroy === 'function') __onWebViewDestroy(); void 0");
}
if (C == this) {
C = null;
}
this.l = null;
TextToSpeech textToSpeech = this.n;
if (textToSpeech != null) {
textToSpeech.stop();
this.n.shutdown();
}
super.onDestroy();
ZoomableWebView zoomableWebView2 = this.e;
if (zoomableWebView2 != null) {
((ViewGroup) zoomableWebView2.getParent()).removeView(this.e);
this.e.removeAllViews();
this.e.clearHistory();
this.e.destroy();
this.e = null;
}
}
public final boolean onOptionsItemSelected(android.view.MenuItem r9) {
throw new UnsupportedOperationException("Method not decompiled: m5.i.onOptionsItemSelected(android.view.MenuItem):boolean");
}
public final void onPause() {
super.onPause();
try {
getActivity().unregisterReceiver(this.A);
} catch (IllegalArgumentException unused) {
}
try {
getActivity().unregisterReceiver(this.z);
} catch (IllegalArgumentException unused2) {
}
TextToSpeech textToSpeech = this.n;
if (textToSpeech != null) {
textToSpeech.stop();
this.n.shutdown();
}
}
public final void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
if (i == 14) {
if (iArr.length <= 0 || iArr[0] != 0) {
return;
}
d(B);
return;
}
if (i == 18 && iArr.length > 0 && iArr[0] == 0) {
d(B);
}
}
public final void onResume() {
super.onResume();
getActivity();
C = this;
try {
getActivity().registerReceiver(this.A, new IntentFilter("de.new_energie.meinenew"));
} catch (IllegalArgumentException e) {
g5.j.l(e);
}
}
public final void onStop() {
super.onStop();
GoogleApiClient googleApiClient = this.s;
if (googleApiClient == null || !googleApiClient.isConnected()) {
return;
}
this.s.disconnect();
}
@SuppressLint({"RestrictedApi"})
public final void onViewCreated(View view, Bundle bundle) {
boolean z;
boolean z2;
super.onViewCreated(view, bundle);
C = this;
setHasOptionsMenu(true);
if (getActivity().getIntent() != null) {
if (getActivity().getIntent().getExtras().containsKey("id")) {
this.d = getActivity().getIntent().getExtras().getLong("id");
}
if (getActivity().getIntent().getExtras().containsKey("extraparameters")) {
this.i = getActivity().getIntent().getExtras().getString("extraparameters");
}
}
ZoomableWebView zoomableWebView = (ZoomableWebView) this.c.findViewById(2131296602);
this.e = zoomableWebView;
this.t = new k5.g(zoomableWebView, getActivity());
BottomNavigationView findViewById = this.c.findViewById(2131296600);
this.o = findViewById;
int i = 2;
findViewById.setOnNavigationItemSelectedListener(new m5.d(this, i));
this.j = this.c.findViewById(2131296965);
this.k = this.c.findViewById(2131296859);
this.e.setLayerType(2, null);
j5.p b2 = ((MainApplication) getActivity().getApplicationContext()).b();
j5.a e = b2.e(this.d);
B = e;
if (e != null) {
if (this.i != null) {
try {
JSONObject jSONObject = new JSONObject(this.i);
if (jSONObject.has("forceurl")) {
B.e = jSONObject.getString("forceurl");
String str = B.e;
}
} catch (Exception unused) {
}
}
j5.a aVar = B;
if (aVar.i) {
try {
String replace = aVar.e.replace("$vouchercode$", b2.k("vouchercode", ""));
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse(replace));
startActivity(intent);
} catch (Exception unused2) {
}
getActivity().finish();
}
String str2 = B.D;
if (str2 != null) {
if (str2.equals("MIXED_CONTENT_ALWAYS_ALLOW")) {
this.e.getSettings().setMixedContentMode(0);
} else if (B.D.equals("MIXED_CONTENT_COMPATIBILITY_MODE")) {
this.e.getSettings().setMixedContentMode(2);
}
}
if (B.C) {
this.j.setOnRefreshListener(new m5.b(this, i));
}
this.e.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
@Override
public final void onScrollChanged() {
i iVar = i.this;
ZoomableWebView zoomableWebView2 = iVar.e;
if (zoomableWebView2 == null) {
return;
}
int scrollY = zoomableWebView2.getScrollY();
iVar.g = scrollY;
if (i.B.C) {
iVar.j.setEnabled(scrollY == 0);
}
if (Math.floor((iVar.e.getContentHeight() * iVar.getResources().getDisplayMetrics().density) - iVar.e.getHeight()) != iVar.e.getScrollY()) {
int i2 = iVar.g;
int i3 = iVar.f;
if (i2 > i3) {
if (iVar.h) {
Intent intent2 = new Intent("de.new_energie.meinenew");
intent2.putExtra("action", "wv.scrolldown");
iVar.getActivity().sendBroadcast(intent2);
iVar.h = false;
}
} else if (i2 < i3 && !iVar.h) {
Intent intent3 = new Intent("de.new_energie.meinenew");
intent3.putExtra("action", "wv.scrollup");
iVar.getActivity().sendBroadcast(intent3);
iVar.h = true;
}
} else if (iVar.h) {
Intent intent4 = new Intent("de.new_energie.meinenew");
intent4.putExtra("action", "wv.scrolldown");
iVar.getActivity().sendBroadcast(intent4);
iVar.h = false;
}
iVar.f = iVar.g;
}
});
if (B.r) {
getActivity().getSupportActionBar().f();
}
int i2 = 3;
if (B.y) {
this.e.setOnScaleChangeListener(new m5.d(this, i2));
}
ZoomableWebView zoomableWebView2 = this.e;
zoomableWebView2.i = B.y;
zoomableWebView2.getSettings().setSupportZoom(!B.y);
if (B.p) {
this.o.setVisibility(8);
} else {
Menu menu = this.o.getMenu();
menu.findItem(2131296333).setEnabled(B.e.contains("__ttsOut"));
MenuItem findItem = menu.findItem(2131296332);
this.q = findItem;
int i3 = B.m;
if (i3 == 3) {
menu.removeItem(findItem.getItemId());
} else {
findItem.setEnabled(i3 == 1);
if (B.m == 1) {
String[] split = b2.k("likes", "").split(SchemaConstants.SEPARATOR_COMMA);
int length = split.length;
int i4 = 0;
while (true) {
if (i4 >= length) {
z = false;
break;
}
if (split[i4].equals("" + this.d)) {
z = true;
break;
}
i4++;
}
if (z) {
this.q.setIcon(2131231337);
} else {
this.q.setIcon(2131231336);
}
}
}
MenuItem findItem2 = menu.findItem(2131296319);
if (B.l == 3) {
menu.removeItem(findItem2.getItemId());
} else {
findItem2.setVisible(true);
findItem2.setEnabled(B.l == 1);
Iterator<j5.f> it = ((MainApplication) getActivity().getApplicationContext()).b().i().iterator();
while (true) {
if (it.hasNext()) {
if (it.next().a == B.a + 1000000) {
z2 = true;
break;
}
} else {
z2 = false;
break;
}
}
if (z2) {
findItem2.setIcon(2131231330);
} else {
findItem2.setIcon(2131231331);
}
}
MenuItem findItem3 = menu.findItem(2131296330);
if (B.n == 3) {
menu.removeItem(findItem3.getItemId());
} else {
findItem3.setVisible(true);
findItem3.setEnabled(B.n == 1);
}
y2.b childAt = this.o.getChildAt(0);
for (int i7 = 0; i7 < childAt.getChildCount(); i7++) {
try {
y2.a childAt2 = childAt.getChildAt(i7);
childAt2.setChecked(childAt2.getItemData().isChecked());
if (childAt2.getItemData().a == 2131296332) {
this.r = childAt2;
}
} catch (Exception e2) {
g5.j.l(e2);
}
}
final j5.a aVar2 = B;
final BottomNavigationView bottomNavigationView = this.o;
final y2.a aVar3 = this.r;
final androidx.fragment.app.q activity = getActivity();
new Thread(new Runnable() {
@Override
public final void run() {
j5.a aVar4 = aVar2;
Context context = activity;
SharedPreferences a2 = m1.a.a(context.getApplicationContext());
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject2.put("get", "likes");
jSONObject2.put("article_id", aVar4.a);
jSONObject2.put("persid", a2.getString("persid", ""));
jSONObject2.put("deviceid", m0.i(context.getApplicationContext()));
jSONObject2.put("providerid", g.c(context));
jSONObject2.put("pwd", j5.o.f(context.getApplicationContext()));
} catch (JSONException e3) {
g5.j.m(e3.toString());
}
jSONObject2.toString();
g5.h.b(context.getApplicationContext()).a(new g5.g(jSONObject2, (l.b) new o2.n(aVar3, bottomNavigationView, context, 4), (l.a) new f2.c(11)));
}
}).start();
}
}
SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext());
j5.a aVar4 = B;
i5.e.b(this.e, aVar4 != null ? aVar4.t : null);
if (B.I) {
this.e.getSettings().setSupportMultipleWindows(true);
this.e.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
}
this.e.setDownloadListener(new DownloadListener() {
@Override
public final void onDownloadStart(String str3, String str4, String str5, String str6, long j) {
j5.a aVar5 = i.B;
i iVar = i.this;
iVar.getClass();
if (str3.startsWith("blob:")) {
iVar.e.loadUrl(i5.d.getBase64StringFromBlobUrl(str3));
return;
}
if (str6.equals("application/pdf")) {
Intent intent2 = new Intent((Context) iVar.getActivity(), (Class<?>) ActivityPDF.class);
intent2.putExtra(PopAuthenticationSchemeInternal.SerializedNames.URL, str3);
intent2.putExtra("shareable", i.B.o == 1);
intent2.putExtra("savePath", iVar.getActivity().getCacheDir() + File.separator + "cache.pdf");
iVar.startActivity(intent2);
}
}
});
this.e.setWebChromeClient(new b());
this.e.setWebViewClient(new c(defaultSharedPreferences, b2));
if (B != null) {
if (!getActivity().getIntent().hasExtra("parameter")) {
d(B);
return;
}
j5.a aVar5 = B;
this.i = getActivity().getIntent().getStringExtra("parameter");
d(aVar5);
}
}
public final void onConnected(Bundle bundle) {
}
public final void onConnectionSuspended(int i) {
}
}