github Kilowatch/ultimate-file-manager-pro v2.2.5

27 minutes ago

Added

  • Native Download Manager (Mobile & Android TV): Integrated a native, privacy-hardened Download Manager accessible directly from the Main Menu under "Utilities" ("Torrent, Magnet & HTTP downloads") with direct file opening, folder navigation, status filters, and speed / ETA tracking.
  • Direct HTTP / HTTPS Downloads: Resumable HTTP/HTTPS file downloads supporting Range headers, automatic redirect handling, and direct streaming without external dependencies.
  • Privacy-Hardened BitTorrent & Magnet Downloads (libtorrent4j): High-performance BitTorrent 2.1 transfer engine strictly configured with zero-seeding (active_seeds = 0, upload rate limit 1 B/s, forced Protocol Encryption) and instant swarm disconnection upon 100% download completion (immediately drops peer sockets, deregisters DHT announcements, and prevents IP swarm retention).
  • Storage Pre-Flight Validation & FAT32 Limit Enforcement: Pre-flight validation verifying destination storage before starting downloads; detects FAT32/VFAT file systems and enforces the 4 GB single-file ceiling (4_294_967_295L) with a UFMStandard dialog offering 1-tap redirect to pick an exFAT / NTFS / internal storage location.
  • Storage Usability & Safety Margin Checks: Checks available disk space with an added 100 MB safety buffer to prevent storage exhaustion, and blocks path traversal attempts into sensitive system or private application directories.
  • UFM Canonical FAB Folder Picker Flow: Integrated location selection leveraging the canonical FAB folder picker (EXTRA_TORRENT_DOWNLOAD_LOCATION_PICKER) for choosing custom download destinations across local drives and SAF volumes.
  • Settings & Network Policy Integration: Added Download Manager settings under SettingsActivity to configure download directories, review acceptable use legal covenants, and set Network Policy (Wi-Fi Only vs All Networks) with automatic pause on cellular and immediate auto-resumption when reconnecting to Wi-Fi.
  • UFMStandard Legal Compliance & Anti-Piracy Gate: Interactive compliance gate presented on first launch requiring explicit user acceptance of the Non-Piracy and Acceptable Use Policy before transfers can be initiated.
  • Foreground Download Service (dataSync): Foreground service displaying ongoing download progress, speed, ETA, and quick Pause/Cancel notification controls.
  • Open-Source & Policy Updates: Bumped terms and privacy policy documents (WEBSITE/UFMPrivacyPolicy.html, WEBSITE/UFMTerms.html, strings_policy.xml) to November 2026, documenting peer-to-peer decentralization, local file sandboxing guarantees, and registered libtorrent4j under Open Source Licenses (LicensesActivity).
  • UFM Media Player Three-State Repeat Mode: Added full 3-state Repeat Mode (Repeat Off, Repeat All, and Repeat One) with distinct iconography (ic_repeat_one), HUD toast feedback announcements, and full Android TV D-pad remote support.

Fixed

  • Advanced Sync Remote Folder Target Resolution (AdvancedSyncWorker, SyncWorker, SyncRemotePathResolver): Fixed an issue where configuring an Advanced Sync profile between a local folder and a WebDAV (Nextcloud) subfolder incorrectly synced against the root directory of the remote share instead of the chosen subfolder. The root cause was an overly broad SMB server-mode check that treated any share with an empty remotePath as SMB server-mode and forced syncRemotePath to "". Resolved by introducing SyncRemotePathResolver to strictly isolate SMB dynamic share-name extraction to SMB shares while preserving sanitized remote subfolder paths across WebDAV, SFTP, FTP, NFS, and Cloud storage. In addition, guarded download sync to abort safely with an error notification (failed_to_access_remote_path_for_profilename) if the remote directory does not exist or fails to list, protecting local destination files from unintended deletion when "Sync deletions" is enabled, and aligned classic SyncWorker with full WebDAV and SFTP sync support.
  • Immediate Other Storage Export Pre-Check (NetworkBrowserActivity, NetworkBrowserFragment, DocumentProviderExportHelper): Fixed an issue where choosing Tools -> Upload to Other Storage for remote network files or folders (WebDAV, SMB, NFS) without any mounted document provider caused a 15–30+ second delay while the app downloaded the entire remote directory hierarchy before notifying the user. UFM now synchronously checks DocumentProviderRepository.getMountedProviders() upfront: if no provider is mounted, it immediately displays the "No storage provider added" toast and navigates to the Other Storage screen in <100ms with zero network data downloaded.
  • Deferred Remote Staging with Telemetry & Cancellation (NetworkBrowserActivity, NetworkBrowserFragment, DocumentProviderExportHelper, ArchiveProgressDialog): When document providers are mounted, destination provider and format selection dialogs (Single File, ZIP, or Provider App) are presented upfront before downloading remote content. Remote staging displays ArchiveProgressDialog with real-time file counters, percentage, and an active Cancel button that immediately aborts in-flight downloads and deletes temporary staging files.
  • WebDAV & Remote Network Subfolder Navigation Latency (NetworkFileAdapter): Fixed severe 15–30+ second connection and navigation delays when entering folders and subfolders on WebDAV servers (specifically Windows 11 IIS/WebDAV with HTTPS and self-signed certificates), SMB, NFS, and Cloud storage. Removed sequential background child-count storms that recursively probed every subdirectory via listFiles, restoring instantaneous folder opening and rendering.
  • Folder File List Ghost Scrolling & UI Navigation Lag (FileAdapter, FileBrowserActivity, FileBrowserFragment): Fixed an issue where opening a folder caused the file list to become laggy and autonomously jump/scroll up and down on its own without user interaction. The root cause was background indexing reconciliation and folder synchronization (syncFolderWithIndex) unconditionally re-writing all files into SQLite via Room dao.insertAll(), which invalidated the file_index table and triggered dao.getFilesInFolderFlow(). This continuous loop repeatedly triggered FileAdapter.submitList() with full adapter resets (notifyDataSetChanged()), which fought with asynchronous scroll restoration and child count calculations. Resolved by:
    1. Integrating DiffUtil into FileAdapter to compute granular item diffs, natively preserving scroll position, view holders, and active touch drag states without layout jumping.
    2. Adding granular metadata payloads (PAYLOAD_METADATA) for asynchronous directory child counts and folder sizes, updating only affected directory rows in-place without touching other rows.
    3. Implementing a smart pre-flight diff in syncFolderWithIndex to compare existing database rows against physical files, skipping Room writes entirely when folder contents are unchanged.
    4. Adding .distinctUntilChanged on dao.getFilesInFolderFlow() to drop redundant flow emissions triggered by database writes in other directories.
    5. Removing artificial same-folder scroll post calls in FileBrowserActivity and FileBrowserFragment.
  • Download Foreground Service 6-Hour Timeout Crash (Android 15+) (DownloadService, DownloadTransferManager): Fixed an unhandled android.app.RemoteServiceException$ForegroundServiceDidNotStopInTimeException crash ("A foreground service of type dataSync did not stop within its timeout: ComponentInfo{za.kilowatch.ultimatefilemanager.foss/za.kilowatch.ultimatefilemanager.download.DownloadService}", reported on Samsung SM-A346E, Android SDK 36, app 2.2.5-FOSS) where DownloadService remained active in the foreground indefinitely without self-stopping when active transfers completed, paused, or were canceled, exceeding Android 15's cumulative 6-hour runtime limit for dataSync foreground services. Implemented Service.onTimeout(startId, fgsType) on DownloadService to immediately demote from foreground (stopForeground(STOP_FOREGROUND_REMOVE)), release wake and Wi-Fi locks, pause running transfers in DownloadTransferManager, display a dismissible timeout notification (download_timeout_stopped), and terminate via stopSelf(). In addition, changed service start to START_NOT_STICKY, added immediate self-stop guards in onCreate(), onStartCommand(), and onTransfersChanged() whenever zero transfers are in DOWNLOADING state, synchronized service teardown in pauseTransfer() and cancelTransfer(), throttled notification progress updates to 500ms intervals, and preferred standard startService() when the app is in the foreground to prevent startup watchdog race conditions.
  • Shizuku / Elevated Access Main Thread Blocked ANR (ShizukuShellWrapper, FileBrowserFragment, ShizukuFile, UfmApplication): Fixed an ANR (App Freeze) report ("Main thread blocked >5000ms" in ShizukuShellWrapper.exists -> runCommand -> runBlocking, reported on OnePlus HD1901, Android SDK 37, app 2.2.4-FOSS) where FileBrowserFragment.onResume() invoked loadDirectory() on the UI thread when browsing protected directories (/Android/data, /Android/obb), executing synchronous shell commands via runBlocking while background worker threads performed concurrent IPC or heavy I/O, freezing the main looper in LockSupport.parkNanos. Eliminated synchronous ShizukuShellWrapper.exists() calls on the UI thread in FileBrowserFragment.loadDirectory() by treating protected Shizuku directories optimistically and delegating directory listing to background Dispatchers.IO, enforced non-blocking guards in ShizukuShellWrapper.runCommand(), exists(), getFileSize(), and getLastModified() that immediately return safe non-blocking results if invoked on the main looper, and pre-warmed working path prefix resolution on the background daemon thread ufm-startup-io in UfmApplication.onCreate().
  • Thumbnail Cache Manager Main Thread Blocked ANR (FileAdapter, NetworkFileAdapter, LocalThumbnailCacheManager, NetworkThumbnailCacheManager): Fixed an ANR (App Freeze) report ("Main thread blocked >5000ms" in LocalThumbnailCacheManager.getExistingDiskThumbnail -> File.exists -> libcore.io.Linux.access, reported on NVIDIA SHIELD Android TV, Android SDK 30, app 2.2.1-GOOGLE) where FileAdapter.onBindViewHolder(), loadListThumbnail(), and loadGridThumbnail() (and NetworkFileAdapter) performed synchronous disk I/O (File.exists() and getExistingDiskThumbnail()) on the UI thread for every item during RecyclerView layout and scrolling while background worker threads performed concurrent disk I/O (FileOutputStream, File.delete), causing the main thread to freeze on kernel filesystem locks. Replaced main-thread filesystem access checks with sub-microsecond in-memory ConcurrentHashMap queries against thumbnailPathCache, prevented getExistingDiskThumbnail() from executing synchronous disk I/O when invoked on the main looper, moved disk thumbnail recovery to background Dispatchers.IO in getCachedThumbnailPath(), and delegated image loading and decode failure handling to Coil asynchronously.
  • Folder Sort & Filter Preference Manager Main Thread Blocked ANR (SortFilterPreferenceManager, FileBrowserActivity, FileBrowserFragment, NetworkBrowserActivity, NetworkBrowserFragment, UfmApplication): Fixed an ANR (App Freeze) report ("Main thread blocked >5000ms" in SortFilterPreferenceManager, reported on Google rk3326_sgo, Android SDK 32, app 2.2.1-GOOGLE) where FileBrowserActivity.onResume() invoked SortFilterPreferenceManager.hasFolderOverride() and loadForPath() synchronously on the UI thread while a concurrent background worker thread held the monitor lock on SortFilterPreferenceManager to initialize MasterKey.Builder Android Keystore IPC and EncryptedSharedPreferences.create() (Google Tink AES-256 keyset generation and decryption). Introduced thread-safe in-memory caching (ConcurrentHashMap<String, SortFilterState>) for per-folder sort and filter preferences to serve all UI checks in sub-microsecond time with zero Android Keystore IPC or Tink crypto overhead, ensured hasFolderOverride(), hasFolderSpecific(), and loadForFolder() immediately return without blocking the UI thread when invoked on the main looper before preferences finish initializing, and pre-warmed SortFilterPreferenceManager.init() on the background daemon thread ufm-startup-io in UfmApplication.onCreate().
  • ANR Watchdog Formatter File Size & ICU Number Formatting Filter (CrashReportManager): Fixed a false-positive ANR (App Freeze) report on Android TV and mobile devices (reported on Google Google TV Streamer, Android 14 / SDK 34, app 2.2.1-GOOGLE) during in-memory file size string formatting (Formatter.formatFileSize -> Formatter.formatRoundedBytesResult -> Formatter.formatMeasureShort -> Format.format -> MeasureFormat.format -> LocalizedNumberFormatter.formatImpl -> NumberFormatterImpl.formatStatic -> NumberFormatterImpl.preProcessUnsafe -> MutablePatternModifier.processQuantity -> LongNameHandler.processQuantity -> RoundingUtils.getPluralSafe -> DecimalQuantity_AbstractBCD.getStandardPlural -> PluralRules.select -> PluralRules$RuleList.selectRule), thread state RUNNABLE. Added filter 86 (isFormatterFileSizeStall) to detect when the main thread is executing microsecond in-memory Formatter.formatFileSize or ICU number formatting under standard Looper / Handler dispatch or Activity lifecycle with zero application business logic and no framework blocking primitives held, resetting the watchdog heartbeat rather than reporting a spurious freeze when concurrent background worker threads (video thumbnail extraction via MediaMetadataRetriever on DefaultDispatcher, network streaming, and Room DB disk I/O on arch_disk_io_* threads) cause CPU contention on Android TV devices.
  • ANR Watchdog MaterialButton Layout Inflation Filter (CrashReportManager): Fixed a false-positive ANR (App Freeze) report on Android TV and mobile devices (reported on Hivendor TVBOX, Android 9 / SDK 28, app 2.2.1-GOOGLE) during activity launch and view inflation (UFMPlayerActivity.onCreate -> View.inflate -> LayoutInflater.inflate -> MaterialComponentsViewInflater -> MaterialButton.<init> / TextView.setText -> MaterialButton.onTextChanged / MaterialButton.u), thread state RUNNABLE. Added filter 85 (isMaterialButtonLayoutInflateStall) to detect when the main thread is executing in-memory MaterialButton layout calculation or text change dispatch during layout inflation under an Activity lifecycle callback with zero application business logic and no framework blocking primitives held, resetting the watchdog heartbeat rather than reporting a spurious freeze when background worker threads cause CPU contention on low-end hardware.
  • UFM Media Player Auto-play Next & Infinite Looping Enforcement: Fixed an issue where audio and video files repeated automatically or continuously auto-advanced through subsequent files when "Auto-play next" was disabled in Settings (AutoplayPreferenceManager). When disabled, playback now cleanly stops at track completion, releases audio focus and wake locks, and suppresses the next-track countdown overlay.

Don't miss a new ultimate-file-manager-pro release

NewReleases is sending notifications on new releases.