Skip to content

Releases: ShubhamJ010/ScreenshotJanitor

Release v0.4.2-alpha

23 Jun 19:52

Choose a tag to compare

Release v0.4.2-alpha Pre-release
Pre-release

Fixed

  • Cold-start screenshot detection race — Complete rewrite of ScreenshotContentObserver to handle MediaStore cold-start indexing delay on fresh app process:
    • Extended URI-based retry window from 1.5s to ~10.3s with exponential backoff (200ms → 2s × 3) so MediaStore has time to populate DISPLAY_NAME and RELATIVE_PATH columns on first launch
    • Added IS_PENDING column check — skips rows that MediaStore has not finished writing, returning false for retry instead of giving up
    • Added blank column detection — returns false for retry when displayName or relativePath are empty (the root cause: old code returned true and marked the URI as processed before columns were populated)
    • Added performInitialScan() — scans the last 30 seconds of MediaStore immediately after observer registration to catch screenshots taken during the app startup window
    • Added scanLatestScreenshots() fallback — scans the last 60 seconds of MediaStore when URI-based retries are exhausted (handles edge cases where onChange fires before MediaStore creates the row at all)
    • Null/parse-error onChange URI now falls back to scanning recent images instead of silently dropping the event
    • handleNewScreenshot converted from fire-and-forget coroutine to suspend function so callers wait for DB insert + notification before marking the URI as processed
    • Dedup set capped at 200 entries with oldest-25% eviction to prevent unbounded memory growth

Changed

  • ScreenshotDetector.startDetector() now calls performInitialScan() on the observer right after registration

Release v0.4.1-alpha

23 Jun 19:23

Choose a tag to compare

Release v0.4.1-alpha Pre-release
Pre-release

Changed

  • Extracted battery optimization opt-out from PermissionWarningCard into its own dedicated card with standalone "Battery Usage" button
  • PermissionWarningCard — simplified to only handle storage, notification, and all-files-access permissions

Removed

  • Auto-start permission request flow (removed onRequestAutoStart callback and AutoStartUtil dependency from HomeScreen)

Fixed

  • ScreenshotContentObserver.onChange return value — returns true only when a screenshot is actually detected, false otherwise (prevented false-positive triggering of downstream handlers)

Release v0.4.0-alpha

23 Jun 18:23
467089a

Choose a tag to compare

Release v0.4.0-alpha Pre-release
Pre-release

Added

  • URI-based screenshot detection in ScreenshotContentObserver (query by content URI ID instead of scanning latest)
  • Deduplication with synchronized processedUris/pendingUris sets to prevent duplicate processing
  • Retry logic with queryByIdWithRetry (3 attempts with 500ms delay) to handle MediaStore index race
  • clearProcessedUris() lifecycle hook called after cleanup work completes
  • goAsync()/pendingResult.finish() pattern in BootReceiver and NotificationActionReceiver for proper BroadcastReceiver lifecycle
  • contentObserver reference on SsJanitorApp to enable cleanup worker to reset dedup state
  • notificationManager lifecycle management in ScreenshotDetectionService (dismiss on destroy)
  • REQUEST_IGNORE_BATTERY_OPTIMIZATIONS permission declaration for battery optimization opt-out
  • Battery optimization check with re-evaluation on lifecycle resume
  • AutoStartUtil — OEM-specific auto-start settings intents (Xiaomi, Huawei, OPPO, vivo, OnePlus, Samsung)
  • EmptyStateView subtitle parameter for multi-line empty state messages

Changed

  • Switched SsJanitorApp database/repository/settings from lateinit to by lazy for thread-safe initialization
  • Refactored ScreenshotDetectionService.onCreate() to start foreground in onCreate (moved out of helper method)
  • Simplified ScreenshotCleanupWorker — removed dead autoDelete = true branch; always deletes archived screenshots
  • Shared single CoroutineScope(Dispatchers.IO) in ScreenshotContentObserver instead of creating per-screenshot scopes
  • BootReceiver exported attribute set to true for reliable BOOT_COMPLETED delivery on modern Android
  • Permission warning card now includes "No Kill" and "Auto Start" action buttons
  • Empty state message split into separate lines with kept count subtitle
  • Animated stats grid entrance and extracted auto-archive badge
  • Tracked file size for screenshots with freed-up bytes display

Removed

  • All Log.d/Log.e/Log.w statements across the codebase (production code cleanup)
  • ScreenshotDetector stale-run guard log messages

Fixed

  • ContentUris.parseId() crash path — wrapped in try/catch for NumberFormatException
  • queryByIdWithRetry — fixed to 3 total attempts (was 4 due to fallthrough)
  • BootReceiver — missing goAsync() which could cause ANR on boot
  • NotificationActionReceiver — missing goAsync() which could cause ANR

Release v0.3.1-alpha

10 Jun 00:14

Choose a tag to compare

Release v0.3.1-alpha Pre-release
Pre-release
Service: Implement background screenshot detection

Release v0.3.0-alpha

09 Jun 23:30

Choose a tag to compare

Release v0.3.0-alpha Pre-release
Pre-release
AVD: Update scale to 2.15 and align lid pivot

Release v0.2.0-alpha

08 Jun 20:23

Choose a tag to compare

Release v0.2.0-alpha Pre-release
Pre-release
v0.2.0-alpha

Release v0.1.0-alpha

08 Jun 20:11

Choose a tag to compare

Release v0.1.0-alpha Pre-release
Pre-release
Add Gradle caching to speed up build