Skip to content

Open data/obb folder in system app on Android 14+#152

Merged
naveensingh merged 2 commits intoFossifyOrg:masterfrom
papjul:open_data_obb_system_app
Apr 6, 2025
Merged

Open data/obb folder in system app on Android 14+#152
naveensingh merged 2 commits intoFossifyOrg:masterfrom
papjul:open_data_obb_system_app

Conversation

@papjul
Copy link
Contributor

@papjul papjul commented Apr 5, 2025

What is it?

  • Bugfix
  • Feature
  • Codebase improvement

Description of the changes in your PR

  • Follow-up of More friendly access to data/obb folder on Android 14+ - Version 2 commons#90
  • When browsing folders, offer the option to open in system app. Having this shortcut avoids having to keep two File Manager apps on your homescreen, one for when you need to access data/obb, and the other Fossify File Manager for the other cases, since Fossify File Manager can now send you directly on it whenever you need it with this PR.

Before/After Screenshots/Screen Record

  • Before:
before
  • After:
    On Android 14+
IMG_20250330_174705

Fixes the following issue(s)

Relies on the following changes

Acknowledgement

@naveensingh
Copy link
Member

Just one issue, the progress bar never goes away. It should be selectively hidden for this case.

Tap data/obb ➜ Progress bar appears ➜ Open in system app ➜ Do (evil) things to other apps' data ➜ Press back ➜ The progress bar is still there hoping the files will load anytime now.

@papjul
Copy link
Contributor Author

papjul commented Apr 6, 2025

Just one issue, the progress bar never goes away. It should be selectively hidden for this case.

Tap data/obb ➜ Progress bar appears ➜ Open in system app ➜ Do (evil) things to other apps' data ➜ Press back ➜ The progress bar is still there hoping the files will load anytime now.

I noticed that, but it's unrelated to this issue. It's already there in the current releases.
I found out that returning false here fixes the issue, but then that means, that the function always returns false, and I have no idea about the consequences of this. The same true return value is also present in other similar functions, probably leading to the same issue, so it's far from being specific to this dialog.

@naveensingh
Copy link
Member

I noticed that, but it's unrelated to this issue. It's already there in the current releases.

Yes, but there's a minor difference. In the latest release, the behavior is not polished but successfully granting the SAF permission does hide progress bar. With current changes, keeping the progress bar is not correct because we know that there's no more file loading going on and the user will be navigating away.

I found out that returning false here fixes the issue, but then that means, that the function always returns false, and I have no idea about the consequences of this.

I think it will be safer to call activity?.runOnUiThread { hideProgressBar() } after L188:

@SuppressLint("NewApi")
private fun getItems(path: String, callback: (originalPath: String, items: ArrayList<ListItem>) -> Unit) {
ensureBackgroundThread {
if (activity?.isDestroyed == false && activity?.isFinishing == false) {
val config = context!!.config
if (context.isRestrictedSAFOnlyRoot(path)) {
activity?.handleAndroidSAFDialog(path) {

@papjul papjul force-pushed the open_data_obb_system_app branch from ef2d0af to 782a4ba Compare April 6, 2025 08:52
@papjul
Copy link
Contributor Author

papjul commented Apr 6, 2025

I think it will be safer to call activity?.runOnUiThread { hideProgressBar() } after L188

Done

@naveensingh
Copy link
Member

org.fossify:commons:8439b1b80b is up now.

@papjul papjul force-pushed the open_data_obb_system_app branch from 782a4ba to be63e6f Compare April 6, 2025 11:47
@papjul
Copy link
Contributor Author

papjul commented Apr 6, 2025

org.fossify:commons:8439b1b80b is up now.

Updated for this app

Copy link
Member

@naveensingh naveensingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it works™ :)

Thank you!

@naveensingh naveensingh merged commit a0c87ed into FossifyOrg:master Apr 6, 2025
4 of 5 checks passed
@papjul papjul deleted the open_data_obb_system_app branch April 6, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants