-
Notifications
You must be signed in to change notification settings - Fork 1
Fix double-free when removing lock popup #6
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
base: button-unlock
Are you sure you want to change the base?
Conversation
When the device is woken through pressing the button everything is the same. But when woken through other means like single-tap or raise-to-wake, then the screen is locked (and showing a lock screen on touch input) until the button is pressed. Only exception is when the alarm wakes the screen, then touch input is still valid for the user to be able to press the red "stop alarm" button. Co-authored-by: NeroBurner <pyro4hell@gmail.com>
d00a8c1 to
f0d7298
Compare
| // This is mainly to fix an issue with receiving two notifications at the same time | ||
| // and shouldn't happen otherwise. | ||
| if (app != currentApp) { | ||
| popupMessage.SetHidden(true); |
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.
please add an additional comment describing why we do SetHidden here, otherwise the comment above doesn't fully represent the code below anymore. Other than that big THANKS for the fix!
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've added a comment 👍
It fixes a potential double-free when removing lock popup
f0d7298 to
ea52fb7
Compare
NeroBurner
left a comment
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.
LGTM
|
merged into button-unlock Thanks |
131f294 to
10344e5
Compare
f2be229 to
f1e5dbc
Compare
f1e5dbc to
a507abc
Compare
When the popup is created on the notifications view, and the user return to the watch face; The popup is deleted and freed, but
popupwasn't not set tonullptr, andisHiddento false so we ended up deleting again the popup. The best way to handle that is to always remove the popup when changing app. If the user click again, a new popup will show