This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix Android T deprecated WindowManager INCORRECT_CONTEXT_USAGE #28774
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
39a4059
Fix Android T deprecated WindowManager getter call
GaryQian 433a7f5
Imports
GaryQian b5a86a8
VsyncWaiter takes Display instead of WindowManager
GaryQian 2428099
Version gate and take fps directly
GaryQian 5bd268f
Loader test
GaryQian 7f4ebd5
Test sdk differences
GaryQian baea4ca
Rename tests
GaryQian 49aee59
Address comments
GaryQian 1fc56c1
Verify getSystemService is not ccalled
GaryQian 8cea69e
Missing import
GaryQian 03f137e
Imports
GaryQian 38af333
No mock static methods
GaryQian 3115d91
Fix tests
GaryQian ae196c1
Tests
GaryQian d41270f
Float literal
GaryQian 99c4a19
Cleanup
GaryQian 8b9ccd1
Cleanup
GaryQian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
did it mean
TIRAMISU? https://source.corp.google.com/android/frameworks/base/core/java/android/os/Build.java;l=1137;bpv=0;bpt=1There 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.
This check is specifically making sure the new code is used only for API 23+ which is when the display API was added. I guess it could be gated to only apply to T and above, I have no strong opinions either way. End goal is just to obtain the FPS float.
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.
ah ok, that's fine too then
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.
Gating at 23 is more likely to have better test coverage as most of our testing is with API 30 and below (as of now), making this safer in the long run. I'll leave it as is.
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.
The display API was actually added in 17. I'd like to change this, is there any good reason not to?
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.
Or at least, all of the display code we're using :)
Uh oh!
There was an error while loading. Please reload this page.
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.
I'm changing this in #29800 - please add comments if it needs to be at 23 for some reason I'm missing.
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.
That should hav ebeen #29800....
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.
I see now - getSystemService was using the API 23 call instead of the one compatible with API 17. Fixing that upstream in my PR.