mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-03-01 10:07:38 +01:00
handle Action.Pick third party intent too
This commit is contained in:
parent
f55727c4b3
commit
53334fa8b0
@ -46,6 +46,14 @@
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.PICK" />
|
||||
<data android:mimeType="*/*" />
|
||||
|
||||
<category android:name="android.intent.category.OPENABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.RINGTONE_PICKER" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
@ -371,7 +371,7 @@ class MainActivity : SimpleActivity() {
|
||||
}
|
||||
|
||||
val isPickRingtoneIntent = intent.action == RingtoneManager.ACTION_RINGTONE_PICKER
|
||||
val isGetContentIntent = intent.action == Intent.ACTION_GET_CONTENT
|
||||
val isGetContentIntent = intent.action == Intent.ACTION_GET_CONTENT || intent.action == Intent.ACTION_PICK
|
||||
val allowPickingMultipleIntent = intent.getBooleanExtra(Intent.EXTRA_ALLOW_MULTIPLE, false)
|
||||
val getContentMimeType = if (isGetContentIntent) {
|
||||
intent.type ?: ""
|
||||
@ -417,7 +417,8 @@ class MainActivity : SimpleActivity() {
|
||||
|
||||
private fun setupTabs() {
|
||||
main_tabs_holder.removeAllTabs()
|
||||
val isPickFileIntent = intent.action == RingtoneManager.ACTION_RINGTONE_PICKER || intent.action == Intent.ACTION_GET_CONTENT
|
||||
val isPickFileIntent =
|
||||
intent.action == RingtoneManager.ACTION_RINGTONE_PICKER || intent.action == Intent.ACTION_GET_CONTENT || intent.action == Intent.ACTION_PICK
|
||||
if (isPickFileIntent) {
|
||||
mTabsToShow.remove(TAB_STORAGE_ANALYSIS)
|
||||
if (mTabsToShow.none { it and config.showTabs != 0 }) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user