Merge pull request #13410 from nextcloud/doNotShareToOurApp

Sharing to our app can cause troubles and is not needed (use copy)
This commit is contained in:
Alper Öztürk 2024-08-16 12:35:37 +02:00 committed by GitHub
commit 5956b1e3cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -27,6 +27,7 @@ import com.nextcloud.android.common.ui.theme.utils.ColorRole
import com.nextcloud.client.di.Injectable import com.nextcloud.client.di.Injectable
import com.nextcloud.client.utils.IntentUtil.createSendIntent import com.nextcloud.client.utils.IntentUtil.createSendIntent
import com.nextcloud.utils.extensions.getParcelableArgument import com.nextcloud.utils.extensions.getParcelableArgument
import com.owncloud.android.BuildConfig
import com.owncloud.android.R import com.owncloud.android.R
import com.owncloud.android.databinding.SendShareFragmentBinding import com.owncloud.android.databinding.SendShareFragmentBinding
import com.owncloud.android.datamodel.OCFile import com.owncloud.android.datamodel.OCFile
@ -196,7 +197,7 @@ class SendShareDialog : BottomSheetDialogFragment(R.layout.send_share_fragment),
var label: CharSequence var label: CharSequence
val matches = requireActivity().packageManager.queryIntentActivities(sendIntent, 0) val matches = requireActivity().packageManager.queryIntentActivities(sendIntent, 0)
val sendButtonDataList: MutableList<SendButtonData> = ArrayList(matches.size) val sendButtonDataList: MutableList<SendButtonData> = ArrayList(matches.size)
for (match in matches) { for (match in matches.filterNot { m -> BuildConfig.APPLICATION_ID == m.activityInfo.packageName }) {
icon = match.loadIcon(requireActivity().packageManager) icon = match.loadIcon(requireActivity().packageManager)
label = match.loadLabel(requireActivity().packageManager) label = match.loadLabel(requireActivity().packageManager)
sendButtonData = SendButtonData( sendButtonData = SendButtonData(