@@ -134,17 +134,15 @@ def _cmd_audio_state(self):
134134 if constants .CUSTOM_AUDIO_STATE in self ._custom_commands :
135135 return self ._custom_commands [constants .CUSTOM_AUDIO_STATE ]
136136
137- # Is this an Android 11 device?
138- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "11" :
139- return constants .CMD_AUDIO_STATE11
140-
141- # Is this an Android 12 device?
142- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "12" :
137+ # Is this an Android 11-14 device?
138+ if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) in [
139+ "11" ,
140+ "12" ,
141+ "13" ,
142+ "14" ,
143+ ]:
143144 return constants .CMD_AUDIO_STATE11
144145
145- # Is this an Android 13 device?
146- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "13" :
147- return constants .CMD_AUDIO_STATE11
148146 return constants .CMD_AUDIO_STATE
149147
150148 def _cmd_current_app (self ):
@@ -183,8 +181,11 @@ def _cmd_current_app(self):
183181 if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "12" :
184182 return constants .CMD_CURRENT_APP12
185183
186- # Is this an Android 13 device?
187- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "13" :
184+ # Is this an Android 13/14 device?
185+ if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) in [
186+ "13" ,
187+ "14" ,
188+ ]:
188189 return constants .CMD_CURRENT_APP13
189190
190191 return constants .CMD_CURRENT_APP
@@ -225,8 +226,11 @@ def _cmd_current_app_media_session_state(self):
225226 if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "12" :
226227 return constants .CMD_CURRENT_APP_MEDIA_SESSION_STATE12
227228
228- # Is this an Android 13 device?
229- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "13" :
229+ # Is this an Android 13/14 device?
230+ if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) in [
231+ "13" ,
232+ "14" ,
233+ ]:
230234 return constants .CMD_CURRENT_APP_MEDIA_SESSION_STATE13
231235
232236 return constants .CMD_CURRENT_APP_MEDIA_SESSION_STATE
@@ -243,16 +247,13 @@ def _cmd_hdmi_input(self):
243247 if constants .CUSTOM_HDMI_INPUT in self ._custom_commands :
244248 return self ._custom_commands [constants .CUSTOM_HDMI_INPUT ]
245249
246- # Is this an Android 11 device?
247- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "11" :
248- return constants .CMD_HDMI_INPUT11
249-
250- # Is this an Android 12 device?
251- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "12" :
252- return constants .CMD_HDMI_INPUT11
253-
254- # Is this an Android 13 device?
255- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "13" :
250+ # Is this an Android 11-14 device?
251+ if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) in [
252+ "11" ,
253+ "12" ,
254+ "13" ,
255+ "14" ,
256+ ]:
256257 return constants .CMD_HDMI_INPUT11
257258
258259 return constants .CMD_HDMI_INPUT
@@ -271,16 +272,13 @@ def _cmd_volume_set(self, new_volume):
271272 The device-specific ADB shell command used to set volume
272273
273274 """
274- # Is this an Android 11 device?
275- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "11" :
276- return constants .CMD_VOLUME_SET_COMMAND11 .format (new_volume )
277-
278- # Is this an Android 12 device?
279- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "12" :
280- return constants .CMD_VOLUME_SET_COMMAND11 .format (new_volume )
281-
282- # Is this an Android 13 device?
283- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "13" :
275+ # Is this an Android 11-14 device?
276+ if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) in [
277+ "11" ,
278+ "12" ,
279+ "13" ,
280+ "14" ,
281+ ]:
284282 return constants .CMD_VOLUME_SET_COMMAND11 .format (new_volume )
285283
286284 return constants .CMD_VOLUME_SET_COMMAND .format (new_volume )
@@ -321,8 +319,11 @@ def _cmd_launch_app(self, app):
321319 if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "12" :
322320 return constants .CMD_LAUNCH_APP12 .format (app )
323321
324- # Is this an Android 13 device?
325- if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) == "13" :
322+ # Is this an Android 13-14 device?
323+ if self .DEVICE_ENUM == constants .DeviceEnum .ANDROIDTV and self .device_properties .get ("sw_version" , "" ) in [
324+ "13" ,
325+ "14" ,
326+ ]:
326327 return constants .CMD_LAUNCH_APP13 .format (app )
327328
328329 return constants .CMD_LAUNCH_APP .format (app )
0 commit comments