Repository navigation
Conversation
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
There was a problem hiding this comment.
🔇 Additional comments: 1
app/src/main/java/io/netbird/client/MainActivity.java-215-215: 1
215-215: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Honor the user's Auto-rotate setting.
SCREEN_ORIENTATION_SENSOR_PORTRAITuses the sensor even when the user has locked rotation, so the app can rotate to 180° while Auto-rotate is off. If reverse portrait should be available only when the user permits sensor rotation, useSCREEN_ORIENTATION_USER_PORTRAIT, which follows the user's preference. (developer.android.com)
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
d2eac824-b241-45a5-99b4-d251a119f3b4
📒 Files selected for processing: 1
app/src/main/java/io/netbird/client/MainActivity.java
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Hello folks. This is my first contribution, just let me know if there are any issues!
Overview
I noticed that reverse portrait rotation was not supported for smartphone sized devices. With auto-rotate on, the display just snaps back to normal portrait. I hold my phone in all sorts of angles day to day, and I suspect other accessibility use cases would also benefit, so this PR enables it.
Change
Updated MainActivity:
SCREEN_ORIENTATION_PORTRAIT->SCREEN_ORIENTATION_SENSOR_PORTRAITTesting
Tested that rotation 0 and 180 correctly rotate the display. Horizontal rotations 90 and 270 are not impacted as this will required a new UI layout to fit each element.
AI Disclosure
Development and testing of this PR were assistant by a local AI coding assistant.
Summary by CodeRabbit