f9718fee6d
Root causes fixed: - REQUEST_INSTALL_PACKAGES permission missing from both manifests - FileProvider not declared in either manifest (FileProvider.getUriForFile() crashed) - res/xml/file_paths.xml missing (required by FileProvider) - setDestinationInExternalPublicDir() used public Downloads dir (needs storage permission + FileProvider can't serve it); replaced with getExternalFilesDir() which is app-private, needs no permission, and IS accessible by FileProvider - canRequestPackageInstalls() check returned early with startActivity (fire-and- forget); user could never retry. Now uses startActivityForResult/installPermLauncher so the download auto-retries when user returns from the Settings screen - Added download status check (COLUMN_STATUS == STATUS_SUCCESSFUL) before installing