termux / termux/termux-api

`termux-saf-managedir` select screen can disappear and stuck when swtich to other view

Open
#499 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

@tareksander

Problem description and Steps to reproducd
termux-saf-managedir would pop a folder selection screen. If the user switch to other application or go to home screen.

Expected behavior
Either end the terminal blocking or let the selection screen stay in recents.

Additional information
My solution in the pull requests here is to let it stay in recent screens. I set android:excludeFromRecents="false" in AndroidManifest.xml and use finishAndRemoveTask(); replacing finish(); in the activity. I'm not very familiar with Android and not sure if there may be any side effects.

It solves the issue but there's more. If user swipes to kill the activity, it can't catch that to release the terminal. Just fyi, seems some stackoverflow solution is a service to monitor this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the AndroidManifest.xml and the termux-saf-managedir activity discussed in pull request #497, reviewing the proposed changes from finish() to finishAndRemoveTask() and the recents behavior. Reproduce switching away from the folder selection screen, then verify that the terminal is no longer left blocked and that activity removal does not leave resources unreleased.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
cli, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.