导航菜单

页面标题

页面副标题

Sandridge Go v2025.2.170190457 - MainActivity.java 源代码

正在查看: Sandridge Go v2025.2.170190457 应用的 MainActivity.java JAVA 源代码文件

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


package com.staffbase.capacitor;

import D2.b;
import D2.h;
import F2.B;
import F2.s;
import M2.c;
import N0.G;
import N0.X;
import N0.x0;
import R5.m;
import U5.e;
import android.R;
import android.app.Application;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.webkit.CookieManager;
import android.webkit.WebView;
import com.getcapacitor.j;
import com.getcapacitor.l;
import com.microsoft.intune.mam.client.view.d;
import com.parse.ParseException;
import com.staffbase.capacitor.MainActivity;
import com.staffbase.capacitor.app.App;
import com.staffbase.capacitor.plugin.analytics.StaffbaseAnalytics;
import com.staffbase.capacitor.plugin.chirper.StaffbaseChirper;
import com.staffbase.capacitor.plugin.deepLink.StaffbaseDeepLink;
import com.staffbase.capacitor.plugin.documentViewer.StaffbaseDocumentViewer;
import com.staffbase.capacitor.plugin.filePicker.StaffbaseFilePicker;
import com.staffbase.capacitor.plugin.imageGallery.StaffbaseImageGallery;
import com.staffbase.capacitor.plugin.kvStore.StaffbaseKVStore;
import com.staffbase.capacitor.plugin.mail.StaffbaseMail;
import com.staffbase.capacitor.plugin.parse.StaffbaseParse;
import com.staffbase.capacitor.plugin.passcode.StaffbasePasscode;
import com.staffbase.capacitor.plugin.podcast.StaffbasePodcast;
import com.staffbase.capacitor.plugin.system.StaffbaseSystem;
import com.staffbase.capacitor.plugin.tabs.StaffbaseTabs;
import kotlin.jvm.internal.h;
import kotlin.jvm.internal.n;
import n6.C0490a;

public final class MainActivity extends l {
    private static final a Y = new a(null);
    public static final int Z = 8;
    private boolean X;

    private static final class a {
        public a(h hVar) {
            this();
        }

        private a() {
        }
    }

    public static final class b implements ViewTreeObserver.OnGlobalLayoutListener {
        final ViewGroup o;
        final MainActivity p;

        b(ViewGroup viewGroup, MainActivity mainActivity) {
            this.o = viewGroup;
            this.p = mainActivity;
        }

        @Override
        public void onGlobalLayout() {
            this.o.getViewTreeObserver().removeOnGlobalLayoutListener(this);
            Rect rect = new Rect();
            this.o.getWindowVisibleDisplayFrame(rect);
            float f = this.p.getResources().getDisplayMetrics().densityDpi / ParseException.INVALID_EVENT_NAME;
            float f2 = rect.top / f;
            if (f2 <= 0.0f) {
                return;
            }
            StaffbaseSystem.a aVar = StaffbaseSystem.Companion;
            aVar.e(Float.valueOf(f));
            aVar.f(Integer.valueOf(U6.a.b(f2)));
            if (this.p.isInMultiWindowMode()) {
                aVar.f(0);
                if (C0490a.a.e() && this.p.I0()) {
                    aVar.f(Integer.valueOf(U6.a.b(f2)));
                }
            }
            this.p.F0();
        }
    }

    public final void F0() {
        View findViewById = findViewById(R.id.content);
        n.c(findViewById, "null cannot be cast to non-null type android.view.ViewGroup");
        View childAt = ((ViewGroup) findViewById).getChildAt(0);
        n.c(childAt, "null cannot be cast to non-null type android.view.ViewGroup");
        X.A0((ViewGroup) childAt, new G() {
            public final x0 a(View view, x0 x0Var) {
                x0 G0;
                G0 = MainActivity.G0(view, x0Var);
                return G0;
            }
        });
    }

    public static final x0 G0(View v, x0 insets) {
        n.e(v, "v");
        n.e(insets, "insets");
        v.setPadding(0, 0, 0, insets.i());
        return insets;
    }

    private final void H0() {
        View decorView = getWindow().getDecorView();
        n.c(decorView, "null cannot be cast to non-null type android.view.ViewGroup");
        ViewGroup viewGroup = (ViewGroup) decorView;
        viewGroup.getViewTreeObserver().addOnGlobalLayoutListener(new b(viewGroup, this));
    }

    private final void J0() {
        h.a aVar = new h.a(this);
        b.a aVar2 = new b.a();
        aVar2.a(new s.a(false, 1, (kotlin.jvm.internal.h) null));
        aVar2.a(new B.b(false, 1, (kotlin.jvm.internal.h) null));
        h.a l = aVar.i(aVar2.e()).l(new S6.a() {
            @Override
            public final Object invoke() {
                M2.c K0;
                K0 = MainActivity.K0(MainActivity.this);
                return K0;
            }
        });
        Application application = getApplication();
        n.c(application, "null cannot be cast to non-null type com.staffbase.capacitor.app.App");
        D2.a.c(l.m(((App) application).i()).k(true).d());
    }

    public static final c K0(MainActivity mainActivity) {
        return new c.a(mainActivity).b(0.2d).a();
    }

    private final void L0() {
        if (this.X) {
            return;
        }
        WebView H = ((l) this).R.H();
        j bridge = ((l) this).R;
        n.d(bridge, "bridge");
        H.setWebChromeClient(new B5.b(bridge));
        j jVar = ((l) this).R;
        j bridge2 = ((l) this).R;
        n.d(bridge2, "bridge");
        jVar.B0(new m(bridge2));
        this.X = true;
    }

    public static final void N0(MainActivity mainActivity) {
        mainActivity.O0();
    }

    private final void O0() {
        d.a(getWindow(), 67108864);
        getWindow().addFlags(Integer.MIN_VALUE);
        getWindow().setStatusBarColor(Color.parseColor("#66000000"));
    }

    public final boolean I0() {
        Rect a2 = androidx.window.layout.c.a(androidx.window.layout.b.a(getWindowManager()));
        n.d(a2, "getBounds(...)");
        return a2.top < a2.height() / 2;
    }

    public final void M0() {
        getWindow().getDecorView().setSystemUiVisibility(getWindow().getDecorView().getSystemUiVisibility() | 1280);
        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
            @Override
            public final void run() {
                MainActivity.N0(MainActivity.this);
            }
        }, 300L);
    }

    public void onMAMCreate(Bundle bundle) {
        if (getResources().getBoolean(2130968580)) {
            setRequestedOrientation(1);
        }
        A0(StaffbaseAnalytics.class);
        A0(StaffbaseChirper.class);
        A0(StaffbaseDeepLink.class);
        A0(StaffbaseDocumentViewer.class);
        A0(StaffbaseFilePicker.class);
        A0(StaffbaseImageGallery.class);
        A0(StaffbaseKVStore.class);
        A0(StaffbaseMail.class);
        A0(StaffbaseParse.class);
        A0(StaffbasePasscode.class);
        A0(StaffbasePodcast.class);
        A0(StaffbaseSystem.class);
        A0(StaffbaseTabs.class);
        super.onMAMCreate(bundle);
    }

    public void onMAMNewIntent(Intent intent) {
        n.e(intent, "intent");
        super.onMAMNewIntent(intent);
        j bridge = ((l) this).R;
        n.d(bridge, "bridge");
        StaffbaseParse a2 = e.a(bridge);
        if (a2 != null) {
            a2.handleNewIntent(intent);
        }
    }

    public void onMAMPause() {
        Log.v("MainActivity", "onPause");
        CookieManager.getInstance().flush();
        super.onMAMPause();
    }

    public void onMAMResume() {
        Log.v("MainActivity", "onResume");
        J0();
        super.onMAMResume();
    }

    public void onStart() {
        super.onStart();
        L0();
        CookieManager.getInstance().setAcceptThirdPartyCookies(((l) this).R.H(), true);
        H0();
    }
}