diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 7c6bb596c..96fd6b11a 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -25,7 +25,7 @@ ######################## -dontobfuscate --keepclassmembers class com.cprcrack.videowebview.VideoEnabledWebView$JavascriptInterface { public *; } +-keepclassmembers class org.kiwix.videowebview.VideoEnabledWebView$JavascriptInterface { public *; } #keep everything in kiwixlib -keep class org.kiwix.kiwixlib.** { *; } diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixWebChromeClient.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixWebChromeClient.kt index 06a1c30b7..5933b9e46 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixWebChromeClient.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixWebChromeClient.kt @@ -20,7 +20,7 @@ package org.kiwix.kiwixmobile.core.main import android.view.ViewGroup import android.webkit.WebView import androidx.appcompat.app.AppCompatActivity -import com.cprcrack.videowebview.VideoEnabledWebChromeClient +import org.kiwix.videowebview.VideoEnabledWebChromeClient class KiwixWebChromeClient( private val callback: WebViewCallback, diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixWebView.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixWebView.kt index abfab6654..a57318535 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixWebView.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixWebView.kt @@ -27,7 +27,7 @@ import android.view.ContextMenu import android.view.View import android.view.ViewGroup import android.webkit.WebView -import com.cprcrack.videowebview.VideoEnabledWebView +import org.kiwix.videowebview.VideoEnabledWebView import io.reactivex.disposables.CompositeDisposable import org.kiwix.kiwixmobile.core.BuildConfig import org.kiwix.kiwixmobile.core.CoreApp.Companion.coreComponent diff --git a/core/src/main/java/com/cprcrack/videowebview/VideoEnabledWebChromeClient.java b/core/src/main/java/org/kiwix/videowebview/VideoEnabledWebChromeClient.java similarity index 99% rename from core/src/main/java/com/cprcrack/videowebview/VideoEnabledWebChromeClient.java rename to core/src/main/java/org/kiwix/videowebview/VideoEnabledWebChromeClient.java index feeda59c2..dab72fff5 100644 --- a/core/src/main/java/com/cprcrack/videowebview/VideoEnabledWebChromeClient.java +++ b/core/src/main/java/org/kiwix/videowebview/VideoEnabledWebChromeClient.java @@ -1,6 +1,6 @@ /* * Kiwix Android - * Copyright (c) 2019 Kiwix + * Copyright (c) 2022 Kiwix * This program 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 @@ -16,7 +16,7 @@ * */ -package com.cprcrack.videowebview; +package org.kiwix.videowebview; import android.media.MediaPlayer; import android.view.SurfaceView; diff --git a/core/src/main/java/com/cprcrack/videowebview/VideoEnabledWebView.kt b/core/src/main/java/org/kiwix/videowebview/VideoEnabledWebView.kt similarity index 92% rename from core/src/main/java/com/cprcrack/videowebview/VideoEnabledWebView.kt rename to core/src/main/java/org/kiwix/videowebview/VideoEnabledWebView.kt index bbf4dae8e..195d1b5be 100644 --- a/core/src/main/java/com/cprcrack/videowebview/VideoEnabledWebView.kt +++ b/core/src/main/java/org/kiwix/videowebview/VideoEnabledWebView.kt @@ -1,6 +1,6 @@ /* * Kiwix Android - * Copyright (c) 2019 Kiwix + * Copyright (c) 2022 Kiwix * This program 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 @@ -15,7 +15,7 @@ * along with this program. If not, see . * */ -package com.cprcrack.videowebview +package org.kiwix.videowebview import android.annotation.SuppressLint import android.content.Context @@ -56,20 +56,20 @@ open class VideoEnabledWebView : WebView { private var addedJavascriptInterface: Boolean @SuppressWarnings("unused") - constructor(context: Context?) : super(context!!) { + constructor(context: Context) : super(context) { addedJavascriptInterface = false } @SuppressWarnings("unused") - constructor(context: Context?, attrs: AttributeSet?) : super( - context!!, attrs + constructor(context: Context, attrs: AttributeSet?) : super( + context, attrs ) { addedJavascriptInterface = false } @SuppressWarnings("unused") - constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super( - context!!, attrs, defStyle + constructor(context: Context, attrs: AttributeSet?, defStyle: Int) : super( + context, attrs, defStyle ) { addedJavascriptInterface = false }