public abstract class Governor
extends java.lang.Object
This governor class cannot be instantiated.
Modifier and Type | Field and Description |
---|---|
protected GovernorType |
governorType |
protected android.system.cpu.CPUHandler |
handler |
protected static java.lang.String |
PATH_GOVERNOR_SETTINGS |
Modifier and Type | Method and Description |
---|---|
GovernorType |
getGovernorType()
Returns the governor type ID.
|
protected java.lang.String |
getSettingPath(java.lang.String settingPath)
Returns the absolute governor setting path depending on the governor
type.
|
protected abstract java.lang.String |
getTag()
Returns the class tag used for logging purposes.
|
protected java.lang.String |
readFile(java.lang.String settingPath)
Reads and returns the value contained in the file corresponding to the
given path.
|
protected void |
writeFile(java.lang.String settingPath,
java.lang.String settingValue)
Writes the provided value in the file corresponding to the given path.
|
protected static final java.lang.String PATH_GOVERNOR_SETTINGS
protected GovernorType governorType
protected android.system.cpu.CPUHandler handler
public GovernorType getGovernorType()
protected void writeFile(java.lang.String settingPath, java.lang.String settingValue) throws CPUException
settingPath
- File path of the setting to be written.settingValue
- Value of the setting to write.CPUException
- If there is an error during the configuration
process.protected java.lang.String readFile(java.lang.String settingPath) throws CPUException
settingPath
- Path of the file to be read.CPUException
- If there is an error during the configuration
process.protected abstract java.lang.String getTag()
protected java.lang.String getSettingPath(java.lang.String settingPath)
settingPath
- Setting path to be completed with the governor type.