void execute()

in core-android/src/main/java/com/uber/sdk/android/core/auth/SsoDeeplink.java [121:148]


    void execute(@NonNull FlowVersion flowVersion) {
        checkState(isSupported(flowVersion), "Single sign on is not supported on the device. " +
                "Please install or update to the latest version of Uber app.");

        Intent intent = new Intent(Intent.ACTION_VIEW);
        final Uri deepLinkUri = createSsoUri(flowVersion);
        intent.setData(deepLinkUri);

        List<PackageInfo> validatedPackages = new ArrayList<>();
        if (productFlowPriority.isEmpty()) {
            validatedPackages.addAll(
                    appProtocol.getInstalledPackages(activity, UBER, getSupportedAppVersion(UBER, flowVersion)));
        } else {
            for (SupportedAppType supportedAppType : productFlowPriority) {
                validatedPackages.addAll(appProtocol.getInstalledPackages(
                        activity, supportedAppType, getSupportedAppVersion(supportedAppType, flowVersion)));
            }
        }

        if (!validatedPackages.isEmpty()) {
            intent.setPackage(validatedPackages.get(0).packageName);
        }
        if (flowVersion == FlowVersion.DEFAULT) {
            activity.startActivityForResult(intent, requestCode);
        } else {
            activity.startActivity(intent);
        }
    }