-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Termux Various Fixes And Improvements #1953
Termux Various Fixes And Improvements #1953
Conversation
Would be better if someone tested before we merge, since changes to activity stuff, don't wanna repeat |
This commit adds `logcat` errors if an invalid intent action is passed or if `allow-external-apps` is not set to `true` while sending an intent to `RunCommandService`, so that users can detect issues.
This commit fixes `getExpandedTermuxPath()` (previously `parsePath()`) not expanding path if exactly `$PREFIX` is passed and addition of extra trailing slashes in some cases.
This commit fixes the workdir logic to not send `EXTRA_CURRENT_WORKING_DIRECTORY` extra to `TermuxService` if workdir is empty, since that will raise `No such file or directory` exceptions if `cwd` is empty when targeting sdk `29`.
This commit fixes the issue when `cwd` is empty and is passed to `Runtime.getRuntime().exec(progArray, env, new File(cwd));`, it raises the `No such file or directory` exceptions when targeting sdk `29`.
This commit fixes the non-crashing exception `Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;` on termux startup due to `setContentView()` call by `TermuxActivity.onCreate()`. The recommended solution seems to be to add `androidx.core:core` dependency, which has solved the issue. https://issuetracker.google.com/issues/117685087
b6fc824
to
9fd2cf9
Compare
Fixed the commit messages, doing them in haste wasn't wise. The Fix current working directory default value commit would mainly apply for |
I used the branch for my check and also started rebase to v108 (1-2 tloc) but then canceled. The branch is suitable to check 29+ but the concept aims to replace When do you plan the merge and could you consider my boot-loop extension? |
This will allow users to run `dumpsys` command after running `adb shell pm grant com.termux android.permission.DUMP`. https://developer.android.com/studio/command-line/dumpsys
For your addendum I had this on |
This pull request is not meant to merge
If you are talking about |
Thanks for the answer! I understand the content of this PR :) I didn't intend to create my own PR and therefore used this to ask about my 3 loc and tell you about my experience with/without |
This will allow users to access `Android/obb` on android 11 after explicitly granting Termux the permission by going to Termux `App Info` in Android `Settings` -> `Advance` -> `Install unknown apps`. https://medium.com/androiddevelopers/android-11-storage-faq-78cefea52b7c
- Decouple the `CursorController`, `TextSelectionCursorController`(previously `SelectionModifierCursorController`) and `TextSelectionHandleView` (previously `HandleView`) from `TerminalView` by moving them to their own class files. - Fixes termux#1501 which caused the `java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.` exception to be thrown when long pressing the down key while simultaneously long pressing the terminal view for text selection.
…ider input with VOL_UP+q Check termux#1420 for details.
…x app and its plugins This commit removes almost all hardcoded paths in Termux app and moves the references to the `TermuxConstants` class. The `TermuxConstants` class should be imported by other termux plugin apps instead of copying and defining their own constants. The 3rd party apps can also import it for interacting with termux apps. App and sub class specific constants are defined in their own nested classes to keep them segregated from each other and for better readability.
The termux properties handling was mixed in with termux preferences. They are now moved out of into a separate sub package, the following classes are added: - `SharedProperties` class which is an implementation similar to android's `SharedPreferences` interface for reading from ".properties" files which also maintains an in-memory cache for the key/value pairs. Two types of in-memory cache maps are maintained, one for the literal `String` values found in the file for the keys and an additional one that stores (near) primitive `Object` values for internal use by the caller. Write support is currently not implemented, but may be added if we provide users a GUI to modify the properties. We cannot just overwrite the ".properties" files, since comments also exits, so in-place editing would be required. - `SharedPropertiesParser` interface that the caller of `SharedProperties` must implement. It is currently only used to map `String` values to internal `Object` values. - `TermuxPropertyConstants` class that defines shared constants of the properties used by Termux app and its plugins. This class should be imported by other termux plugin apps instead of copying and defining their own constants. - `TermuxSharedProperties` class that acts as manager for handling termux properties. It implements the `SharedPropertiesParser` interface and acts as the wrapper for the `SharedProperties` class.
The `TermuxConstants` and `TermuxPropertyConstants` classes have both been updated to `v0.2.0`. Check their Changelog sections for info on changes. Some other hardcoded termux paths have been removed as well and are now referenced from `TermuxConstants` class.
…andService The `RunCommandService` will now call the `TermuxSharedProperties` for getting current value of `allow-external-apps`, instead of using its own duplicated function to read "termux.properties" files.
`TerminalView` will use the `TerminalViewClient` interface implemented by `TermuxViewClient` in termux-app to get "enforce-char-based-input" and "ctrl-space-workaround" property values. It will also not read the file every time it needs to get the property value and will get it from the in-memory cache of `TermuxSharedProperties`.
Also moves `TermuxViewClient` into com.termux.app.terminal package
The `TermuxConstants` classes has been updated to `v0.3.0`. Check its Changelog sections for info on changes.
The termux preferences handling was mixed in with termux properties before an earlier commit. They are now moved out of into a separate sub package, the following classes are added: - `TermuxPreferenceConstants` class that defines shared constants of the preferences used by Termux app and its plugins. This class should be imported by other termux plugin apps instead of copying and defining their own constants. - `TermuxSharedPreferences` class that acts as manager for handling termux preferences.
All issues for this pull request have been resolved. If someone wants to do some basic testing, they can do so. Everything is fine on my own end.
@xeffyr you can build the updated bootstrap and release at your own convenience. Thanks |
I already gave solutions and asked you if you wanted that, but I don't where were you at. Anyways. too late now, will be looked into in future.
And |
Thanks for I had read, understood and answered your What disturbs me is the unmotivated and unwanted show/raise of the OS KB. The seven-tabs-solution is a workaround or I accept, that hide OS-KB is the most common of all finger actions. Especially with PiP and Split. |
Welcome. It is larger because lot of code has been added and because obfuscation has been disabled to preserve full stacktraces for crash reports.
I will try to add a
|
Changelog0.109 - 2021-04-13Added
Changed
Fixed
Deprecated
The above is the changelog that covers most of the stuff updated, there might be some important stuff left in the commit messages that's not even mentioned here, but this is the max amount of brain cells I'm willing to sacrifice for this changelog, so it will have to do ;). The commit messages also have a lot more detail about stuff. |
🎉 @agnostic-apollo you should be able to tag the release yourself if you want to. Since you have bumped the version code in the app it just you be a git tag/release needed: https://github.com/termux/termux-app/releases/new, and then F-droid should pick it up. Releases can be edited afterwards as well in case something goes wrong. |
Thanks, but xeffyr asked me not to do that myself since he has to build the bootstrap with updated packages. |
Ah, alright |
Will do that today and then new release. |
Great, thanks! |
Sorry @agnostic-apollo my "6358b" note should not be a request to explain - thank you that you do it even.
Please not! Better ensure the Extra Key toggle always works and unmotivated show of OS KB not longer. I later try to create an example video, that can be repeated on your |
If you are using android studio, then either restart it or |
Invalidate the caches and restart Android Studio. |
There is a left over dot at the end of the |
Your new Artifact is reduced by 76148b (do not comment). But can you explain to me, why this and your last build was successful and not in
I remember again that my 29+ idea based on the
If I remember well, you have a |
Build after merging into
I don't think video is needed. To disable soft keyboard for all apps, click on the keyboard button on the bottom right (top right in landscape), there should a toggle for disabling soft keyboard if hardware keyboard is connected. This requires 2 clicks. Same (older) phones show a notification for choosing input method instead of that button. The button shows in both my android 10 and 11 avds. To disable soft keyboard for only termux, |
Thanks! After your last #2002 Merge, I can create with the current
Above is a
After explaining to me, where this was done on my device I succeeded. Maybe I'm too stupid to find it but it would be easier, to have the allow dialogue in line 4 (behind echo 's=storage t=com.termux c=$t.app.reload_style f="\`find u/"; w="|wc -l\`"
alias ll="ls -al" s="echo u/nl $f$w/$f/nl/$w" d="du -hd 1" pp="ps -eo pid,ppid,comm,etime"
f=`df|grep $s|grep \-|cut -d% -f2`; [ -e u ]&& . uu.sh . .; # only if file exist!
sc=.shortcuts; if [ ! -d $sc ];then mkdir $sc;cd $sc;$e "bash uu.sh uu n uu.sh">nedit
$e "env;ls -la;$ps;pstree;exit 1">env-ls-ps;$e "nano .bashrc">nano;cd;fi;[ -e u ]&& return
ln -s ../usr u; ln -s /$s/emulated/0 sd; am broadcast --es $c $s -a $c $t'>.bashrc Sufficient for this example is To produce the next |
ps: above are some open "?" |
Comment moved here. Respond there, this is not the place for this discussion anymore. |
…xes-and-improvements
…xes-and-improvements
Some minor fixes to
TermuxActivity
andRunCommandService
. Need to add/fix some other stuff, but will do it together when I do some (major) refactoring, have yet to see whether committing tomaster
orandroid-10
will be more wiser, depending on differences in existing files.