Skip to content

[device_info_plus] Add duid getter - #1106

Merged
seungsoo47 merged 4 commits into
flutter-tizen:mainfrom
seungsoo47:device_info_plus-duid
Aug 27, 2026
Merged

[device_info_plus] Add duid getter#1106
seungsoo47 merged 4 commits into
flutter-tizen:mainfrom
seungsoo47:device_info_plus-duid

Conversation

@seungsoo47

@seungsoo47 seungsoo47 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Add DeviceInfoPluginTizen.duid to read the device's DUID via vconf. This is a Tizen-specific API with no upstream counterpart in device_info_plus.

Add DeviceInfoPluginTizen.duid to read the device's DUID via vconf.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a569b092b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/device_info_plus/lib/device_info_plus_tizen.dart
Fixes a PR review comment: caching the resolved value meant a null
DUID never got cached, so every call re-triggered the native lookup.
Comment thread packages/device_info_plus/tizen/src/device_info_plus_tizen_plugin.cc Outdated
Comment thread packages/device_info_plus/tizen/src/device_info_plus_tizen_plugin.cc Outdated
Comment thread packages/device_info_plus/example/integration_test/device_info_plus_test.dart Outdated
Comment thread packages/device_info_plus/lib/device_info_plus_tizen.dart Outdated
Comment thread packages/device_info_plus/README.md Outdated
GetDuid() now returns an empty string, not null, when the device isn't
running the TV profile, since that is a permanent property of the device
rather than a failure. null is reserved for a genuine vconf/dlopen read
failure, which may be transient and worth retrying.

This lets the duid getter cache with the same simple `??=` pattern as
tizenInfo: a confirmed-empty (non-TV) result is now cached permanently,
while a real failure keeps retrying on the next access instead of being
stuck as a cached null forever.

Also drops a leftover debug log line and updates the README table and
integration test to match.
Comment thread packages/device_info_plus/tizen/src/device_info_plus_tizen_plugin.cc Outdated
Comment thread packages/device_info_plus/tizen/src/device_info_plus_tizen_plugin.cc Outdated
- Remove a leftover debug log line in GetDuid() that should have been
  dropped in the previous commit.
- Switch the TV-profile check from a runtime system_info call to the
  TV_PROFILE compile-time macro, matching the convention already used
  by camera, video_player, webview_flutter, webview_flutter_lwe, and
  flutter_inappwebview. flutter-tizen defines this macro from the
  target device's actual profile for both build and drive/run, so
  behavior is unchanged.
- Add explanatory comments to the duid caching test mirroring the
  existing tizenInfo test, clarifying that a new plugin instance
  triggers a fresh native call rather than reusing the cache.
@seungsoo47
seungsoo47 merged commit bf743c5 into flutter-tizen:main Aug 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants