Skip to content

Workbench fix#894

Closed
billybox1926-jpg wants to merge 103 commits into
termux:masterfrom
billybox1926-jpg:workbench-fix
Closed

Workbench fix#894
billybox1926-jpg wants to merge 103 commits into
termux:masterfrom
billybox1926-jpg:workbench-fix

Conversation

@billybox1926-jpg

Copy link
Copy Markdown

No description provided.

billybox1926-jpg and others added 30 commits June 8, 2026 14:45
…EFERENCE

- README.md: full project overview, installation, API table, examples, build instructions, project structure
- CONTRIBUTING.md: contributor guide with setup, code style, adding APIs, PR workflow
- ARCHITECTURE.md: deep dive into communication flow, request lifecycle, ResultReturner, permissions, security model
- API_REFERENCE.md: complete reference for all 40+ API endpoints with params, returns, permissions, examples
…ux#819

- Fix termux#864: Add FLAG_ACTIVITY_NEW_TASK to WRITE_SETTINGS intent in TermuxApiReceiver to prevent AndroidRuntimeException when starting from BroadcastReceiver context
- Fix termux#881: Allow independent play/pause/previous/next media notification buttons - each button is now added individually instead of requiring all four
- Fix termux#867/termux#866/termux#849: Add retry logic (3 attempts, 50ms delay) for LocalSocket connection in ResultReturner to handle race conditions with client disconnect
- Fix termux#808: MicRecorderAPI - only set 'file' field when recording actually starts, preventing wrong filename being reported on duplicate record commands; move MediaRecorder cleanup to background thread during onDestroy
- Fix termux#819: Move SAF file I/O operations to background thread via goAsync() to prevent UI thread blocking; move WallpaperAPI getWallpaperFromFile to background thread
…ux#832 termux#825 termux#794

- Fix termux#830: Add POST_NOTIFICATIONS permission for Android 13+ (TIRAMISU) - added manifest permission and runtime check in NotificationAPI
- Fix termux#818: Add 24h clock support to DialogAPI TimeInputMethod - defaults to system setting, overridable via '24h' extra
- Fix termux#801: Add DEVICE_CREDENTIAL fallback to FingerprintAPI on Android 11+ (API 30+) via setAllowedAuthenticators(BIOMETRIC_WEAK | DEVICE_CREDENTIAL)
- Fix termux#813: Wrap clipboard coerceToText() in try-catch to prevent crashes on non-text clipboard items
- Fix termux#832: Wrap SAFActivity.onDestroy socket write in try-catch to prevent crash when client disconnects
- Fix termux#825: Convert KeepAliveService to foreground service with low-priority notification to prevent Android from killing it
- Fix termux#794: Add new SettingAPI for reading/writing Android system settings (system/secure/global namespaces)
- Fix termux#730: Enable vibration on NotificationChannel for Android 8+ - channel settings now enable vibration and copy the vibrate pattern from the intent, required because channel settings override builder settings on Oreo+
- Fix termux#714/termux#776: LocationAPI - add configurable timeout (default 60s) for requestSingleUpdate via 'timeout' extra (ms). Previously the Looper.loop() would block indefinitely. Now runs the GPS request on a separate thread with a configurable timeout.
# Conflicts:
#	README.md
#	app/src/main/java/com/termux/api/apis/NotificationAPI.java
#	app/src/main/java/com/termux/api/apis/SAFAPI.java
…ux#568 termux#565 termux#861 termux#680

- Fix termux#662: Add null check for NotificationService in NotificationListAPI to prevent NPE when listener is disconnected
- Fix termux#703: Add flexMillis support to JobSchedulerAPI setPeriodic via 'flex_ms' extra; display flex in job info
- Fix termux#620: Add torch toggle support via 'mode' extra (on/off/toggle); track torch state with static variable
- Fix termux#600: Add notification progress bar support via 'progress', 'progress_max', and 'progress_indeterminate' extras
- Fix termux#568: Add notification color support via 'color' extra (hex)
- Fix termux#565/termux#801: Extend fingerprint biometric fallback to Android 10+ (API 29) with setDeviceCredentialAllowed(true)
- Fix termux#861: Improve socket retry logic in ResultReturner - 5 retries with progressive backoff (50-250ms)
- Fix termux#680: Add configurable USB permission timeout via 'permission_timeout' extra (defaults to 30s)
- Fix termux#588: TTS stops speaking when client disconnects (Ctrl+C) - detect early socket close, call mTts.stop(), and unblock the wait loop
- Fix termux#877: Add stopSelf() calls to WallpaperService, UsbService to prevent service resource leaks identified by LeakScope static analysis
- Fix termux#541: Reset InputResult.index to -1 when dialog is cancelled to prevent stale index from previous selection
- Fix termux#672: Quit looper in CameraPhotoAPI onDisconnected callback to prevent thread hang/crash
- Try HTTPS first when URL has no scheme, fall back to HTTP
- Add connection and read timeouts (15s/30s) to prevent hangs
- Add android:usesCleartextTraffic="true" to manifest for HTTP fallback support
- Fix termux#612: Allow mic recorder to write to fifos/block devices by only checking exists() for regular files (isFile())
- Fix termux#592: Add relative volume support via 'relative' extra (e.g. termux-volume music --relative 3 or --relative -3)
- Fix termux#705: Add image file clipboard support via 'image-path' extra in ClipboardAPI
- Fix termux#540: Fix media notification button PendingIntent collision by using FLAG_MUTABLE with unique request codes for each media button
# Conflicts:
#	app/src/main/java/com/termux/api/apis/NotificationAPI.java
…ux#319 termux#429 termux#469 termux#877

- Fix termux#201: Torch on/off idempotency - skip setTorchMode if state unchanged
- Fix termux#249: Volume ring crash on silent mode - wrap setStreamVolume in try-catch
- Fix termux#272: Toast crash on custom ROMs - add null checks for toast view background and text view
- Fix termux#275: Dialog dismissed on touch outside - setCanceledOnTouchOutside(false)
- Fix termux#319: Notification always plays sound - set channel sound to null by default, only enable when --sound flag is used
- Fix termux#429: MediaPlayer info outputs JSON instead of plain text
- Fix termux#469: Sensor float values truncated in -a mode - cast to double before putting in JSONArray
- Fix termux#877: Add stopSelf() to SensorReaderService and MediaPlayerService for single-shot commands
billybox1926-jpg and others added 26 commits June 9, 2026 19:25
…mux#266 termux#323

- termux#311: notification set clipboard on action via button_clipboard_N extra
- termux#368: job scheduler duplicate job_id detection and error
- termux#414: dialog response inconsistencies (static index fix, cancel guard)
- termux#742: job scheduler random scheduling (default flex, backoff, deadline)
- termux#844: return error for missing api_method instead of silent ignore
- termux#266: interrupt in-progress TTS via stop extra
- termux#323: media player play stdin via playstdin action
- termux#516: media notifications controllable through headset (MediaSession)
- termux#860: listen to notifications (broadcast posted/removed events)
- TextToSpeechAPI: access mTts/ttsLock via TextToSpeechService class
- MediaPlayerAPI: make updatePlaybackState and initMediaSession static
- DialogAPI: fix remaining InputResult.index references to use instance field
- termux#356: TTS output to file via output_file extra and synthesizeToFile
- termux#499: saf-managedir select screen disappears (waitingForResult guard)
- termux#332: sensitive clipboard handling with auto-clear timeout
- Increased output socket retries from 5 to 10 with longer delays
- Added retry logic for input socket connections
- Brightness: return error when WRITE_SETTINGS permission not granted
- NotificationList: return error when notification access not enabled
- Previously fixed: missing api_method returns error instead of silent ignore
- Use passed context as fallback in getApiLocalSocketAddress
- Skip error notification if ResultReturner.context is null
- Fix termux#466: return error messages instead of hanging for permission-denied cases
- termux#352: add Restart api_method to restart KeepAliveService
- termux#342: add content descriptions for bottom sheet dialog accessibility
- REMAINING_ISSUES.md: full classification of all 96 upstream open issues
- NEXT_PHASE.md: package wrappers, medium features, large features, runtime tests
- 82 issues fixed, remaining categorized as client-side/OS-limited/vague/actionable
…lname; blocking share

- termux#380: AppManagerAPI - list/launch apps with package manager
- termux#305: AlarmManagerAPI - set/cancel exact alarms
- termux#390: AlarmClockAPI - set/dismiss/show system alarm clock entries
- termux#498: SAFAPI realPath/realName methods for URI resolution
- termux#530: ShareAPI BlockingShareActivity for blocking termux-open
- Added SET_ALARM permission and new activities/receivers to manifest
@twaik

twaik commented Jul 13, 2026

Copy link
Copy Markdown
Member

Looks like something completely vibecoded.
Does not seem to be reviewable.

@twaik twaik closed this Jul 13, 2026
@billybox1926-jpg

Copy link
Copy Markdown
Author

@twaik Fair call. It’s a massive diff tracking a ton of concurrent fixes from my fork workbench, and I see how that's a nightmare to review safely. I'll close this out permanently and break these down into isolated, single-focused PRs so they're actually digestible. Thanks for looking.

@billybox1926-jpg billybox1926-jpg deleted the workbench-fix branch July 13, 2026 14:53
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