导航菜单

页面标题

页面副标题

Meine NEW v2.0.3616 - m0.java 源代码

正在查看: Meine NEW v2.0.3616 应用的 m0.java JAVA 源代码文件

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


package g5;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
import android.util.SparseArray;
import android.util.TypedValue;
import androidx.appcompat.widget.d1;
import androidx.appcompat.widget.h1;
import androidx.core.content.FileProvider;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.microsoft.identity.client.internal.MsalUtils;
import com.microsoft.identity.common.internal.eststelemetry.SchemaConstants;
import com.microsoft.identity.common.internal.providers.microsoft.MicrosoftIdToken;
import com.microsoft.identity.common.internal.providers.microsoft.microsoftsts.MicrosoftStsIdToken;
import com.microsoft.identity.common.internal.providers.oauth2.IDToken;
import com.new_service_gmbh.mapp.MainApplication;
import com.new_service_gmbh.mapp.qrscan;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Random;
import java.util.concurrent.Callable;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import w2.b;

public final class m0 {
    public static String a;

    public static void a(Callable callable) {
        if (callable != null) {
            try {
                callable.call();
            } catch (Exception unused) {
            }
        }
    }

    public static void b(Activity activity) {
        try {
            if (((MainApplication) activity.getApplicationContext()).b().k("profile_screenshotallowed", "no").equals("no")) {
                activity.getWindow().setFlags(8192, 8192);
            } else {
                activity.getWindow().clearFlags(8192);
            }
        } catch (Exception unused) {
            activity.getWindow().setFlags(8192, 8192);
        }
    }

    public static String c(Context context, int i) {
        InputStream openRawResource = context.getResources().openRawResource(i);
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(openRawResource));
        StringBuilder sb = new StringBuilder();
        while (true) {
            try {
                String readLine = bufferedReader.readLine();
                if (readLine == null) {
                    break;
                }
                sb.append(readLine);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        openRawResource.close();
        bufferedReader.close();
        return sb.toString();
    }

    public static void d(final androidx.appcompat.app.f fVar, m5.i iVar, final String str) {
        final String[] split;
        int i;
        char c;
        try {
            split = str.substring(7).split("/");
        } catch (Exception e) {
            j.l(e);
            return;
        }
        for (String str2 : split) {
            switch (str2.hashCode()) {
                case -1905874002:
                    if (str2.equals("registerBTEvents")) {
                        c = 6;
                        break;
                    }
                    c = 65535;
                    break;
                case -1561326700:
                    if (str2.equals("FullscreenOff")) {
                        c = 1;
                        break;
                    }
                    c = 65535;
                    break;
                case -1435838694:
                    if (str2.equals("FullscreenOn")) {
                        c = 0;
                        break;
                    }
                    c = 65535;
                    break;
                case -1148867767:
                    if (str2.equals("jumpTo")) {
                        c = 5;
                        break;
                    }
                    c = 65535;
                    break;
                case -890049046:
                    if (str2.equals("scancode")) {
                        c = 7;
                        break;
                    }
                    c = 65535;
                    break;
                case -697018448:
                    if (str2.equals("showgpssettings")) {
                        c = '\t';
                        break;
                    }
                    c = 65535;
                    break;
                case 109400031:
                    if (str2.equals("share")) {
                        c = '\n';
                        break;
                    }
                    c = 65535;
                    break;
                case 277236744:
                    if (str2.equals("closeWindow")) {
                        c = 4;
                        break;
                    }
                    c = 65535;
                    break;
                case 415378016:
                    if (str2.equals("lockOrientationPortrait")) {
                        c = 3;
                        break;
                    }
                    c = 65535;
                    break;
                case 596855788:
                    if (str2.equals("unlockOrientation")) {
                        c = 2;
                        break;
                    }
                    c = 65535;
                    break;
                case 1555473547:
                    if (str2.equals("shownotificationsettings")) {
                        c = '\b';
                        break;
                    }
                    c = 65535;
                    break;
                default:
                    c = 65535;
                    break;
            }
            switch (c) {
                case 0:
                    fVar.getWindow().getDecorView().setSystemUiVisibility(1030);
                    if (fVar.getSupportActionBar() != null) {
                        fVar.getSupportActionBar().f();
                    }
                    iVar.o.setVisibility(8);
                    continue;
                case 1:
                    fVar.getWindow().getDecorView().setSystemUiVisibility(0);
                    if (fVar.getSupportActionBar() != null) {
                        fVar.getSupportActionBar().x();
                    }
                    iVar.o.setVisibility(0);
                    continue;
                case 2:
                    fVar.runOnUiThread(new h1(fVar, 13));
                    continue;
                case 3:
                    fVar.runOnUiThread(new d1(fVar, 13));
                    continue;
                case 4:
                    Objects.requireNonNull(fVar);
                    fVar.runOnUiThread(new androidx.activity.b(fVar, 14));
                    continue;
                case 5:
                    try {
                        final long parseLong = Long.parseLong(split[1]);
                        if (split.length > 2) {
                            fVar.runOnUiThread(new Runnable() {
                                @Override
                                public final void run() {
                                    Intent intent = new Intent("de.new_energie.meinenew");
                                    intent.putExtra("action", "showarticle");
                                    intent.putExtra("article_id", parseLong);
                                    String[] strArr = split;
                                    if (!strArr[2].trim().equals("")) {
                                        intent.putExtra("extraparameters", str.substring(strArr[1].length() + 7 + 8));
                                    }
                                    fVar.sendBroadcast(intent);
                                }
                            });
                        } else {
                            j5.a e2 = ((MainApplication) fVar.getApplication()).b().e(parseLong);
                            if (e2 != null) {
                                iVar.d(e2);
                            }
                        }
                        return;
                    } catch (Exception e3) {
                        e3.printStackTrace();
                        j.l(e3);
                        return;
                    }
                case 6:
                    try {
                        iVar.e();
                        return;
                    } catch (Exception e4) {
                        j.l(e4);
                        return;
                    }
                case 7:
                    try {
                        if (split.length == 2) {
                            String str3 = split[1];
                            iVar.w.a(new Intent(iVar.getActivity().getApplicationContext(), (Class<?>) qrscan.class));
                        } else {
                            iVar.w.a(new Intent(iVar.getActivity().getApplicationContext(), (Class<?>) qrscan.class));
                        }
                        return;
                    } catch (Exception e5) {
                        j.l(e5);
                        return;
                    }
                case '\b':
                    try {
                        Intent intent = new Intent();
                        if (Build.VERSION.SDK_INT > 25) {
                            intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
                            intent.putExtra("android.provider.extra.APP_PACKAGE", fVar.getPackageName());
                        } else {
                            intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
                            intent.putExtra("app_package", fVar.getPackageName());
                            intent.putExtra("app_uid", fVar.getApplicationInfo().uid);
                        }
                        fVar.startActivity(intent);
                        return;
                    } catch (Exception e8) {
                        j.l(e8);
                        return;
                    }
                case '\t':
                    try {
                        fVar.startActivity(new Intent("android.settings.LOCATION_SOURCE_SETTINGS"));
                        return;
                    } catch (Exception e9) {
                        j.l(e9);
                        return;
                    }
                case '\n':
                    String str4 = new String(Base64.decode(split[1], 0), "UTF-8");
                    new File(fVar.getFilesDir(), "shared").mkdirs();
                    File file = new File(fVar.getFilesDir(), "shared/card.vcf");
                    FileOutputStream fileOutputStream = new FileOutputStream(file);
                    OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fileOutputStream);
                    outputStreamWriter.write(str4);
                    outputStreamWriter.close();
                    fileOutputStream.close();
                    Uri b = FileProvider.a(fVar.getApplicationContext(), "de.new_energie.meinenew.provider").b(file);
                    Intent intent2 = new Intent("android.intent.action.SEND");
                    intent2.addFlags(1);
                    intent2.setFlags(268435457);
                    intent2.setDataAndType(b, "text/x-vcard");
                    intent2.putExtra("android.intent.extra.STREAM", b);
                    fVar.startActivity(Intent.createChooser(intent2, fVar.getString(2131886554)));
                    return;
                default:
                    j.m("Unknown param:" + str2);
                    continue;
            }
            j.l(e);
            return;
        }
    }

    public static void e(y2.a aVar, int i, BottomNavigationView bottomNavigationView, int i2) {
        int id = aVar.getId();
        n3.d dVar = ((n3.g) bottomNavigationView).d;
        dVar.getClass();
        n3.d.f(id);
        SparseArray sparseArray = dVar.t;
        w2.a aVar2 = (w2.a) sparseArray.get(id);
        n3.a aVar3 = null;
        if (aVar2 == null) {
            w2.a aVar4 = new w2.a(dVar.getContext(), (b.a) null);
            sparseArray.put(id, aVar4);
            aVar2 = aVar4;
        }
        n3.d.f(id);
        n3.a[] aVarArr = dVar.h;
        if (aVarArr != null) {
            int length = aVarArr.length;
            int i3 = 0;
            while (true) {
                if (i3 >= length) {
                    break;
                }
                n3.a aVar5 = aVarArr[i3];
                if (aVar5.getId() == id) {
                    aVar3 = aVar5;
                    break;
                }
                i3++;
            }
        }
        if (aVar3 != null) {
            aVar3.setBadge(aVar2);
        }
        if (i < 0) {
            aVar2.h(false);
            return;
        }
        w2.b bVar = aVar2.g;
        w2.b bVar2 = aVar2.g;
        if (i < 1) {
            aVar2.h(true);
            bVar2.a.d = Integer.valueOf(i2);
            bVar2.b.d = Integer.valueOf(i2);
            aVar2.f();
            bVar.a.j = "";
            bVar.b.j = "";
            return;
        }
        aVar2.h(true);
        int max = Math.max(0, i);
        b.a aVar6 = bVar.b;
        int i4 = aVar6.g;
        l3.k kVar = aVar2.e;
        b.a aVar7 = bVar.a;
        if (i4 != max) {
            aVar7.g = max;
            aVar6.g = max;
            kVar.d = true;
            aVar2.j();
            aVar2.invalidateSelf();
        }
        b.a aVar8 = bVar.b;
        if (aVar8.h != 6) {
            aVar7.h = 6;
            aVar8.h = 6;
            aVar2.g();
        }
        int color = aVar.getContext().getResources().getColor(2131099660);
        if (kVar.a.getColor() != color) {
            aVar7.e = Integer.valueOf(color);
            aVar8.e = Integer.valueOf(color);
            kVar.a.setColor(bVar2.b.e.intValue());
            aVar2.invalidateSelf();
        }
        bVar2.a.d = Integer.valueOf(i2);
        bVar2.b.d = Integer.valueOf(i2);
        aVar2.f();
        int applyDimension = ((int) TypedValue.applyDimension(1, 6.0f, aVar.getContext().getResources().getDisplayMetrics())) * (-1);
        aVar7.o = Integer.valueOf(applyDimension);
        aVar8.o = Integer.valueOf(applyDimension);
        aVar2.j();
        aVar7.q = Integer.valueOf(applyDimension);
        aVar8.q = Integer.valueOf(applyDimension);
        aVar2.j();
    }

    public static String f(byte[] bArr) {
        StringBuilder sb = new StringBuilder(bArr.length * 2);
        for (int i = 0; i < bArr.length; i++) {
            String hexString = Integer.toHexString(bArr[i]);
            int length = hexString.length();
            if (length == 1) {
                hexString = SchemaConstants.Value.FALSE.concat(hexString);
            }
            if (length > 2) {
                hexString = hexString.substring(length - 2, length);
            }
            sb.append(hexString.toUpperCase());
            if (i < bArr.length - 1) {
                sb.append(':');
            }
        }
        return sb.toString();
    }

    public static Bundle g(String str) {
        Bundle bundle = new Bundle();
        if (str != null && !str.equals("")) {
            try {
                JSONObject jSONObject = new JSONObject(new String(Base64.decode(str.split("\\.")[1], 8), "UTF-8"));
                if (jSONObject.has("sub")) {
                    bundle.putString("sub", jSONObject.getString("sub"));
                    if (jSONObject.has(MicrosoftStsIdToken.EXPIRATION_TIME)) {
                        bundle.putInt(MicrosoftStsIdToken.EXPIRATION_TIME, jSONObject.getInt(MicrosoftStsIdToken.EXPIRATION_TIME));
                    }
                    if (jSONObject.has(MicrosoftIdToken.ISSUED_AT)) {
                        bundle.putInt(MicrosoftIdToken.ISSUED_AT, jSONObject.getInt(MicrosoftIdToken.ISSUED_AT));
                    }
                    if (jSONObject.has("email")) {
                        bundle.putString("email", jSONObject.getString("email"));
                    }
                    if (jSONObject.has(IDToken.NICKNAME)) {
                        bundle.putString(IDToken.NICKNAME, jSONObject.getString(IDToken.NICKNAME));
                    }
                    if (jSONObject.has(IDToken.EMAIL_VERIFIED)) {
                        bundle.putBoolean(IDToken.EMAIL_VERIFIED, jSONObject.getBoolean(IDToken.EMAIL_VERIFIED));
                    }
                    if (jSONObject.has("family_name")) {
                        bundle.putString("family_name", jSONObject.getString("family_name"));
                    }
                    if (jSONObject.has("name")) {
                        bundle.putString("name", jSONObject.getString("name"));
                    }
                    if (jSONObject.has(IDToken.PICTURE)) {
                        bundle.putString(IDToken.PICTURE, jSONObject.getString(IDToken.PICTURE));
                    }
                    if (jSONObject.has("apps")) {
                        ArrayList<String> arrayList = new ArrayList<>();
                        JSONArray jSONArray = jSONObject.getJSONArray("apps");
                        for (int i = 0; i < jSONArray.length(); i++) {
                            arrayList.add(jSONArray.getString(i));
                        }
                        bundle.putStringArrayList("apps", arrayList);
                    }
                    if (!jSONObject.has("employee")) {
                        return bundle;
                    }
                    JSONObject jSONObject2 = jSONObject.getJSONObject("employee");
                    Bundle bundle2 = new Bundle();
                    bundle2.putString("aid", jSONObject2.getString("aid"));
                    bundle2.putString("email", jSONObject2.getString("email"));
                    bundle2.putBoolean("employee", jSONObject2.getBoolean("employee"));
                    bundle2.putBoolean("secureLogin", jSONObject2.getBoolean("secureLogin"));
                    bundle2.putString("department", jSONObject2.getString("department"));
                    bundle.putBundle("employee", bundle2);
                    return bundle;
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return null;
    }

    public static net.openid.appauth.a h(SharedPreferences sharedPreferences) {
        String string = sharedPreferences.getString("authstate", null);
        if (string == null || string.equals("")) {
            SharedPreferences.Editor edit = sharedPreferences.edit();
            edit.putString("authstate", "");
            edit.apply();
            return null;
        }
        try {
            return net.openid.appauth.a.b(string);
        } catch (JSONException e) {
            e.printStackTrace();
            SharedPreferences.Editor edit2 = sharedPreferences.edit();
            edit2.putString("authstate", "");
            edit2.apply();
            return null;
        }
    }

    @SuppressLint({"HardwareIds"})
    public static String i(Context context) {
        try {
            return Settings.Secure.getString(context.getContentResolver(), "android_id");
        } catch (Exception e) {
            j.l(e);
            return "";
        }
    }

    public static int j(Bundle bundle) {
        return bundle.getInt(MicrosoftStsIdToken.EXPIRATION_TIME, 0) - ((int) (System.currentTimeMillis() / 1000));
    }

    public static String k(String str) {
        byte[] bytes = str.getBytes();
        byte[] bArr = new byte[bytes.length + 8];
        System.arraycopy(bytes, 0, bArr, 0, bytes.length);
        System.arraycopy(new byte[]{50, 51, 101, 125, 59, 72, 37, 44}, 0, bArr, bytes.length, 8);
        try {
            MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
            messageDigest.reset();
            messageDigest.update(bArr);
            byte[] digest = messageDigest.digest();
            StringBuilder sb = new StringBuilder(digest.length << 1);
            for (byte b : digest) {
                sb.append(Character.forDigit((b & 240) >> 4, 16));
                sb.append(Character.forDigit(b & 15, 16));
            }
            return sb.toString();
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
            return null;
        }
    }

    public static void l(androidx.fragment.app.q qVar, Uri uri) {
        boolean z;
        String str = j.s;
        if (str == null) {
            PackageManager packageManager = qVar.getPackageManager();
            Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("http://www.example.com"));
            ResolveInfo resolveActivity = packageManager.resolveActivity(intent, 0);
            String str2 = resolveActivity != null ? resolveActivity.activityInfo.packageName : null;
            List<ResolveInfo> queryIntentActivities = packageManager.queryIntentActivities(intent, 0);
            ArrayList arrayList = new ArrayList();
            for (ResolveInfo resolveInfo : queryIntentActivities) {
                Intent intent2 = new Intent();
                intent2.setAction("android.support.customtabs.action.CustomTabsService");
                intent2.setPackage(resolveInfo.activityInfo.packageName);
                if (packageManager.resolveService(intent2, 0) != null) {
                    arrayList.add(resolveInfo.activityInfo.packageName);
                }
            }
            if (arrayList.isEmpty()) {
                j.s = null;
            } else if (arrayList.size() == 1) {
                j.s = (String) arrayList.get(0);
            } else {
                if (!TextUtils.isEmpty(str2)) {
                    try {
                        List<ResolveInfo> queryIntentActivities2 = qVar.getPackageManager().queryIntentActivities(intent, 64);
                        if (queryIntentActivities2 != null && queryIntentActivities2.size() != 0) {
                            for (ResolveInfo resolveInfo2 : queryIntentActivities2) {
                                IntentFilter intentFilter = resolveInfo2.filter;
                                if (intentFilter != null && intentFilter.countDataAuthorities() != 0 && intentFilter.countDataPaths() != 0 && resolveInfo2.activityInfo != null) {
                                    z = true;
                                    break;
                                }
                            }
                        }
                    } catch (RuntimeException unused) {
                        Log.e("CustomTabsHelper", "Runtime exception while getting specialized handlers");
                    }
                    z = false;
                    if (!z && arrayList.contains(str2)) {
                        j.s = str2;
                    }
                }
                if (arrayList.contains(MsalUtils.CHROME_PACKAGE)) {
                    j.s = MsalUtils.CHROME_PACKAGE;
                } else if (arrayList.contains("com.chrome.beta")) {
                    j.s = "com.chrome.beta";
                } else if (arrayList.contains("com.chrome.dev")) {
                    j.s = "com.chrome.dev";
                } else if (arrayList.contains("com.google.android.apps.chrome")) {
                    j.s = "com.google.android.apps.chrome";
                }
            }
            str = j.s;
        }
        Intent intent3 = new Intent("android.intent.action.VIEW");
        m.a aVar = new m.a();
        intent3.putExtra("android.support.customtabs.extra.TITLE_VISIBILITY", 1);
        if (!intent3.hasExtra("android.support.customtabs.extra.SESSION")) {
            Bundle bundle = new Bundle();
            a0.j.b(bundle, "android.support.customtabs.extra.SESSION", (IBinder) null);
            intent3.putExtras(bundle);
        }
        intent3.putExtra("android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS", true);
        Integer num = aVar.a;
        Bundle bundle2 = new Bundle();
        if (num != null) {
            bundle2.putInt("android.support.customtabs.extra.TOOLBAR_COLOR", num.intValue());
        }
        intent3.putExtras(bundle2);
        intent3.putExtra("androidx.browser.customtabs.extra.SHARE_STATE", 0);
        m.e eVar = new m.e(intent3);
        aVar.a = Integer.valueOf(b0.a.getColor(qVar, 2131099654) | (-16777216));
        Intent intent4 = eVar.a;
        if (str != null) {
            intent4.setPackage(str);
        }
        intent4.addFlags(1342177280);
        intent4.setData(uri);
        b0.a.startActivity(qVar, intent4, (Bundle) null);
    }

    public static int m() {
        return new Random().nextInt(7001) + 3000;
    }
}