-
Notifications
You must be signed in to change notification settings - Fork 433
Initial support for Android native screenshot functionality #4105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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.
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @Override | ||
| public void screenshot(SuccessCallback<Image> callback) { | ||
| final Activity activity = (Activity) getContext(); | ||
| final AndroidScreenshotTask task = new AndroidScreenshotTask(this, activity, callback); | ||
| activity.runOnUiThread(task); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass view to AndroidScreenshotTask constructor
The new screenshot() override instantiates AndroidScreenshotTask with this. The task’s constructor requires an AndroidAsyncView, but the current class is AndroidImplementation. This code will not compile and the feature never builds. You likely intended to pass the existing surface (myView or its Android view) instead of the implementation instance.
Useful? React with 👍 / 👎.
| private void postError(final Throwable t) { | ||
| if (callback == null) return; | ||
| Display.getInstance().callSerially(new Runnable() { | ||
| @Override public void run() { | ||
| callback.onError(t); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SuccessCallback lacks onError method
AndroidScreenshotTask.postError() invokes callback.onError(t) even though the declared type is SuccessCallback<Image>, whose only method is onSucess(T). This is a compile‑time error; the class won’t build. Use the proper callback type (e.g., Callback) or remove the error invocation.
Useful? React with 👍 / 👎.
88e73a3 to
d0602af
Compare
d0602af to
012d1bc
Compare
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
|
✅ Native Android screenshot tests passed. |
eac9337 to
1edce58
Compare
1edce58 to
86e2ac0
Compare
No description provided.