diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt index b8ce7e3f..eb4a3261 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt @@ -373,24 +373,6 @@ class MainActivity : SimpleActivity() { openPath(config.homeFolder) } - val isPickRingtoneIntent = intent.action == RingtoneManager.ACTION_RINGTONE_PICKER - val isGetContentIntent = intent.action == Intent.ACTION_GET_CONTENT || intent.action == Intent.ACTION_PICK - val isCreateDocumentIntent = intent.action == Intent.ACTION_CREATE_DOCUMENT - val allowPickingMultipleIntent = intent.getBooleanExtra(Intent.EXTRA_ALLOW_MULTIPLE, false) - val getContentMimeType = if (isGetContentIntent) { - intent.type ?: "" - } else { - "" - } - - getAllFragments().forEach { - it?.isGetRingtonePicker = isPickRingtoneIntent - it?.isPickMultipleIntent = allowPickingMultipleIntent - it?.isGetContentIntent = isGetContentIntent - it?.wantedMimeType = getContentMimeType - it?.updateIsCreateDocumentIntent(isCreateDocumentIntent) - } - if (refreshRecents) { recents_fragment?.refreshFragment() } diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ViewPagerAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ViewPagerAdapter.kt index 7aad2f83..dab82eb4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ViewPagerAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/adapters/ViewPagerAdapter.kt @@ -1,5 +1,7 @@ package com.simplemobiletools.filemanager.pro.adapters +import android.content.Intent +import android.media.RingtoneManager import android.view.View import android.view.ViewGroup import androidx.viewpager.widget.PagerAdapter @@ -19,6 +21,22 @@ class ViewPagerAdapter(val activity: SimpleActivity, val tabsToShow: ArrayList