Skip to content
Snippets Groups Projects
Commit 83e8d3a8 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Duncan McNamara
Browse files

Prevent showing the download button on release builds

As those builds don't have the install package permission.
parent 0301f23d
No related branches found
No related tags found
1 merge request!1971Prevent showing the download button on release builds
Pipeline #511901 passed with stage
in 4 minutes and 14 seconds
......@@ -40,6 +40,8 @@ import org.videolan.resources.util.parcelable
import org.videolan.tools.KEY_SHOW_UPDATE
import org.videolan.tools.Settings
import org.videolan.tools.putSingle
import org.videolan.tools.setGone
import org.videolan.vlc.BuildConfig
import org.videolan.vlc.R
import org.videolan.vlc.databinding.DialogUpdateBinding
import org.videolan.vlc.util.AutoUpdate
......@@ -87,6 +89,7 @@ class UpdateDialog : VLCBottomSheetDialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
binding = DialogUpdateBinding.inflate(layoutInflater, container, false)
if (!BuildConfig.DEBUG) binding.download.setGone()
binding.download.setOnClickListener {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (!requireActivity().packageManager.canRequestPackageInstalls()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment