Skip to content

Commit

Permalink
Revert "Allow users to disable terminal margin adjustment"
Browse files Browse the repository at this point in the history
This reverts commit 3213502
  • Loading branch information
agnostic-apollo committed Jul 8, 2021
1 parent dc8bdfe commit 7aefd94
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/com/termux/app/TermuxActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,7 @@ public void onStart() {
if (mTermuxTerminalViewClient != null)
mTermuxTerminalViewClient.onStart();

if (!mProperties.isTerminalMarginAdjustmentDisabled())
addTermuxActivityRootViewGlobalLayoutListener();
addTermuxActivityRootViewGlobalLayoutListener();

registerTermuxActivityBroadcastReceiver();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,6 @@ public final class TermuxPropertyConstants {

/* boolean */

/** Defines the key for whether terminal view margin adjustment that is done to prevent soft
* keyboard from covering bottom part of terminal view on some devices is disabled or not.
* Margin adjustment may cause screen flickering on some devices and so should be disabled. */
public static final String KEY_DISABLE_TERMINAL_MARGIN_ADJUSTMENT = "disable-terminal-margin-adjustment"; // Default: "disable-terminal-margin-adjustment"



/** Defines the key for whether a toast will be shown when user changes the terminal session */
public static final String KEY_DISABLE_TERMINAL_SESSION_CHANGE_TOAST = "disable-terminal-session-change-toast"; // Default: "disable-terminal-session-change-toast"

Expand Down Expand Up @@ -302,7 +295,6 @@ public final class TermuxPropertyConstants {
* */
public static final Set<String> TERMUX_PROPERTIES_LIST = new HashSet<>(Arrays.asList(
/* boolean */
KEY_DISABLE_TERMINAL_MARGIN_ADJUSTMENT,
KEY_DISABLE_TERMINAL_SESSION_CHANGE_TOAST,
KEY_ENFORCE_CHAR_BASED_INPUT,
KEY_HIDE_SOFT_KEYBOARD_ON_STARTUP,
Expand Down Expand Up @@ -343,7 +335,6 @@ public final class TermuxPropertyConstants {
* default: false
* */
public static final Set<String> TERMUX_DEFAULT_BOOLEAN_BEHAVIOUR_PROPERTIES_LIST = new HashSet<>(Arrays.asList(
KEY_DISABLE_TERMINAL_MARGIN_ADJUSTMENT,
KEY_DISABLE_TERMINAL_SESSION_CHANGE_TOAST,
KEY_ENFORCE_CHAR_BASED_INPUT,
KEY_HIDE_SOFT_KEYBOARD_ON_STARTUP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,6 @@ public static String getVolumeKeysBehaviourInternalPropertyValueFromValue(String



public boolean isTerminalMarginAdjustmentDisabled() {
return (boolean) getInternalPropertyValue(TermuxPropertyConstants.KEY_DISABLE_TERMINAL_MARGIN_ADJUSTMENT, true);
}

public boolean areTerminalSessionChangeToastsDisabled() {
return (boolean) getInternalPropertyValue(TermuxPropertyConstants.KEY_DISABLE_TERMINAL_SESSION_CHANGE_TOAST, true);
}
Expand Down

0 comments on commit 7aefd94

Please sign in to comment.