mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-09 02:21:11 +01:00
Changed: Automatically use default properties file and client for TermuxSharedProperties.getTermuxInternalPropertyValue()
This commit is contained in:
parent
5d64f1225c
commit
28ecb64992
2 changed files with 5 additions and 6 deletions
|
|
@ -112,8 +112,8 @@ public class TermuxAppSharedProperties extends TermuxSharedProperties {
|
|||
* Load the {@link TermuxPropertyConstants#KEY_TERMINAL_TRANSCRIPT_ROWS} value from termux properties file on disk.
|
||||
*/
|
||||
public static int getTerminalTranscriptRows(Context context) {
|
||||
return (int) TermuxSharedProperties.getInternalPropertyValue(context, TermuxPropertyConstants.getTermuxPropertiesFile(),
|
||||
TermuxPropertyConstants.KEY_TERMINAL_TRANSCRIPT_ROWS, new SharedPropertiesParserClient());
|
||||
return (int) TermuxSharedProperties.getTermuxInternalPropertyValue(context,
|
||||
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
|
||||
* {@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.
|
||||
*
|
||||
* @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
|
||||
* the object stored against the key is {@code null}.
|
||||
*/
|
||||
public static Object getInternalPropertyValue(Context context, File propertiesFile, String key,
|
||||
@NonNull SharedPropertiesParser sharedPropertiesParser) {
|
||||
return SharedProperties.getInternalProperty(context, propertiesFile, key, sharedPropertiesParser);
|
||||
public static Object getTermuxInternalPropertyValue(Context context, String key) {
|
||||
return SharedProperties.getInternalProperty(context, TermuxPropertyConstants.getTermuxPropertiesFile(), key, new SharedPropertiesParserClient());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue