package com.seewo.vcommons.data;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.provider.Settings;
import android.security.KeyStore;
import android.text.TextUtils;
import android.util.Log;
import com.android.internal.widget.LockPatternUtils;
import d.b.a.a.a;
import d.i.f.c.c;
import d.i.f.g.e.b;

/* JADX INFO: loaded from: classes.dex */
public class SystemUtils {
    public static final String SYSTEM_PROPERTY_SYSTEM_BRANCH = "ro.cvte.system_branch";
    private static final String TAG = "SystemUtils";

    private SystemUtils() {
    }

    public static String getReleaseVersion(Context context) {
        String string = Settings.Global.getString(context.getContentResolver(), "RELEASE_VERSION");
        if (TextUtils.isEmpty(string)) {
            string = c.f("ro.build.version.incremental", "develop");
        }
        String strE = c.e(SYSTEM_PROPERTY_SYSTEM_BRANCH);
        return !TextUtils.isEmpty(strE) ? a.q(strE, "-", string) : string;
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x0058  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    private static void maybeUpdateKeystore(android.content.Context r9) {
        /*
            Method dump skipped, instruction units count: 202
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: com.seewo.vcommons.data.SystemUtils.maybeUpdateKeystore(android.content.Context):void");
    }

    public static void unLockPin(Context context) {
        if (Build.VERSION.SDK_INT == 26) {
            unLockPinO(context);
        }
    }

    @TargetApi(26)
    private static void unLockPinO(Context context) {
        String str = TAG;
        Log.d(str, "unLockPinO: start.");
        KeyStore keyStore = KeyStore.getInstance();
        StringBuilder sbB = a.B("unLockPinO: getUserId=");
        sbB.append(d.i.f.g.e.a.a(context));
        Log.d(str, sbB.toString());
        Log.d(str, "unlock: " + ((Boolean) b.d(keyStore).b("unlock", "com.android.credentials.UNLOCK").f3661b).booleanValue());
        b.d(new LockPatternUtils(context)).b("reportSuccessfulPasswordAttempt", Integer.valueOf(d.i.f.g.e.a.a(context)));
        context.sendBroadcast(new Intent("android.security.action.KEYCHAIN_CHANGED"));
        Log.d(str, "unLockPinO: end.");
    }
}
