{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":38464245,"defaultBranch":"master","name":"termux-api","ownerLogin":"termux","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2015-07-03T00:57:59.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/8104776?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1704122859.0","currentOid":""},"activityList":{"items":[{"before":"4c6a5196c969a54c32bbe3fc034e0cdc64e83f04","after":"cff225e41e963267a8e5fdd59a83b5fe224dcb5d","ref":"refs/heads/master","pushedAt":"2024-04-26T18:38:49.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"agnostic-apollo","name":null,"path":"/agnostic-apollo","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/31106828?s=80&v=4"},"commit":{"message":"Added: Add `capabilities` field to `termux-wifi-scaninfo` output\n\nCloses #676","shortMessageHtmlLink":"Added: Add capabilities field to termux-wifi-scaninfo output"}},{"before":"a9abc964b48bb3f9c54a2086df364ee8183cf523","after":"4c6a5196c969a54c32bbe3fc034e0cdc64e83f04","ref":"refs/heads/master","pushedAt":"2024-03-20T00:46:48.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"agnostic-apollo","name":null,"path":"/agnostic-apollo","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/31106828?s=80&v=4"},"commit":{"message":"Fixed: Fix usb fd not being sent due to refactoring in 3c1a6be\n\nThis is a minor refactor of the WithAncillaryFd ResultReturner that achieves two goals:\n\n1. The usb fd is no longer closed before the message is sent over the socket. This resolves #643\n\n2. We queue the fd to be sent (using setFileDescriptorsForSend) and then write `@` as data and then flush the output message in a single operation so that fd is actually sent.\n\nWriting `@` is required because as per docs \"The file descriptors will be sent with the next write of normal data, and will be delivered in a single ancillary message.\". The `@` character is not special, it is just the chosen character expected as the message by the native `termux-api` command when a fd is sent.\n- https://developer.android.com/reference/android/net/LocalSocket#setFileDescriptorsForSend(java.io.FileDescriptor[])\n- https://github.com/termux/termux-api-package/blob/e62bdadea3f26b60430bb85248f300fee68ecdcc/termux-api.c#L358\n\nExplanation for why this got broken in 3c1a6be by @agnostic-apollo at https://github.com/termux/termux-api/pull/644#issuecomment-1937451614:\n\nPreviously, in `UsbApi`, the fd was only temporarily stored in `WithAncillaryFd`, but not actually sent or passed to `LocalSocket`, and then a `@` was written, possibly in attempts to send it, even though like I said, it wasn't passed to `LocalSocket` with `setFileDescriptorsForSend()` yet, so it was a pointless write, but worked due to autoflush on `close()` (check below). After this, when `writeResult()` returned, then `fd` was passed to `LocalSocket`, but still not sent, since no data was written after it.\n\n- https://github.com/termux/termux-api/blob/3bea194249586a7dcb143e66b46c1694cb6ca21a/app/src/main/java/com/termux/api/apis/UsbAPI.java#L69-L70\n- https://github.com/termux/termux-api/blob/3c1a6be86ff0768fa8be029267fbe96dd7fbfb7f/app/src/main/java/com/termux/api/util/ResultReturner.java#L173-L181\n\nPreviously, before https://github.com/termux/termux-api/commit/3c1a6be86ff0768fa8be029267fbe96dd7fbfb7f, the `PrintWriter` in `ResultReturner` was using java `try-with-resources`, which automatically closes when `try` gets out of scope. Additionally, when `new PrintWriter(outputSocket.getOutputStream()` is called, it uses a `BufferedWriter` internally, which when closed, automatically flushes. What this would do is actually send the socket that was previously passed to `LocalSocket`. Moreover, `PrintWriter` was also closed before `fd` was closed since `try-with-resources` finished before, but after the commit, it was closed afterwards, causing the issue.\n\n- https://cs.android.com/android/platform/superproject/+/android-14.0.0_r1:libcore/ojluni/src/main/java/java/io/PrintWriter.java;l=164\n- https://cs.android.com/android/platform/superproject/+/android-14.0.0_r1:libcore/ojluni/src/main/java/java/io/BufferedWriter.java;l=268\n- https://cs.android.com/android/platform/superproject/main/+/main:libcore/ojluni/src/main/java/java/io/Writer.java;l=412\n\nCloses #643","shortMessageHtmlLink":"Fixed: Fix usb fd not being sent due to refactoring in 3c1a6be"}},{"before":"4159c62dd6cd9a8793465def769686fc7ac99fe2","after":"a9abc964b48bb3f9c54a2086df364ee8183cf523","ref":"refs/heads/master","pushedAt":"2024-03-19T23:42:08.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"agnostic-apollo","name":null,"path":"/agnostic-apollo","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/31106828?s=80&v=4"},"commit":{"message":"Fixed: Fix vibration not happening if duration is under 1000ms and touch vibration is disabled\n\nFix source: https://stackoverflow.com/a/62839808/14686958\n\nCloses #666","shortMessageHtmlLink":"Fixed: Fix vibration not happening if duration is under 1000ms and to…"}},{"before":"78e9367da18094a339440b4cf81b8f309b495981","after":null,"ref":"refs/heads/dependabot/github_actions/actions/upload-artifact-4","pushedAt":"2024-01-01T15:27:39.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"landfillbaby","name":"Lucy Phipps","path":"/landfillbaby","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20822924?s=80&v=4"}},{"before":"b7323274a64e708d573faa8bf78c1bb42c9d81ea","after":"4159c62dd6cd9a8793465def769686fc7ac99fe2","ref":"refs/heads/master","pushedAt":"2024-01-01T15:27:35.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"landfillbaby","name":"Lucy Phipps","path":"/landfillbaby","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/20822924?s=80&v=4"},"commit":{"message":"Bump actions/upload-artifact from 3 to 4 (#646)","shortMessageHtmlLink":"Bump actions/upload-artifact from 3 to 4 (#646)"}},{"before":null,"after":"78e9367da18094a339440b4cf81b8f309b495981","ref":"refs/heads/dependabot/github_actions/actions/upload-artifact-4","pushedAt":"2023-12-15T13:47:06.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"dependabot[bot]","name":null,"path":"/apps/dependabot","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/29110?s=80&v=4"},"commit":{"message":"Bump actions/upload-artifact from 3 to 4\n\nBumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.\n- [Release notes](https://github.com/actions/upload-artifact/releases)\n- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)\n\n---\nupdated-dependencies:\n- dependency-name: actions/upload-artifact\n dependency-type: direct:production\n update-type: version-update:semver-major\n...\n\nSigned-off-by: dependabot[bot] ","shortMessageHtmlLink":"Bump actions/upload-artifact from 3 to 4"}},{"before":"a17d71379848110630910ed8c0fe6b593b8fdf4d","after":null,"ref":"refs/heads/dependabot/github_actions/actions/checkout-4","pushedAt":"2023-10-08T22:02:39.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"dependabot[bot]","name":null,"path":"/apps/dependabot","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/29110?s=80&v=4"}},{"before":"8bd22936e66c3e6dcd271405281bc322542e0579","after":"b7323274a64e708d573faa8bf78c1bb42c9d81ea","ref":"refs/heads/master","pushedAt":"2023-10-08T22:02:32.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"fornwall","name":"Fredrik Fornwall","path":"/fornwall","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/277251?s=80&v=4"},"commit":{"message":"Bump actions/checkout from 3 to 4\n\nBumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.\n- [Release notes](https://github.com/actions/checkout/releases)\n- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)\n- [Commits](https://github.com/actions/checkout/compare/v3...v4)\n\n---\nupdated-dependencies:\n- dependency-name: actions/checkout\n dependency-type: direct:production\n update-type: version-update:semver-major\n...\n\nSigned-off-by: dependabot[bot] ","shortMessageHtmlLink":"Bump actions/checkout from 3 to 4"}},{"before":null,"after":"1b50298bb3d0d47fd5941fd82931b029bd765257","ref":"refs/heads/update-gradle","pushedAt":"2023-10-08T22:01:44.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"fornwall","name":"Fredrik Fornwall","path":"/fornwall","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/277251?s=80&v=4"},"commit":{"message":"Chore: Update gradle and libraries","shortMessageHtmlLink":"Chore: Update gradle and libraries"}},{"before":null,"after":"a17d71379848110630910ed8c0fe6b593b8fdf4d","ref":"refs/heads/dependabot/github_actions/actions/checkout-4","pushedAt":"2023-09-04T13:54:14.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"dependabot[bot]","name":null,"path":"/apps/dependabot","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/29110?s=80&v=4"},"commit":{"message":"Bump actions/checkout from 3 to 4\n\nBumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.\n- [Release notes](https://github.com/actions/checkout/releases)\n- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)\n- [Commits](https://github.com/actions/checkout/compare/v3...v4)\n\n---\nupdated-dependencies:\n- dependency-name: actions/checkout\n dependency-type: direct:production\n update-type: version-update:semver-major\n...\n\nSigned-off-by: dependabot[bot] ","shortMessageHtmlLink":"Bump actions/checkout from 3 to 4"}},{"before":"83c62b35188b2df7987992bb52263047444e4a90","after":"8bd22936e66c3e6dcd271405281bc322542e0579","ref":"refs/heads/master","pushedAt":"2023-08-23T06:33:42.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"agnostic-apollo","name":null,"path":"/agnostic-apollo","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/31106828?s=80&v=4"},"commit":{"message":"Fixed: Fix bool extras parsing for `SocketListener`","shortMessageHtmlLink":"Fixed: Fix bool extras parsing for SocketListener"}},{"before":"d2f205113e55b344980bceff8f061e873f996d27","after":"83c62b35188b2df7987992bb52263047444e4a90","ref":"refs/heads/master","pushedAt":"2023-08-21T20:01:47.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"agnostic-apollo","name":null,"path":"/agnostic-apollo","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/31106828?s=80&v=4"},"commit":{"message":"Changed: Add termux app installation link to README","shortMessageHtmlLink":"Changed: Add termux app installation link to README"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEO2_HkQA","startCursor":null,"endCursor":null}},"title":"Activity · termux/termux-api"}