Skip to content

Commit

Permalink
Update list system settings schema
Browse files Browse the repository at this point in the history
System settings support enable / disable should also return all valid values like other settings. Change boolean to array and the array contains boolean value (true for enable and false for disable).

Can set array to empty if the settings don't support to be set.
  • Loading branch information
zhao-gang committed Jun 7, 2024
1 parent 5adf476 commit 97c87cd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
25 changes: 20 additions & 5 deletions schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,18 @@
"type": "array",
"items": output_resolution_schema
},
"memc": {"type": "boolean"},
"cec": {"type": "boolean"},
"lowLatencyMode": {"type": "boolean"},
"memc": {
"type": "array",
"items": {"type": "boolean"}
},
"cec": {
"type": "array",
"items": {"type": "boolean"}
},
"lowLatencyMode": {
"type": "array",
"items": {"type": "boolean"}
},
"matchContentFrameRate": {
"type": "array",
"items": {"type": "string"}
Expand Down Expand Up @@ -265,8 +274,14 @@
},
"required": ["min", "max"]
},
"mute": {"type": "boolean"},
"textToSpeech": {"type": "boolean"}
"mute": {
"type": "array",
"items": {"type": "boolean"}
},
"textToSpeech": {
"type": "array",
"items": {"type": "boolean"}
},
},
"required": ["status", "language", "outputResolution", "memc", "cec", "lowLatencyMode",
"matchContentFrameRate", "hdrOutputMode", "pictureMode", "audioOutputMode",
Expand Down
3 changes: 0 additions & 3 deletions util/enforcement_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ def is_setting_supported(self, setting):

if isinstance(self.supported_settings.get(setting), List) and len(self.supported_settings.get(setting)) == 0:
return True

if isinstance(self.supported_settings.get(setting), bool) and self.supported_settings.get(setting):
return True

def add_supported_application(self, application):
self.supported_applications.add(application)
Expand Down

0 comments on commit 97c87cd

Please sign in to comment.