TikTok.apk(点击下载) / C145805oH.java


package X;

import android.app.Activity;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import com.bytedance.bpea.entry.common.DataType;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.creative.CreativeInfo;
import java.lang.reflect.Field;
import java.util.Objects;

/* renamed from: X.5oH  reason: invalid class name and case insensitive filesystem */
public final class C145805oH {
    public static final C145805oH LIZ = new C145805oH();

    static {
        Covode.recordClassIndex(105606);
    }

    public static final int LIZ() {
        int LIZ2 = C145835oK.LIZ() != 1 ? C145835oK.LIZ() : C145825oJ.LIZ() != 1 ? C145825oJ.LIZ() : 1;
        if (!LIZ.LIZ(LIZ2)) {
            return 1;
        }
        return LIZ2;
    }

    public static Object LIZ(Context context, String str) {
        Object obj;
        if (Build.VERSION.SDK_INT > 27 || !"clipboard".equals(str)) {
            if (!C16520lF.LIZIZ && "connectivity".equals(str)) {
                try {
                    new AnonymousClass1ME().LIZ();
                    C16520lF.LIZIZ = true;
                    obj = context.getSystemService(str);
                } catch (Throwable unused) {
                }
            }
            obj = context.getSystemService(str);
        } else if (C16520lF.LIZ) {
            synchronized (ClipboardManager.class) {
                try {
                    obj = context.getSystemService(str);
                    if (Thread.currentThread() != Looper.getMainLooper().getThread()) {
                        try {
                            Field declaredField = ClipboardManager.class.getDeclaredField("mHandler");
                            declaredField.setAccessible(true);
                            declaredField.set(obj, new HandlerC16510lE((Handler) declaredField.get(obj)));
                        } catch (Exception e) {
                            AnonymousClass0O2.LIZ(e, "ClipboardManager Handler Reflect Fail");
                        }
                    }
                    C16520lF.LIZ = false;
                } finally {
                }
            }
        } else {
            obj = context.getSystemService(str);
        }
        return obj;
    }

    public static final void LIZ(Bundle bundle, Activity activity, boolean z) {
        C21090sc.LIZ(activity);
        Intent intent = new Intent();
        if (bundle != null) {
            intent.putExtras(bundle);
        }
        intent.putExtra("shoot_way", "story");
        if (!C14350hk.LIZ(intent)) {
            C14350hk.LIZ(intent, new CreativeInfo(null, 0, null, 7, null));
        }
        C31691Ne.LIZ().LIZ((AnonymousClass1GJ) null);
        C31691Ne.LIZ().LJII();
        if (z || L44.LIZ().LIZ((Context) activity, intent)) {
            L44.LIZ().LIZJ(activity, intent);
            return;
        }
        L44.LIZ().LIZ(activity, intent);
        L44.LIZ().LIZIZ(activity, intent);
    }

    private final boolean LIZ(int i2) {
        return i2 == 1 || i2 == 2 || i2 == 8;
    }

    public final MediaPlayer LIZ(Context context) {
        C21090sc.LIZ(context);
        if (C21350t2.LIZ("file:///system/media/audio/ui/camera_click.ogg")) {
            return MediaPlayer.create(context, Uri.parse("file:///system/media/audio/ui/camera_click.ogg"));
        }
        return null;
    }

    public final void LIZ(MediaPlayer mediaPlayer, Context context) {
        C21090sc.LIZ(mediaPlayer, context);
        Object LIZ2 = LIZ(context, DataType.AUDIO);
        Objects.requireNonNull(LIZ2, "null cannot be cast to non-null type android.media.AudioManager");
        if (((AudioManager) LIZ2).getStreamVolume(5) != 0) {
            mediaPlayer.start();
        }
    }
}