mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Changed: Automatically use default properties file and client for TermuxSharedProperties.getTermuxInternalPropertyValue()
This commit is contained in:
@@ -112,8 +112,8 @@ public class TermuxAppSharedProperties extends TermuxSharedProperties {
|
|||||||
* Load the {@link TermuxPropertyConstants#KEY_TERMINAL_TRANSCRIPT_ROWS} value from termux properties file on disk.
|
* Load the {@link TermuxPropertyConstants#KEY_TERMINAL_TRANSCRIPT_ROWS} value from termux properties file on disk.
|
||||||
*/
|
*/
|
||||||
public static int getTerminalTranscriptRows(Context context) {
|
public static int getTerminalTranscriptRows(Context context) {
|
||||||
return (int) TermuxSharedProperties.getInternalPropertyValue(context, TermuxPropertyConstants.getTermuxPropertiesFile(),
|
return (int) TermuxSharedProperties.getTermuxInternalPropertyValue(context,
|
||||||
TermuxPropertyConstants.KEY_TERMINAL_TRANSCRIPT_ROWS, new SharedPropertiesParserClient());
|
TermuxPropertyConstants.KEY_TERMINAL_TRANSCRIPT_ROWS);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -167,7 +167,7 @@ public abstract class TermuxSharedProperties {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the internal {@link Object} value for the key passed from the file returned by
|
* Get the internal {@link Object} value for the key passed from the file returned by
|
||||||
* {@code propertiesFile}. The {@link Properties} object is
|
* {@link TermuxPropertyConstants#getTermuxPropertiesFile()}. The {@link Properties} object is
|
||||||
* read directly from the file and internal value is returned for the property value against the key.
|
* read directly from the file and internal value is returned for the property value against the key.
|
||||||
*
|
*
|
||||||
* @param context The context for operations.
|
* @param context The context for operations.
|
||||||
@@ -175,9 +175,8 @@ public abstract class TermuxSharedProperties {
|
|||||||
* @return Returns the {@link Object} object. This will be {@code null} if key is not found or
|
* @return Returns the {@link Object} object. This will be {@code null} if key is not found or
|
||||||
* the object stored against the key is {@code null}.
|
* the object stored against the key is {@code null}.
|
||||||
*/
|
*/
|
||||||
public static Object getInternalPropertyValue(Context context, File propertiesFile, String key,
|
public static Object getTermuxInternalPropertyValue(Context context, String key) {
|
||||||
@NonNull SharedPropertiesParser sharedPropertiesParser) {
|
return SharedProperties.getInternalProperty(context, TermuxPropertyConstants.getTermuxPropertiesFile(), key, new SharedPropertiesParserClient());
|
||||||
return SharedProperties.getInternalProperty(context, propertiesFile, key, sharedPropertiesParser);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user