Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f84c4e6 authored by Jan Althaus's avatar Jan Althaus Committed by android-build-merger
Browse files

Merge "Remove custom schema parsing in favor of Uri" into pi-dev am: e3125c7e

am: 927c2278

Change-Id: Ic42e3a481e6ced6a74f795118e2d576f261790cc
parents 7c41320e 927c2278
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -755,14 +755,8 @@ public final class TextClassifierImpl implements TextClassifier {

        @NonNull
        private static List<LabeledIntent> createForUrl(Context context, String text) {
            final String httpPrefix = "http://";
            final String httpsPrefix = "https://";
            if (text.toLowerCase().startsWith(httpPrefix)) {
                text = httpPrefix + text.substring(httpPrefix.length());
            } else if (text.toLowerCase().startsWith(httpsPrefix)) {
                text = httpsPrefix + text.substring(httpsPrefix.length());
            } else {
                text = httpPrefix + text;
            if (Uri.parse(text).getScheme() == null) {
                text = "http://" + text;
            }
            return Arrays.asList(new LabeledIntent(
                    context.getString(com.android.internal.R.string.browse),