fix #381, handle media pick intents in Show All Folders content view
This commit is contained in:
parent
4203939d62
commit
74edee735a
1 changed files with 12 additions and 2 deletions
|
@ -252,9 +252,14 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
config.showAll = true
|
config.showAll = true
|
||||||
Intent(this, MediaActivity::class.java).apply {
|
Intent(this, MediaActivity::class.java).apply {
|
||||||
putExtra(DIRECTORY, "/")
|
putExtra(DIRECTORY, "/")
|
||||||
startActivity(this)
|
|
||||||
|
if (mIsThirdPartyIntent) {
|
||||||
|
handleMediaIntent(this)
|
||||||
|
} else {
|
||||||
|
startActivity(this)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
finish()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun changeViewType() {
|
private fun changeViewType() {
|
||||||
|
@ -477,7 +482,12 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
private fun itemClicked(path: String) {
|
private fun itemClicked(path: String) {
|
||||||
Intent(this, MediaActivity::class.java).apply {
|
Intent(this, MediaActivity::class.java).apply {
|
||||||
putExtra(DIRECTORY, path)
|
putExtra(DIRECTORY, path)
|
||||||
|
handleMediaIntent(this)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun handleMediaIntent(intent: Intent) {
|
||||||
|
intent.apply {
|
||||||
if (mIsSetWallpaperIntent) {
|
if (mIsSetWallpaperIntent) {
|
||||||
putExtra(SET_WALLPAPER_INTENT, true)
|
putExtra(SET_WALLPAPER_INTENT, true)
|
||||||
startActivityForResult(this, PICK_WALLPAPER)
|
startActivityForResult(this, PICK_WALLPAPER)
|
||||||
|
|
Loading…
Reference in a new issue