X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fviews%2FNestedScrollWebView.kt;h=ad34be8327baa58234dc08ae8735554eec6ee5f2;hp=01e960489ebb67ff63c768c47155d97f2f7f9936;hb=2bd8b7edef80b4b10cb809a198b4624c6c740c86;hpb=484f0b0f0143c53a4722cee3a31e714df0c8c49a diff --git a/app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.kt b/app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.kt index 01e96048..ad34be83 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/views/NestedScrollWebView.kt @@ -1,20 +1,20 @@ /* - * Copyright © 2019-2021 Soren Stoutner . + * Copyright © 2019-2022 Soren Stoutner . * - * This file is part of Privacy Browser . + * This file is part of Privacy Browser Android . * - * Privacy Browser is free software: you can redistribute it and/or modify + * Privacy Browser Android is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * - * Privacy Browser is distributed in the hope that it will be useful, + * Privacy Browser Android is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Privacy Browser. If not, see . + * along with Privacy Browser Android. If not, see . */ package com.stoutner.privacybrowser.views @@ -27,9 +27,9 @@ import android.graphics.drawable.BitmapDrawable import android.os.Bundle import android.util.AttributeSet import android.view.MotionEvent -import android.webkit.WebView -import android.webkit.SslErrorHandler import android.webkit.HttpAuthHandler +import android.webkit.SslErrorHandler +import android.webkit.WebView import androidx.core.content.ContextCompat import androidx.core.view.NestedScrollingChild2 @@ -208,22 +208,15 @@ class NestedScrollWebView @JvmOverloads constructor(context: Context, attributeS hasPinnedSslCertificate = true } - fun getPinnedSslCertificate(): ArrayList { - // Initialize an array list. - val arrayList = ArrayList() - + fun getPinnedSslCertificate(): Pair, Array> { // Create the SSL certificate string array. val sslCertificateStringArray = arrayOf(pinnedSslIssuedToCName, pinnedSslIssuedToOName, pinnedSslIssuedToUName, pinnedSslIssuedByCName, pinnedSslIssuedByOName, pinnedSslIssuedByUName) // Create the SSL certificate date array. val sslCertificateDateArray = arrayOf(pinnedSslStartDate, pinnedSslEndDate) - // Add the arrays to the array list. - arrayList.add(sslCertificateStringArray) - arrayList.add(sslCertificateDateArray) - - // Return the pinned SSL certificate array list. - return arrayList + // Return the pinned SSL certificate pair. + return Pair(sslCertificateStringArray, sslCertificateDateArray) } fun clearPinnedSslCertificate() {