mirror of https://github.com/termux/termux-app
139 lines
4.9 KiB
Java
139 lines
4.9 KiB
Java
package com.termux.shared.settings.preferences;
|
|
|
|
/*
|
|
* Version: v0.9.0
|
|
*
|
|
* Changelog
|
|
*
|
|
* - 0.1.0 (2021-03-12)
|
|
* - Initial Release.
|
|
*
|
|
* - 0.2.0 (2021-03-13)
|
|
* - Added `KEY_LOG_LEVEL` and `KEY_TERMINAL_VIEW_LOGGING_ENABLED`.
|
|
*
|
|
* - 0.3.0 (2021-03-16)
|
|
* - Changed to per app scoping of variables so that the same file can store all constants of
|
|
* Termux app and its plugins. This will allow {@link com.termux.app.TermuxSettings} to
|
|
* manage preferences of plugins as well if they don't have launcher activity themselves
|
|
* and also allow plugin apps to make changes to preferences from background.
|
|
* - Added following to `TERMUX_TASKER_APP`:
|
|
* `KEY_LOG_LEVEL`.
|
|
*
|
|
* - 0.4.0 (2021-03-13)
|
|
* - Added following to `TERMUX_APP`:
|
|
* `KEY_PLUGIN_ERROR_NOTIFICATIONS_ENABLED` and `DEFAULT_VALUE_PLUGIN_ERROR_NOTIFICATIONS_ENABLED`.
|
|
*
|
|
* - 0.5.0 (2021-03-24)
|
|
* - Added following to `TERMUX_APP`:
|
|
* `KEY_LAST_NOTIFICATION_ID` and `DEFAULT_VALUE_KEY_LAST_NOTIFICATION_ID`.
|
|
*
|
|
* - 0.6.0 (2021-03-24)
|
|
* - Change `DEFAULT_VALUE_KEEP_SCREEN_ON` value to `false` in `TERMUX_APP`.
|
|
*
|
|
* - 0.7.0 (2021-03-27)
|
|
* - Added following to `TERMUX_APP`:
|
|
* `KEY_SOFT_KEYBOARD_ENABLED` and `DEFAULT_VALUE_KEY_SOFT_KEYBOARD_ENABLED`.
|
|
*
|
|
* - 0.8.0 (2021-04-06)
|
|
* - Added following to `TERMUX_APP`:
|
|
* `KEY_CRASH_REPORT_NOTIFICATIONS_ENABLED` and `DEFAULT_VALUE_CRASH_REPORT_NOTIFICATIONS_ENABLED`.
|
|
*
|
|
* - 0.9.0 (2021-04-07)
|
|
* - Updated javadocs.
|
|
*/
|
|
|
|
/**
|
|
* A class that defines shared constants of the SharedPreferences used by Termux app and its plugins.
|
|
* This class will be hosted by termux-shared lib and should be imported by other termux plugin
|
|
* apps as is instead of copying constants to random classes. The 3rd party apps can also import
|
|
* it for interacting with termux apps. If changes are made to this file, increment the version number
|
|
* and add an entry in the Changelog section above.
|
|
*/
|
|
public final class TermuxPreferenceConstants {
|
|
|
|
/**
|
|
* Termux app constants.
|
|
*/
|
|
public static final class TERMUX_APP {
|
|
|
|
/**
|
|
* Defines the key for whether to show terminal toolbar containing extra keys and text input field.
|
|
*/
|
|
public static final String KEY_SHOW_TERMINAL_TOOLBAR = "show_extra_keys";
|
|
public static final boolean DEFAULT_VALUE_SHOW_TERMINAL_TOOLBAR = true;
|
|
|
|
|
|
/**
|
|
* Defines the key for whether the soft keyboard will be enabled, for cases where users want
|
|
* to use a hardware keyboard instead.
|
|
*/
|
|
public static final String KEY_SOFT_KEYBOARD_ENABLED = "soft_keyboard_enabled";
|
|
public static final boolean DEFAULT_VALUE_KEY_SOFT_KEYBOARD_ENABLED = true;
|
|
|
|
|
|
/**
|
|
* Defines the key for whether to always keep screen on.
|
|
*/
|
|
public static final String KEY_KEEP_SCREEN_ON = "screen_always_on";
|
|
public static final boolean DEFAULT_VALUE_KEEP_SCREEN_ON = false;
|
|
|
|
|
|
/**
|
|
* Defines the key for font size of termux terminal view.
|
|
*/
|
|
public static final String KEY_FONTSIZE = "fontsize";
|
|
|
|
|
|
/**
|
|
* Defines the key for current termux terminal session.
|
|
*/
|
|
public static final String KEY_CURRENT_SESSION = "current_session";
|
|
|
|
|
|
/**
|
|
* Defines the key for current termux log level.
|
|
*/
|
|
public static final String KEY_LOG_LEVEL = "log_level";
|
|
|
|
|
|
/**
|
|
* Defines the key for last used notification id.
|
|
*/
|
|
public static final String KEY_LAST_NOTIFICATION_ID = "last_notification_id";
|
|
public static final int DEFAULT_VALUE_KEY_LAST_NOTIFICATION_ID = 0;
|
|
|
|
|
|
/**
|
|
* Defines the key for whether termux terminal view key logging is enabled or not
|
|
*/
|
|
public static final String KEY_TERMINAL_VIEW_KEY_LOGGING_ENABLED = "terminal_view_key_logging_enabled";
|
|
public static final boolean DEFAULT_VALUE_TERMINAL_VIEW_KEY_LOGGING_ENABLED = false;
|
|
|
|
/**
|
|
* Defines the key for whether flashes and notifications for plugin errors are enabled or not.
|
|
*/
|
|
public static final String KEY_PLUGIN_ERROR_NOTIFICATIONS_ENABLED = "plugin_error_notifications_enabled";
|
|
public static final boolean DEFAULT_VALUE_PLUGIN_ERROR_NOTIFICATIONS_ENABLED = true;
|
|
|
|
/**
|
|
* Defines the key for whether notifications for crash reports are enabled or not.
|
|
*/
|
|
public static final String KEY_CRASH_REPORT_NOTIFICATIONS_ENABLED = "crash_report_notifications_enabled";
|
|
public static final boolean DEFAULT_VALUE_CRASH_REPORT_NOTIFICATIONS_ENABLED = true;
|
|
|
|
}
|
|
|
|
/**
|
|
* Termux Tasker app constants.
|
|
*/
|
|
public static final class TERMUX_TASKER_APP {
|
|
|
|
/**
|
|
* Defines the key for current termux log level.
|
|
*/
|
|
public static final String KEY_LOG_LEVEL = "log_level";
|
|
|
|
}
|
|
|
|
}
|