-
Notifications
You must be signed in to change notification settings - Fork 86
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
Nitpick - first install wrong notch resolution #463
Comments
Just to be clear: this does not affect in app updates when storage permissions are already granted. And it doesn't affect 1st time installation because the app is killed when we forward users to storage settings. Am I right or I'm missing something? |
I can definitely reproduce something like this when doing uninstalls into adb install sessions when debugging, and that involves setting the storage permission each time. So, the first § probably holds true, but not the second? (I imagine because we're killed way too early for any of this to be relevant?). |
Sometimes affect, others not. I can reproduce easily. requestSpecialPermission finish() is executed:
When I reproduce the problem and open again:
When the problem doesn't occur
|
@hugleo: IIRC you know how to fix it (it was part of another PR). Is that right? Feel free to submit a PR :) |
Except that didn't work -.-. I can reproduce now in a way that even using finishAffinity() will fail. |
As a starting point, it seems like windowManager.defaultDisplay.cutout as? DisplayCutout can get insets measurements from any place, not needing to be inside onAttachedToWindow. This should fix the nitpick for a big percentage of devices:
Sometimes, we don't see the three circles in the updating screen but this is another nitpick :D |
Issue: koreader#463
The thing on first install is that framebuffer resolution is getted before the onAttachedToWindow is called (we don't have a windows yet, we have just the permission dialog) so we don't get the notch inset to subtract from resolution.
And when we resume then the lib is already loaded and we stuck with the wrong framebuffer resolution because the function "initializing for device spes_global" is not executed again.
Details bellow:
When we first install Koreader we got the asking permission message
If we go to the android floating apps we see koreader and we enter Koreader from there:
The bottom area is cutted because the wrong framebuffer resolution
We have to close and reopen to get right:
Log from first install:
Log from subsquents runs after close:
The text was updated successfully, but these errors were encountered: