Switch to targeting Android 16#7111
Conversation
| } | ||
|
|
||
| private fun Activity.handleEdgeToEdge(edgeToEdge: Boolean) { | ||
| WindowCompat.enableEdgeToEdge(window) |
There was a problem hiding this comment.
For right now, edge to edge is enabled across the app for all Android versions, and then we adjust screen insets to accommodate - basically avoiding needing to deal with it in any specific Activity. If there are screens that would benefit from edge to edge, we can opt them in one at a time.
| <application> | ||
| <activity android:name="org.odk.collect.selfiecamera.CaptureSelfieActivity" | ||
| android:theme="@style/Theme.AppCompat" | ||
| android:screenOrientation="portrait"/> |
There was a problem hiding this comment.
The selfie camera screen will no longer lock to portrait. To be honest, I'm not sure why it ever did - you don't want orientation to flip if you're using the device landscape intentionally.
| flags: Int, | ||
| startId: Int | ||
| ): Int { | ||
| val notificationChannel = intent!!.getStringExtra(EXTRA_NOTIFICATION_CHANNEL)!! |
There was a problem hiding this comment.
The comment in Service#onStartCommand says:
The intent supplied to Context.startService, as given. This may be null if the service is being restarted after its process has gone away, and it had previously returned anything except START_STICKY_COMPATIBILITY.
So, shouldn't we check for null here?
There was a problem hiding this comment.
I don't believe that applies tot his Service because we return START_NOT_STICKY. That's confusing given the other comment though!
|
Tested with success Verified on Android 16 Verified cases:
|
|
Tested with success Verified on Android 10 |
Closes #6647
Why is this the best possible solution? Were any other approaches considered?
The main changes are listed in the issue and I'll leave comments on specific things that need highlighted.
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
The app is most at risk of behaviour changes from just changing the target version when running on the target OS (Android 16) so a general test with that would be a good idea.
The whole app is at risk of having display problems due to the edge to edge change, but I think that's something we can just keep any eye on for this release cycle.
Other key areas to test:
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest(or./gradlew testLab) and confirmed all checks still passDateFormatsTest