Skip to content

Commit 295bf0b

Browse files
authored
Support Android TV in device info retrieval (#6604)
* Support Android TV in device info retrieval * Simplify platform check for Android devices * Add changelog entry
1 parent ff513c9 commit 295bf0b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
* Fix `flet build apk` failing at `mergeDebugNativeLibs` with `N files found with path 'lib/<abi>/libc++_shared.so'` when an app combines `serious_python_android` with another Flutter plugin that also bundles the NDK C++ runtime ([#6570](https://github.com/flet-dev/flet/issues/6570), [#6571](https://github.com/flet-dev/flet/pull/6571)) by @ndonkoHenri.
4545
* Specify `handler` signatures in `subscribe` and `subscribe_topic` methods of `PubSubClient` for better type checking ([#6549](https://github.com/flet-dev/flet/pull/6564)) by @Iaw4tch
4646
* Fix `FilePicker.pick_files()` on web for slow network shares or slow machines: pass `cancel_upload_on_window_blur=False` to prevent valid file selections from being reported as cancelled when the browser window loses focus during file picking ([#771](https://github.com/flet-dev/flet/issues/771), [#6573](https://github.com/flet-dev/flet/pull/6573)) by @ndonkoHenri.
47+
* Support `PagePlatform.ANDROID_TV` in `Page.get_device_info()` retrieval ([#6604](https://github.com/flet-dev/flet/pull/6604)) by @bl1nch.
4748

4849
### Documentation
4950

sdk/python/packages/flet/src/flet/controls/page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ async def get_device_info(self) -> Optional[DeviceInfo]:
13811381

13821382
if self.web:
13831383
return from_dict(WebDeviceInfo, info)
1384-
elif self.platform == PagePlatform.ANDROID:
1384+
elif self.platform in [PagePlatform.ANDROID, PagePlatform.ANDROID_TV]:
13851385
return from_dict(AndroidDeviceInfo, info)
13861386
elif self.platform == PagePlatform.IOS:
13871387
return from_dict(IosDeviceInfo, info)

0 commit comments

Comments
 (0)