-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Refactoring Overall files #2786
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
Closed
Closed
Changes from all commits
Commits
Show all changes
232 commits
Select commit
Hold shift + click to select a range
5bd9477
test
rubinstory 7adb5b9
test: git test with change readme
BUYA-GH c220eee
Merge pull request #1 from BUYA-GH/master
rubinstory eb25e2c
Refactor: Extract method isEmulatorNull
BUYA-GH b90cc81
Added|Fixed: Extract Superclass from FieldInvokeResult and
rubinstory 943a347
Merge pull request #2 from rubinstory/refactor/ReflectionUtils.java
rubinstory 93d3efe
Changed: Refactor function name intable to isInTable
cyj893 a55f1fc
Changed: Extracting boolean variables in function `width()`
cyj893 46ddf64
refactor: Extract methods from getDeviceInfoMarkdownString()
rubinstory e9a85b8
Merge pull request #3 from rubinstory/refactor/ReflectionUtils.java
rubinstory cf20e57
Merge pull request #1 from cyj893/refactor/WcWidth
cyj893 51dd6b9
refactor: Add Explaining Variables at appendPropertyToMarkdownIfSet()
rubinstory 6523497
Merge pull request #5 from rubinstory/refactor/AndroidUtils.java
rubinstory e92e0a0
Merge pull request #4 from cyj893/master
rubinstory 888392c
Changed: Refactor function name intable to isInTable
cyj893 d28ccaa
Changed: Extracting boolean variables in function `width()`
cyj893 2693133
Changed: Refactor if statement condition with explaining variables
rubinstory 4795f45
Changed: Replace Error Code with Exception
cyj893 815b8ae
Refactor: Extract methods from `setupBootstrapIfNeeded`
eyi-jin dbf19ae
Refactor: Extract Control down + num variable to static final
BUYA-GH 818811f
Merge pull request #1 from BUYA-GH/refactor/TerminalView
BUYA-GH c5696a5
Changed: Extract method `getComponentLength()` and `parseRGB()` from …
cyj893 5eedc52
Merge pull request #8 from BUYA-GH/master
rubinstory 4bb0b2f
refactor: extract variable and extract method from `onStartCommand()`
7512195
Merge pull request #9 from eyi-jin/refactor/TermuxInstaller.java
rubinstory a3777e3
Merge pull request #10 from taehoonkange/refactor/TermuxService.java
rubinstory c38dfe8
Refactor: make "" and " " to String blank and blankSpace for more rea…
BUYA-GH 581ce34
Refactor: extract function addStringOnMenu at setActionModeCallBacks(…
BUYA-GH a324e95
Changed: Exception handling in each usage.
cyj893 4e576cf
Merge pull request #2 from cyj893/refactor/TerminalColors
cyj893 11582d5
Merge branch 'rubinstory:master' into master
cyj893 c7e55d4
Merge pull request #11 from cyj893/master
rubinstory 09bdad4
Refactor: Replace if condition to explaining variable
eyi-jin 8bbaede
Merge branch 'master' of https://github.com/rubinstory/termux-app int…
eyi-jin c5ee897
Changed: Extract `hasPrefixError()` from `setupBootstrapIfNeeded()`
eyi-jin b338ebf
Merge pull request #12 from eyi-jin/refactor/TermuxInstaller.java
rubinstory 2366ca8
Changed: Refactor `isOther()` and `isDevice()` with member functions
rubinstory b3ba5ad
Changed: Extract Explaining Variables in `permissions()` in
rubinstory da336a2
Merge pull request #13 from rubinstory/refactor/FileAttributes.java
rubinstory 5a0c88c
Refactor: rename 'reverseVideo' to 'isReverseVideo' for more suitable…
BUYA-GH a2ca800
Refactor: simplify boolean expression
BUYA-GH 691568a
Merge pull request #2 from BUYA-GH/refactor/TextSelectionCurosrContro…
BUYA-GH f5a3d9b
Merge pull request #3 from BUYA-GH/refactor/TerminalRendere
BUYA-GH 55e129f
Merge pull request #14 from BUYA-GH/master
rubinstory 54002c3
Changed: Refactor `logMessage()` from `Logger.java` with `switch-case`
rubinstory 8e656e6
Merge pull request #15 from rubinstory/refactor/Logger.java
rubinstory f10d16a
Changed: Refactor `logMessage()` from `Logger.java` with `switch-case`
rubinstory 3bc7a2a
Merge branch 'master' into refactor/Logger.java
rubinstory 0fd78c4
Merge pull request #16 from rubinstory/refactor/Logger.java
rubinstory 9ef614d
refactor: extract variable `!mWantsToStop` to `isStop`
02348a2
refactor: extract method in function `actionAcquireWakeLock()`
b8f7f14
Merge pull request #17 from taehoonkange/refactor/TermuxService.java
rubinstory 9937826
refactor: extract method in function `killAllTermuxExecutionCommands()`
2baf66f
Merge pull request #18 from taehoonkange/refactor/TermuxService.java
rubinstory dd71626
refactor: extract method in function`actionReleaseWakeLock()`
493133a
Merge pull request #19 from taehoonkange/refactor/TermuxService.java
rubinstory 31bc372
refactor: extract variable in function ` onTermuxSessionExited()`
1bed89d
refactor: extract class `RootPreferencesFragment` from `SettingsActiv…
56d453b
Merge pull request #20 from taehoonkange/refactor/TermuxService.java
rubinstory 3dc6ace
Merge pull request #21 from taehoonkange/refactor/SettingsActivity.java
rubinstory 3b318e7
Changed: Add explaining variable to `getPid()` in `ShellUtils.java`
rubinstory 88fedac
refactor: extract class `DebuggingPreferencesDataStore.java` from `De…
edf3927
Changed: Extract Explaining Variables in `getSelectedText()`
cyj893 73dfe3a
Merge pull request #22 from rubinstory/refactor/ShellUtils.java
rubinstory 086040e
Refactor: change if-else to switch-case because `displayOrientation` …
BUYA-GH 3bf892e
Refactor: Make constant so that it can be recycled
eyi-jin deba645
Merge pull request #23 from taehoonkange/refactor/SettingsActivity.java
rubinstory c3c1467
Refactor: make boolean value for more readable at `isRectAbove()`
BUYA-GH 9c12ca2
Merge pull request #4 from BUYA-GH/refactor/ViewUtils
BUYA-GH 0df1ac5
Changed: Extract methods in `getWordAtLocation()`
cyj893 24a2eb3
Changed: Extract methods in `resize()`
cyj893 4c0d79e
Changed: Add `final` keywords in `updateOldState()`
cyj893 7b9e0bd
Changed: Extract Class `TextFinder` from `TerminalBuffer`
cyj893 8224ab2
Changed: Extract methods in `getSelectedText()`
cyj893 bae7cc2
Merge pull request #24 from BUYA-GH/master
rubinstory 072ac65
Changed: Extract explaining variables in `updateOldState()`
cyj893 1fb7805
Merge branch 'master' of https://github.com/rubinstory/termux-app int…
eyi-jin 9bdd4cf
Refactor: Extract method `getCurrentWorkingDirectory()` from `TermuxT…
eyi-jin 5ed8f69
Changed: Extract duplicate statements to methods by `RowColumnPair` c…
cyj893 8194778
refactor: extract method from `setLogLevelListPreferenceData()` to `s…
f8887b9
Merge pull request #25 from taehoonkange/refactor/SettingsActivity.java
rubinstory 4c27ac1
Changed: Extract method in `updateOldState()`
cyj893 cfb811a
Merge pull request #3 from cyj893/refactor/TerminalBuffer
cyj893 e8e2447
Merge pull request #26 from cyj893/master
rubinstory bbd7850
Merge pull request #27 from eyi-jin/refactor/TermuxTerminalSessionCli…
rubinstory 4e018b3
Refactor: Extract `showNonFinishedSessionToast()` from `TermuxTermina…
eyi-jin 51e034d
Changed: Refactor `getResultPendingIntentVariablesLogString()` in `Re…
rubinstory 274739c
Merge pull request #28 from rubinstory/refactor/ResultConfig.java
rubinstory 9d349ff
Changed: Extract method `getErrorsListString()` from
rubinstory a9b30f1
Merge pull request #29 from rubinstory/refactor/ResultData.java
rubinstory 8560140
Refactor: make boolean value for more readable at `shouldEnableDarkTh…
BUYA-GH beb87fa
Refactor: remove getSystemAttrColor(Context, attr), because it wasn't…
BUYA-GH d83ba91
Merge pull request #5 from BUYA-GH/refactor/ThemeUtils
BUYA-GH d4cfe26
Merge branch 'rubinstory:master' into master
BUYA-GH 127d96a
Merge pull request #30 from BUYA-GH/master
rubinstory 3587979
Refactor: Extract `getIndexWithDirection()`, `isSessionPendingResult()`
eyi-jin d321ff9
Refactor: Extract `setCurrentSession()` from `TermuxTerminalSessionCl…
eyi-jin af93076
Refactor: Modify function call, Extract method from `TermuxTerminalSe…
eyi-jin 40a0383
Merge branch 'master' of https://github.com/rubinstory/termux-app int…
eyi-jin f1dd3e9
Merge pull request #31 from eyi-jin/refactor/TermuxTerminalSessionCli…
rubinstory 6f615db
Changed: Fixed Typo in `ExtraKeysInfo.java`
rubinstory acf7284
Merge pull request #32 from rubinstory/refactor/ExtraKeysInfo.java
rubinstory 2766de2
Refactor: make boolean Value for more readable
BUYA-GH c7963c6
Refactor: delete the boolean method `isTitleEmpty` may produce 'NullP…
BUYA-GH edcc173
Refactor: delete the variation of `sendCrashReportNotification()` bec…
BUYA-GH ab749b8
Refactor: extract method `makeNewReportInfo()`
BUYA-GH a6945cd
Refactor: delete unnecessary semicolon ';' at enum Type
BUYA-GH b23c86a
Merge pull request #6 from BUYA-GH/refactor/TermuxCrashUtils
BUYA-GH 51a82d3
Merge pull request #33 from BUYA-GH/master
rubinstory dae4d02
refactor: extract method and change switch case to conditional operator
2a28914
refactor: extract `TerminalIOPreferencesDataStore`class from ``
d2a6fd0
refactor : extract method and change switch case to condtional operator
669a642
refactor: extract `TerminalIOPreferencesDataStore.java`class
43e7704
refactor: extract method `isDisability()`
f88b81f
Refactor: extract method `isStringHasValue()` which check string has …
BUYA-GH e9d148e
Refactor: extract and move method `buildScript()` to TermuxConstants
BUYA-GH 1d3881c
Refactor: extract method `runningScript()`
BUYA-GH c99c330
Refactor: extract method `buildOutputScript()`
BUYA-GH b126950
Refactor: extract method `buildOutputMarkdown()`
BUYA-GH 578bd57
Merge pull request #38 from BUYA-GH/refactor/TermuxCrashUtils
rubinstory 33d8acf
refactor: extract class `TerminalViewPreferencesDataStore.java`
9a65e78
refactor: extract method `isDisability()`
2f92445
refactor: change switch case to conditional operator
443802f
fix: delete `}`
f28b1e6
refactor: delete duplicated class `DebuggingPreferencesDataStore.java`
8ae988b
fix: not delete but extract class
b014be4
Refactor: extract constant value for more readable
BUYA-GH f3551bc
refactor: extract class `DebuggingPreferencesDataStore.java`
67c4626
Changed: Extract explaining variables
cyj893 5d7eeec
refactor: extract class `DebuggingPreferencesDataStore.java`
54490d1
refactor: extract class `DebuggingPreferencesDataStore.java`
a6903fc
Changed: Rename boolean variables
cyj893 aa03995
Update DebuggingPreferencesDataStore.java
0fb4273
refactor: extract method and change switch case to conditional operator
5a5d5e8
Refactor: extract boolean value for more readable
BUYA-GH 3e615bc
refactor: extract method and change switch case to conditional operator
fcb1bcf
Update DebuggingPreferencesDataStore.java
caee324
Changed: Define class `Cursor`
cyj893 319719c
Changed: Extract method and Rename Variables in `setOrClearEffect()`
cyj893 b7591b0
Changed: Delete unnecessary variable `isNewCursorPlaced` in `updateOl…
cyj893 f800fe7
Fixed: Set order of the variables properly
cyj893 64b0f8a
Changed: Extract method in `updateOldState()`
cyj893 669e4f5
Refactor: Rename too long variable to shorter one in `TermuxTerminalV…
eyi-jin b171239
Merge pull request #4 from cyj893/refactor/TerminalBuffer2
cyj893 3104e3e
Refactor: Extract methods from `TermuxTerminalViewClient.java`
eyi-jin 00d900f
Refactor: Extract methods from `TermuxTerminalViewClient.java`
eyi-jin a2941d2
Refactor: delete overloading function `sendPluginCommandErrorNotifica…
BUYA-GH 5c7fac1
Refactor: Extract Variable from `TermuxTerminalViewClient.java`
eyi-jin c86e902
Merge branch 'master' of https://github.com/rubinstory/termux-app int…
eyi-jin 6008d6f
Changed: Extract resizing methods to class in `ResizeBuffer`
cyj893 4d77ed6
Merge pull request #34 from taehoonkange/DebuggingPreferencesDataStore
rubinstory acb3859
Merge pull request #5 from cyj893/refactor/ResizeBuffer
cyj893 e27de12
Merge branch 'master' into refactor/DebuggingPreferencesDataStore
rubinstory e3892d4
Merge pull request #35 from taehoonkange/refactor/DebuggingPreference…
rubinstory a31aa7e
Merge branch 'master' into refactor/TerminalIOPreferencesFragment
rubinstory 00664cc
Merge pull request #36 from taehoonkange/refactor/TerminalIOPreferenc…
rubinstory 6e00576
Merge pull request #37 from taehoonkange/refactor/TerminalIOPreferenc…
rubinstory 9149f3b
Merge pull request #39 from taehoonkange/refactor/TerminalViewPrefere…
rubinstory 5176d62
Merge pull request #40 from taehoonkange/refactor/DebuggingPreference…
rubinstory 60f05f8
Merge pull request #41 from taehoonkange/refactor/termux_float/Debugg…
rubinstory 3e96a05
Merge pull request #42 from BUYA-GH/refactor/TextInputDialogUtils
rubinstory 0fc534e
Merge pull request #43 from taehoonkange/refactor/terumx_tasker/Debug…
rubinstory 369a7b7
Merge pull request #44 from taehoonkange/refactor/termux_widget/Debug…
rubinstory 2b7eb00
Merge pull request #45 from taehoonkange/refactor/termux_widget/Debug…
rubinstory 3be12f5
Merge pull request #46 from taehoonkange/refactor/termux_tasker/Debug…
rubinstory 1008fa3
Merge pull request #47 from taehoonkange/refactor/termux_float/Debugg…
rubinstory c0cfd3c
Merge pull request #48 from BUYA-GH/refactor/TermuxNotificationUtils
rubinstory a838d25
Merge pull request #49 from taehoonkange/refactor/termux_api/Debuggin…
rubinstory a6880e1
Merge pull request #50 from cyj893/master
rubinstory 33feb5e
Merge pull request #51 from eyi-jin/refactor/TermuxTerminalViewClient…
rubinstory 12388ae
Fixed: Set order of the variables properly
cyj893 c085e44
Changed: Refactor `initExtraKeysInfo()` in `ExtraKeysInfo.java`
rubinstory 7c0bc91
Added: Add `getLogVariableList()` at `LocalSocketRunConfig.java`
rubinstory 872a8bb
Merge pull request #52 from rubinstory/refactor/ExtraKeysInfo.java
rubinstory 07cdcb3
Merge pull request #53 from rubinstory/refactor/LocalSocketRunConfig.…
rubinstory dadb69c
Docs: Add Comments at `getLogVariableList()` in
rubinstory aa173f0
Changed: Extract class `BufferStyler`
cyj893 43b5dfc
Added: Add `getLogVariableList()` at `LocalClientSocket.java`
rubinstory a6aa010
Changed: Delete `localVariableList` in `getLogString()` and
rubinstory 054171a
Merge pull request #54 from rubinstory/refactor/LocalCientSocket.java
rubinstory 4b3fb6c
Merge branch 'master' into refactor/LocalSocketRunConfig.java
rubinstory 45c0ac6
Merge pull request #55 from rubinstory/refactor/LocalSocketRunConfig.…
rubinstory cc5d934
Added: Add `getLogVariableList()` at `ReportInfo.java`
rubinstory bb9fbd9
Merge pull request #56 from rubinstory/refactor/ReportInfo.java
rubinstory 434ebe9
Merge pull request #6 from cyj893/refactor/TerminalBuffer3
cyj893 4f7a056
Refactor: extract boolean method
BUYA-GH 5f581ca
Changed: Extract methods in `updateWith()` and handle exception
cyj893 6310063
Refactor: make function `isSharedPreferenceNull()` for extract duplic…
BUYA-GH fdc0389
Merge pull request #57 from BUYA-GH/refactor/ReflectionUtils
rubinstory 60145c9
Merge pull request #58 from BUYA-GH/refactor/SharedPreferenceUtils
rubinstory b19f59f
Refactor: implement MVC model on TextSelectionCursorController
BUYA-GH 8fc2d21
Refactor: rename `TextSelectionModel` to `TextSelectionCursorModel`
BUYA-GH 82a568e
Refactor: remove dependency between model and view
BUYA-GH fca8f61
Merge pull request #7 from cyj893/refactor/TerminalColorScheme
cyj893 f9f1ecf
Changed: Reduce parameters in `parseRGB()`
cyj893 3f0a05e
Refactor: Extract methods from `TermuxSessionsListViewController.java`
eyi-jin 60fb107
Merge branch 'master' of https://github.com/rubinstory/termux-app int…
eyi-jin 3fa2c87
Refactor: Move position of variable,log from `TermuxActivityRootView.…
eyi-jin 654cf61
Refactor: Extract methods from `TermuxActivityRootView.java`
eyi-jin 477e9c7
Merge pull request #59 from BUYA-GH/refactor/terminal-view
rubinstory c9820c1
Merge pull request #60 from cyj893/master
rubinstory 6e25078
Merge pull request #61 from eyi-jin/refactor/TermuxSessionsListViewCo…
rubinstory bb4c484
Added: Add `getResultPendingIntentVariableList()` and `getDirectoryVa…
rubinstory 361d2b4
Merge pull request #62 from rubinstory/refactor/ResultConfig.java
rubinstory 79cce85
Refactor: Extract methods, variable from `TermuxActivityRootView.java`
eyi-jin 81f8509
Refactor: Rename variable from `TermuxActivityRootView.java`
eyi-jin 3cf4717
Refactor: Seperate Logic and Inline Method from `TermuxActivityRootVi…
eyi-jin 254a634
Merge branch 'master' of https://github.com/rubinstory/termux-app int…
eyi-jin 4fc47b9
Merge pull request #63 from eyi-jin/refactor/TermuxActivityRootView.java
rubinstory ed22191
Added: Add `getLogVariableList()` in `PeerCred.java`
rubinstory 2f1cfc6
Changed: Refactor `getLogString()` with `for-loop`
rubinstory 0571ce6
Changed: Refactor `getMarkDownString()` with `for-loop`
rubinstory d9d7aa4
Merge pull request #64 from rubinstory/refactor/PeerCred.java
rubinstory 1677e24
Changed: Add explaining variables to `getLogString()` and
rubinstory 88693de
Refactor: Replace Magic Number with Symbolic Constant from `RunComman…
eyi-jin b61240d
Refactor: Extract methods from `RunCommandService.java`
eyi-jin 0522a27
Merge branch 'master' of https://github.com/rubinstory/termux-app int…
eyi-jin 7d2d73e
Merge pull request #65 from eyi-jin/refactor/RunCommandService.java
rubinstory 973ee62
Added: Add `ErrnoBuilder` for `Errno.java`
rubinstory 2549146
Merge pull request #66 from rubinstory/pattern/Errno.java
rubinstory 77280fc
Revert "Added: Add `ErrnoBuilder` for `Errno.java`"
rubinstory 38f5f39
Merge pull request #67 from rubinstory/revert-66-pattern/Errno.java
rubinstory 54763d1
Added: Add ErrorBuilder for Error.java
rubinstory 67ee159
Merge pull request #68 from rubinstory/pattern/Error.java
rubinstory 43d2a6d
Changed: Apply State pattern with EscapeState
cyj893 1a65a92
Changed: Moving functions into each EscapeState
cyj893 559e485
Added: Add `configureTermuxPreference.java` for `RootPreferencesFragm…
786501a
Merge pull request #8 from cyj893/pattern/TerminalEmulator
cyj893 d2112d3
Added: extract class `configureTermuxAPIPreference()`
0bb9652
Merge pull request #69 from taehoonkange/pattern/RootPreferencesFragm…
rubinstory 27b5674
Merge pull request #70 from cyj893/master
rubinstory 62a06e4
Merge pull request #71 from taehoonkange/pattern/configureTermuxAPIPr…
rubinstory File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
272 changes: 170 additions & 102 deletions
272
app/src/main/java/com/termux/app/RunCommandService.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These and all the other if conditions extracted to boolean are useless and server no purpose, using an if condition already implies that one or more conditions will be supplied in it. Do not do this. If there are multiple conditions that are too complex, they can be split on multiple lines, in some case extraction to boolean is indeed fine.