[FEATURE REQUEST] Bump SDK Target to 37 (Android 17)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by reading the Android manifest, build.gradle, network_security_config.xml, AccountAuthenticator.java, NotificationUtils.kt, DownloadFileWorker.kt, and StorageMigrationActivity.runIfNeeded(). Search for setContentCaptureEnabled and audit manifest orientation and resizability declarations; verify API 37 guidance and library compatibility. Done means addressing the listed permission, certificate transparency, BAL, cleanup, and target SDK changes, then completing the large-screen audit and Android 17 emulator smoke tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Current targetSdk is 36. Android 17 (API 37) introduces several mandatory behavior changes for apps that explicitly target it. This issue tracks all the work needed before the bump is safe to ship.
Breaking changes
1. Local Network Permission (ACCESS_LOCAL_NETWORK)
On API 37 this becomes a runtime permission. The app connects to WebDAV servers on local networks (and may perform OIDC discovery on LAN), so this permission is required for core functionality.
Required actions:
- Declare
android.permission.ACCESS_LOCAL_NETWORKinAndroidManifest.xml - Add a runtime permission request flow before opening any local network connection (WebDAV, OIDC, etc.)
- Submit a Local Network Access declaration in the Play Console (mandatory for apps targeting API 37+)
Reference: Local network permission
2. Certificate Transparency enabled by default
Certificate Transparency is optional on API 36. On API 37 it is on by default for all TLS connections. This directly affects self-hosted servers whose certificates may not be logged in a public log.
Required actions:
- Decide on a CT strategy:
-
- Global disable: That'd keep the current behaviour
-
- Per-domain disable: the number of domains is not scoped. Not manageable ❌
-
- User-facing warning for non-compliant server certs: adding another warning that does not add extra security, since the current one already warns.
-
For option 1: update network_security_config.xml with the appropriate <certificateTransparency> element
<base-config cleartextTrafficPermitted="false">
<certificateTransparency enabled="false" />
</base-config>
Reference: Certificate Transparency
3. AccountAuthenticator — KEY_INTENT BAL hardening
addAccount, confirmCredentials, getAuthToken, and prepareBundleToAccessLoginActivity in AccountAuthenticator.java return intents via AccountManager.KEY_INTENT. On API 37 the BAL (Background Activity Launch) restrictions are extended to IntentSender; when AccountManager launches these intents from the system process, the app may lose the implicit BAL privilege it currently relies on.
Required actions:
- Attach
ActivityOptionswithsetPendingIntentCreatorBackgroundActivityStartMode (MODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE)to theKEY_INTENTbundles (or the applicable API 37 equivalent once guidance is published) - Fix
prepareBundleToAccessLoginActivity()(~line 458): this site is missingFLAG_ACTIVITY_NEW_TASKthat all other three KEY_INTENT sites already set, this is a latent bug independent of API 37
Cleanup: should go in the same PR as the bump
4. Remove deprecated FLAG_FROM_BACKGROUND
FLAG_FROM_BACKGROUND is a deprecated Intent flag that is silently ignored on API 37. It appears in:
NotificationUtils.kt—composePendingIntentToRefreshCredentials()(~line 93) andnotifyConflict()(~line 164)DownloadFileWorker.kt—composePendingIntentToRefreshCredentials()(~line 295)
All usages are in notification content intents (user-triggered on tap), so there is no runtime risk. Remove the flag from all three sites.
5. StorageMigrationActivity.runIfNeeded(Context), add Activity guard
runIfNeeded(context: Context) at ~line 87 calls context.startActivity() without verifying the context is an Activity. All current call sites in MainApp.kt` (line ~131) pass an Activity, so it is safe today. On API 37 a non-Activity context would be a BAL violation.
Add a context is Activity (or context is AppCompatActivity) guard matching the pattern already used in WhatsNewActivity and ReleaseNotesActivity.
Verify — likely fine, but confirm during the bump
6. Large-screen orientation / resizability
The optional from Android 16's large-screen policy (orientation and resizability constraints ignored on sw≥600dp) is removed in API 37. Any android:screenOrientation or android:resizeableActivity="false" declarations will be silently overridden on tablets and foldables.
- Audit the manifest for any orientation/resizability constraints
- Run manual testing on a large-screen emulator (sw≥600dp) before
shipping
7. ContentCaptureManager.setContentCaptureEnabled(false) deprecated
Calling this on API 37 has no effect. If any screen uses it to prevent system AI from reading sensitive file content, migrate to window.setFlags(FLAG_SECURE, FLAG_SECURE). Search the codebase for setContentCaptureEnabled before bumping.
8. Static final field mutation via reflection
On API 37 any attempt to modify a static final field via reflection throws IllegalAccessException. App code is unlikely to do this, but third-party libraries (Moshi, DAV4Android, OkHttp) should be verified against their changelogs or known issues lists for API 37 compatibility before the bump.
Not applicable (confirmed by audit)
| Item | Reason |
|---|---|
| Manage Contacts permission | Not used |
| Location permission | Not used |
MANAGE_EXTERNAL_STORAGE |
Not used |
| Accessibility API | Not declared |
| Call Log / SMS permissions | Not used |
| AppFunctions API | Not used |
| Background audio hardening | Not an audio app |
| AppWidget memory limits | No home screen widget |
| BluetoothSocket changes | No Bluetooth usage |
| OTP / SMS protection | No SMS usage |
Checklist
- Declare and request
ACCESS_LOCAL_NETWORKat runtime - Submit Play Console local network declaration
- Define Certificate Transparency strategy and update
network_security_config.xml - Fix
AccountAuthenticatorKEY_INTENT bundles for API 37 BAL requirements - Fix
prepareBundleToAccessLoginActivity, add missingFLAG_ACTIVITY_NEW_TASK - Remove
FLAG_FROM_BACKGROUNDfromNotificationUtils.ktandDownloadFileWorker.kt - Add Activity guard to
StorageMigrationActivity.runIfNeeded() - Audit and test large-screen UI (sw≥600dp)
- Grep for
setContentCaptureEnabledand migrate if found - Verify third-party library compatibility with API 37
- Bump
targetSdkVersionto 37 inbuild.gradle - Manual smoke test on Android 17 emulator (local WebDAV, auth flow, file upload/download)
TASKS
- Research (if needed)
- Create branch feature/feature_name
- Development tasks
- Implement whatever
- ...
- Implement unit tests (if needed)
- Code review and apply changes requested
- Design test plan
- QA
- Merge branch feature/feature_name into master
- Ngôn ngữ chính
- Kotlin
- Star
- 4.2k
- Fork
- 3.1k
- Merge trung bình
- 3 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của owncloud/android
-
Camera Uploads Contributions are welcome Technical
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
owncloud/android#5040 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
KW-related Type:bug UI / UX
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Lint reports an errorĐang mởType:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
owncloud/android#4485 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Contributions are welcome p3-medium Type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
owncloud/android#4300 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
owncloud/android#3720 · 8 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của owncloud/android
Issue tương tự
-
👀 example 📱 iOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
hyochan/react-native-nitro-sound#871 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
android:plan main:plan packages:learn
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
a:bug in:configuration-cache re:windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Needs Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ankidroid/Anki-Android#23453 ·
Maintainer thường phản hồi trong vòng 1 ngày