Skip to content

Release v0.0.5

Choose a tag to compare

@github-actions github-actions released this 07 Jul 13:31
· 3 commits to main since this release
Refactor: Improve Device Handling and UI Elements

This commit introduces several enhancements to device interaction and user interface elements:

**Device Handling:**
- **Device Selection:** Users can now see a list of connected devices and select a specific device for ADB commands. The selected device is stored in `AdbInput.selectedDevice`.
- **`getDeviceList()`:** A new function in `AdbInput.kt` to retrieve a list of connected device serial numbers.
- **`DeviceListView` Updates:**
    - Displays the list of connected devices.
    - Allows users to select a device by clicking on its serial number.
    - Shows "(Selected)" next to the currently active device.
    - Includes a refresh button to update the device list.
    - Shows a toast message if no devices are found or when a device serial is long-pressed.
- **Command Execution:** ADB commands are now executed specifically on the selected device using `adb -s <selectedDevice> ...`.

**UI Enhancements:**
- **Toast Notifications:** Introduced a `ToastManager` to display short or long duration toast messages. This is used for notifying users about device connection status.
- **Icon Resources:** Added `ic_expand_less.svg`, `ic_expand_more.svg`, and `ic_power.svg` for UI elements.
- **`NeoIcon` Component:** The `size` parameter is now available to customize icon dimensions.
- **`AndroidNavigationView`:** Increased the size of navigation icons (Back, Home, Recent App) to `48.dp`.
- **`ControlsView`:**
    - Replaced the "Power Button" text button with a `NeoIcon` using `ic_power.svg`.
    - Added dropdown menus for selecting the target device (e.g., "Pixel 6", "Pixel 3") and the unlock method (e.g., "Password", "Pin") for the unlock functionality.
    - The unlock functionality now considers the selected device and unlock method.
- **`MainView`:**
    - Added an overlay that appears if no device is connected, prompting the user to connect a device. Clicking this overlay shows a toast message.
- **Input Handling:** Removed an unnecessary `AdbInput.sendEnter()` call after `AdbInput.sendText()` in `ADBTerminalInputs.kt` for "write" commands.

**Code Structure:**
- **`ToastDurationType.kt`:** New enum to define toast duration types (SHORT, LONG).
- **`setComposeWindowProvider`:** Added a function to provide the `ComposeWindow` instance to `ToastManager`.

These changes aim to provide a more user-friendly experience by clearly indicating connected devices, allowing selection, and offering more specific control options.