Example usage for org.bouncycastle.math.ec ECCurve COORD_LAMBDA_PROJECTIVE

List of usage examples for org.bouncycastle.math.ec ECCurve COORD_LAMBDA_PROJECTIVE

Introduction

In this page you can find the example usage for org.bouncycastle.math.ec ECCurve COORD_LAMBDA_PROJECTIVE.

Prototype

int COORD_LAMBDA_PROJECTIVE

To view the source code for org.bouncycastle.math.ec ECCurve COORD_LAMBDA_PROJECTIVE.

Click Source Link

Usage

From source file:com.google.android.gms.common.GooglePlayServicesUtil.java

public static String getErrorString(int i) {
    switch (i) {/*from w  ww. j  a  v a2s  . c om*/
    case ECCurve.COORD_AFFINE /*0*/:
        return "SUCCESS";
    case ExtendedPKIXParameters.CHAIN_VALIDITY_MODEL /*1*/:
        return "SERVICE_MISSING";
    case CipherSpiExt.DECRYPT_MODE /*2*/:
        return "SERVICE_VERSION_UPDATE_REQUIRED";
    case F2m.PPB /*3*/:
        return "SERVICE_DISABLED";
    case ECCurve.COORD_JACOBIAN_MODIFIED /*4*/:
        return "SIGN_IN_REQUIRED";
    case ECCurve.COORD_LAMBDA_AFFINE /*5*/:
        return "INVALID_ACCOUNT";
    case ECCurve.COORD_LAMBDA_PROJECTIVE /*6*/:
        return "RESOLUTION_REQUIRED";
    case ECCurve.COORD_SKEWED /*7*/:
        return "NETWORK_ERROR";
    case X509KeyUsage.keyAgreement /*8*/:
        return "INTERNAL_ERROR";
    case NamedCurve.sect283k1 /*9*/:
        return "SERVICE_INVALID";
    case NamedCurve.sect283r1 /*10*/:
        return "DEVELOPER_ERROR";
    case CertStatus.UNREVOKED /*11*/:
        return "LICENSE_CHECK_FAILED";
    case X509KeyUsage.dataEncipherment /*16*/:
        return "API_UNAVAILABLE";
    default:
        return "UNKNOWN_ERROR_CODE";
    }
}

From source file:com.google.android.gms.common.GooglePlayServicesUtil.java

private static Dialog zza(int i, Activity activity, Fragment fragment, int i2,
        OnCancelListener onCancelListener) {
    AlertDialog.Builder builder;//from   ww  w. j  a  v  a 2s.  com
    Intent zzan;
    OnClickListener com_google_android_gms_common_internal_zzg;
    CharSequence zzf;
    if (zzlu.zzQ(activity) && i == 2) {
        i = 42;
    }
    if (zzme.zzkg()) {
        TypedValue typedValue = new TypedValue();
        activity.getTheme().resolveAttribute(16843529, typedValue, true);
        if ("Theme.Dialog.Alert".equals(activity.getResources().getResourceEntryName(typedValue.resourceId))) {
            builder = new AlertDialog.Builder(activity, 5);
            if (builder == null) {
                builder = new AlertDialog.Builder(activity);
            }
            builder.setMessage(zze(activity, i));
            if (onCancelListener != null) {
                builder.setOnCancelListener(onCancelListener);
            }
            zzan = zzan(i);
            com_google_android_gms_common_internal_zzg = fragment != null ? new zzg(activity, zzan, i2)
                    : new zzg(fragment, zzan, i2);
            zzf = zzf(activity, i);
            if (zzf != null) {
                builder.setPositiveButton(zzf, com_google_android_gms_common_internal_zzg);
            }
            switch (i) {
            case ECCurve.COORD_AFFINE /*0*/:
                return null;
            case ExtendedPKIXParameters.CHAIN_VALIDITY_MODEL /*1*/:
                return builder.setTitle(C0078R.string.common_google_play_services_install_title).create();
            case CipherSpiExt.DECRYPT_MODE /*2*/:
                return builder.setTitle(C0078R.string.common_google_play_services_update_title).create();
            case F2m.PPB /*3*/:
                return builder.setTitle(C0078R.string.common_google_play_services_enable_title).create();
            case ECCurve.COORD_JACOBIAN_MODIFIED /*4*/:
            case ECCurve.COORD_LAMBDA_PROJECTIVE /*6*/:
                return builder.create();
            case ECCurve.COORD_LAMBDA_AFFINE /*5*/:
                Log.e("GooglePlayServicesUtil",
                        "An invalid account was specified when connecting. Please provide a valid account.");
                return builder.setTitle(C0078R.string.common_google_play_services_invalid_account_title)
                        .create();
            case ECCurve.COORD_SKEWED /*7*/:
                Log.e("GooglePlayServicesUtil", "Network error occurred. Please retry request later.");
                return builder.setTitle(C0078R.string.common_google_play_services_network_error_title).create();
            case X509KeyUsage.keyAgreement /*8*/:
                Log.e("GooglePlayServicesUtil",
                        "Internal error occurred. Please see logs for detailed information");
                return builder.create();
            case NamedCurve.sect283k1 /*9*/:
                Log.e("GooglePlayServicesUtil", "Google Play services is invalid. Cannot recover.");
                return builder.setTitle(C0078R.string.common_google_play_services_unsupported_title).create();
            case NamedCurve.sect283r1 /*10*/:
                Log.e("GooglePlayServicesUtil",
                        "Developer error occurred. Please see logs for detailed information");
                return builder.create();
            case CertStatus.UNREVOKED /*11*/:
                Log.e("GooglePlayServicesUtil", "The application is not licensed to the user.");
                return builder.create();
            case X509KeyUsage.dataEncipherment /*16*/:
                Log.e("GooglePlayServicesUtil",
                        "One of the API components you attempted to connect to is not available.");
                return builder.create();
            case NamedCurve.secp160r2 /*17*/:
                Log.e("GooglePlayServicesUtil", "The specified account could not be signed in.");
                return builder.setTitle(C0078R.string.common_google_play_services_sign_in_failed_title)
                        .create();
            case Place.TYPE_GENERAL_CONTRACTOR /*42*/:
                return builder.setTitle(C0078R.string.common_android_wear_update_title).create();
            default:
                Log.e("GooglePlayServicesUtil", "Unexpected error code " + i);
                return builder.create();
            }
        }
    }
    builder = null;
    if (builder == null) {
        builder = new AlertDialog.Builder(activity);
    }
    builder.setMessage(zze(activity, i));
    if (onCancelListener != null) {
        builder.setOnCancelListener(onCancelListener);
    }
    zzan = zzan(i);
    if (fragment != null) {
    }
    zzf = zzf(activity, i);
    if (zzf != null) {
        builder.setPositiveButton(zzf, com_google_android_gms_common_internal_zzg);
    }
    switch (i) {
    case ECCurve.COORD_AFFINE /*0*/:
        return null;
    case ExtendedPKIXParameters.CHAIN_VALIDITY_MODEL /*1*/:
        return builder.setTitle(C0078R.string.common_google_play_services_install_title).create();
    case CipherSpiExt.DECRYPT_MODE /*2*/:
        return builder.setTitle(C0078R.string.common_google_play_services_update_title).create();
    case F2m.PPB /*3*/:
        return builder.setTitle(C0078R.string.common_google_play_services_enable_title).create();
    case ECCurve.COORD_JACOBIAN_MODIFIED /*4*/:
    case ECCurve.COORD_LAMBDA_PROJECTIVE /*6*/:
        return builder.create();
    case ECCurve.COORD_LAMBDA_AFFINE /*5*/:
        Log.e("GooglePlayServicesUtil",
                "An invalid account was specified when connecting. Please provide a valid account.");
        return builder.setTitle(C0078R.string.common_google_play_services_invalid_account_title).create();
    case ECCurve.COORD_SKEWED /*7*/:
        Log.e("GooglePlayServicesUtil", "Network error occurred. Please retry request later.");
        return builder.setTitle(C0078R.string.common_google_play_services_network_error_title).create();
    case X509KeyUsage.keyAgreement /*8*/:
        Log.e("GooglePlayServicesUtil", "Internal error occurred. Please see logs for detailed information");
        return builder.create();
    case NamedCurve.sect283k1 /*9*/:
        Log.e("GooglePlayServicesUtil", "Google Play services is invalid. Cannot recover.");
        return builder.setTitle(C0078R.string.common_google_play_services_unsupported_title).create();
    case NamedCurve.sect283r1 /*10*/:
        Log.e("GooglePlayServicesUtil", "Developer error occurred. Please see logs for detailed information");
        return builder.create();
    case CertStatus.UNREVOKED /*11*/:
        Log.e("GooglePlayServicesUtil", "The application is not licensed to the user.");
        return builder.create();
    case X509KeyUsage.dataEncipherment /*16*/:
        Log.e("GooglePlayServicesUtil",
                "One of the API components you attempted to connect to is not available.");
        return builder.create();
    case NamedCurve.secp160r2 /*17*/:
        Log.e("GooglePlayServicesUtil", "The specified account could not be signed in.");
        return builder.setTitle(C0078R.string.common_google_play_services_sign_in_failed_title).create();
    case Place.TYPE_GENERAL_CONTRACTOR /*42*/:
        return builder.setTitle(C0078R.string.common_android_wear_update_title).create();
    default:
        Log.e("GooglePlayServicesUtil", "Unexpected error code " + i);
        return builder.create();
    }
}