Discussion:
Android O: AConfiguration_getOrientation() no longer works in APP_CMD_CONFIG_CHANGED
Andreas Falkenhahn
2017-09-20 14:55:01 UTC
Permalink
I've recently updated my Nexus 5X to Android O and it seems that
AConfiguration_getOrientation() no longer returns the new device
orientation after receiving APP_CMD_CONFIG_CHANGED. I'm doing
something like the following:

case APP_CMD_CONFIG_CHANGED:
__android_log_print(ANDROID_LOG_INFO, "LogTag", "New orientation: %d", AConfiguration_getOrientation(app->config));

However, this never prints the new orientation but always the
orientation that was current when my app was started, i.e.
if the app was started in portrait mode, it will always
return ACONFIGURATION_ORIENTATION_PORT. If the app was started
in landscape mode, it will always return ACONFIGURATION_ORIENTATION_LAND.

On all previous Android versions it works correctly. Only on
Android O it doesn't work any more. What could be the reason
for this?
--
Best regards,
Andreas Falkenhahn mailto:***@falkenhahn.com
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/10710607250.20170920165501%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
'Dan Albert' via android-ndk
2017-09-20 19:23:49 UTC
Permalink
File a bug?
Post by Andreas Falkenhahn
I've recently updated my Nexus 5X to Android O and it seems that
AConfiguration_getOrientation() no longer returns the new device
orientation after receiving APP_CMD_CONFIG_CHANGED. I'm doing
%d", AConfiguration_getOrientation(app->config));
However, this never prints the new orientation but always the
orientation that was current when my app was started, i.e.
if the app was started in portrait mode, it will always
return ACONFIGURATION_ORIENTATION_PORT. If the app was started
in landscape mode, it will always return ACONFIGURATION_ORIENTATION_LAND.
On all previous Android versions it works correctly. Only on
Android O it doesn't work any more. What could be the reason
for this?
--
Best regards,
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/
msgid/android-ndk/10710607250.20170920165501%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhvTLjMtw7_ymXk%3Dq_ah3W%3DymHsxdA-PkUO%3DAO1Z_7CicA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Andreas Falkenhahn
2017-09-20 19:38:48 UTC
Permalink
Okay, filed an issue:
https://issuetracker.google.com/issues/66196606

But it seems hard to imagine that this should be really broken in
Android O because I think it's one of the essential APIs in the Android
NDK and if it were really broken in Android O other people would have
complained as well.

So if there is anyone for whom AConfiguration_getOrientation() is
still working after APP_CMD_CONFIG_CHANGED on Android O please step
forward and let me know.

Until then, I'll consider it broken for the moment.
Post by 'Dan Albert' via android-ndk
File a bug?
I've recently updated my Nexus 5X to Android O and it seems that
AConfiguration_getOrientation() no longer returns the new device
orientation after receiving APP_CMD_CONFIG_CHANGED. I'm doing
__android_log_print(ANDROID_LOG_INFO, "LogTag", "New
orientation: %d", AConfiguration_getOrientation(app->config));
However, this never prints the new orientation but always the
orientation that was current when my app was started, i.e.
if the app was started in portrait mode, it will always
return ACONFIGURATION_ORIENTATION_PORT. If the app was started
in landscape mode, it will always return ACONFIGURATION_ORIENTATION_LAND.
On all previous Android versions it works correctly. Only on
Android O it doesn't work any more. What could be the reason
for this?
--
Best regards,
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/10710607250.20170920165501%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
--
Best regards,
Andreas Falkenhahn mailto:***@falkenhahn.com
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1639597326.20170920213848%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
Andreas Falkenhahn
2017-12-08 20:57:34 UTC
Permalink
By the way, could someone enlighten me concerning the comments for this issue on the bugtracker? On Sept 20th I filed an issue about this bug here: https://issuetracker.google.com/issues/66196606

The comments so far were:
1) kkam: can you move this to the frameworks componenet?
2) Hi Dave, please triage for Framework team. Thx, Kathy
3) I really want to join your team
4) unassigning to get picked up by the triage queue

So what does this discussion tell me? Has this bug been accepted and will there be a fix for it? I'm a little worried because people are unassigning from the issue but then I don't know what a triage queue is...
Post by 'Dan Albert' via android-ndk
File a bug?
I've recently updated my Nexus 5X to Android O and it seems that
AConfiguration_getOrientation() no longer returns the new device
orientation after receiving APP_CMD_CONFIG_CHANGED. I'm doing
__android_log_print(ANDROID_LOG_INFO, "LogTag", "New
orientation: %d", AConfiguration_getOrientation(app->config));
However, this never prints the new orientation but always the
orientation that was current when my app was started, i.e.
if the app was started in portrait mode, it will always
return ACONFIGURATION_ORIENTATION_PORT. If the app was started
in landscape mode, it will always return ACONFIGURATION_ORIENTATION_LAND.
On all previous Android versions it works correctly. Only on
Android O it doesn't work any more. What could be the reason
for this?
--
Best regards,
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/10710607250.20170920165501%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
--
Best regards,
Andreas Falkenhahn mailto:***@falkenhahn.com
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1409543331.20171208215734%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
'Dan Albert' via android-ndk
2017-12-08 21:00:08 UTC
Permalink
Unassigned bugs are supposed to show up in a triage queue, but I guess that
didn't happen. I'll follow up on it and see what happened.
Post by Andreas Falkenhahn
By the way, could someone enlighten me concerning the comments for this
https://issuetracker.google.com/issues/66196606
1) kkam: can you move this to the frameworks componenet?
2) Hi Dave, please triage for Framework team. Thx, Kathy
3) I really want to join your team
4) unassigning to get picked up by the triage queue
So what does this discussion tell me? Has this bug been accepted and will
there be a fix for it? I'm a little worried because people are unassigning
from the issue but then I don't know what a triage queue is...
Post by 'Dan Albert' via android-ndk
File a bug?
I've recently updated my Nexus 5X to Android O and it seems that
AConfiguration_getOrientation() no longer returns the new device
orientation after receiving APP_CMD_CONFIG_CHANGED. I'm doing
__android_log_print(ANDROID_LOG_INFO, "LogTag", "New
orientation: %d", AConfiguration_getOrientation(app->config));
However, this never prints the new orientation but always the
orientation that was current when my app was started, i.e.
if the app was started in portrait mode, it will always
return ACONFIGURATION_ORIENTATION_PORT. If the app was started
in landscape mode, it will always return ACONFIGURATION_ORIENTATION_
LAND.
Post by 'Dan Albert' via android-ndk
On all previous Android versions it works correctly. Only on
Android O it doesn't work any more. What could be the reason
for this?
--
Best regards,
--
You received this message because you are subscribed to the Google
Groups "android-ndk" group.
Post by 'Dan Albert' via android-ndk
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/10710607250.
20170920165501%40falkenhahn.com.
Post by 'Dan Albert' via android-ndk
For more options, visit https://groups.google.com/d/optout.
--
Best regards,
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/
msgid/android-ndk/1409543331.20171208215734%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhu0_n4LZnb__RkoZ_0gFbvky8rpN2mhFcGo%3DMR5jGTUfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Andreas Falkenhahn
2017-12-12 16:04:53 UTC
Permalink
Post by 'Dan Albert' via android-ndk
Unassigned bugs are supposed to show up in a triage queue, but I
guess that didn't happen. I'll follow up on it and see what happened.
So any news on this? I'd really like to know if there will be a fix for this or not because it's really critical for my app.
--
Best regards,
Andreas Falkenhahn mailto:***@falkenhahn.com
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1386596815.20171212170453%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
'Dan Albert' via android-ndk
2017-12-14 20:32:29 UTC
Permalink
Sorry again for the delay. Triage snafu meant your bug ended up way at the
bottom of the list for some reason. I added some people myself a couple
days ago and that got it into the right hands it seems.
Post by Andreas Falkenhahn
Post by 'Dan Albert' via android-ndk
Unassigned bugs are supposed to show up in a triage queue, but I
guess that didn't happen. I'll follow up on it and see what happened.
So any news on this? I'd really like to know if there will be a fix for
this or not because it's really critical for my app.
--
Best regards,
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/
msgid/android-ndk/1386596815.20171212170453%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhvf8rXnf0Or4eAnt%2B-sis%2B%2B50OMoTa%3DWHrVkcK1W2Ui3A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Andreas Falkenhahn
2018-01-27 16:15:30 UTC
Permalink
Any news on this? I've now implemented a workaround which calls into the
following Java code:

public int getCurrentOrientation() {
return getResources().getConfiguration().orientation;
}

This solves the issue for me but of course it would be much nicer
if AConfiguration_getOrientation() could be used instead...
Post by 'Dan Albert' via android-ndk
Sorry again for the delay. Triage snafu meant your bug ended up way
at the bottom of the list for some reason. I added some people
myself a couple days ago and that got it into the right hands it seems.
Post by 'Dan Albert' via android-ndk
Unassigned bugs are supposed to show up in a triage queue, but I
guess that didn't happen. I'll follow up on it and see what happened.
So any news on this? I'd really like to know if there will be a
fix for this or not because it's really critical for my app.
--
Best regards,
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/1386596815.20171212170453%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
--
Best regards,
Andreas Falkenhahn mailto:***@falkenhahn.com
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/1344363215.20180127171530%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
'Dan Albert' via android-ndk
2018-01-31 19:42:47 UTC
Permalink
I've pinged the bug again. Unfortunately that's about the limit of my
powers in that part of Android :(
Post by Andreas Falkenhahn
Any news on this? I've now implemented a workaround which calls into the
public int getCurrentOrientation() {
return getResources().getConfiguration().orientation;
}
This solves the issue for me but of course it would be much nicer
if AConfiguration_getOrientation() could be used instead...
Post by 'Dan Albert' via android-ndk
Sorry again for the delay. Triage snafu meant your bug ended up way
at the bottom of the list for some reason. I added some people
myself a couple days ago and that got it into the right hands it seems.
Post by 'Dan Albert' via android-ndk
Unassigned bugs are supposed to show up in a triage queue, but I
guess that didn't happen. I'll follow up on it and see what happened.
So any news on this? I'd really like to know if there will be a
fix for this or not because it's really critical for my app.
--
Best regards,
--
You received this message because you are subscribed to the Google
Groups "android-ndk" group.
Post by 'Dan Albert' via android-ndk
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/1386596815.
20171212170453%40falkenhahn.com.
Post by 'Dan Albert' via android-ndk
For more options, visit https://groups.google.com/d/optout.
--
Best regards,
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/
msgid/android-ndk/1344363215.20180127171530%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhv8WTByj6h3A%2B-RU-j4dS%2BiJvmpC46f8nyyoqSNU9vP6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
'Dan Albert' via android-ndk
2018-01-31 19:46:22 UTC
Permalink
Bumped the priority back up too. Not sure why it was lowered.
Post by 'Dan Albert' via android-ndk
I've pinged the bug again. Unfortunately that's about the limit of my
powers in that part of Android :(
On Sat, Jan 27, 2018 at 8:15 AM, Andreas Falkenhahn <
Post by Andreas Falkenhahn
Any news on this? I've now implemented a workaround which calls into the
public int getCurrentOrientation() {
return getResources().getConfiguration().orientation;
}
This solves the issue for me but of course it would be much nicer
if AConfiguration_getOrientation() could be used instead...
Post by 'Dan Albert' via android-ndk
Sorry again for the delay. Triage snafu meant your bug ended up way
at the bottom of the list for some reason. I added some people
myself a couple days ago and that got it into the right hands it seems.
Post by 'Dan Albert' via android-ndk
Unassigned bugs are supposed to show up in a triage queue, but I
guess that didn't happen. I'll follow up on it and see what happened.
So any news on this? I'd really like to know if there will be a
fix for this or not because it's really critical for my app.
--
Best regards,
--
You received this message because you are subscribed to the Google
Groups "android-ndk" group.
Post by 'Dan Albert' via android-ndk
To unsubscribe from this group and stop receiving emails from it,
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/1386596815.201
71212170453%40falkenhahn.com.
Post by 'Dan Albert' via android-ndk
For more options, visit https://groups.google.com/d/optout.
--
Best regards,
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/ms
gid/android-ndk/1344363215.20180127171530%40falkenhahn.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhtNuaqrhiM-nQ37Aeoa3X5e%2BprnoVnix1337DO6-u4w%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...