Retire support for Android 4
We'll eventually need to drop support for Android 4 in order to be able to upgrade OkHttp (#2156 (closed)). I don't think we should just raise our minSdkVersion and leave Android 4 users running an out-of-date version of Briar indefinitely. Instead, we should set an expiry date and warn users that the app will stop working at that date, like we do with debug builds.
We should define a retirement period that ends at the expiry date, and release the following changes before the start of the retirement period, allowing enough time for most users to upgrade before the period starts:
- At the start of the retirement period, show a warning on Android 4 that Briar will stop working at the expiry date
- Refuse to start the app on Android 4 beyond the expiry date
The changes can be based on the existing code for expiring debug builds.
When the retirement period ends we can raise our min API level to 21 and upgrade OkHttp (and perhaps the emoji library, which also requires API 21 for the latest version, unless we've already resolved #2212 by switching to AppCompat for emoji).
If we release the changes above by the end of 2021, allow six months for users to upgrade before the retirement period starts, and allow another six months for the retirement period, then we can drop support for Android 4 at the end of 2022. (We can do everything faster than that if necessary, but I don't see any urgency.)
Update:
With !1577 (merged) and !1578 (merged) merged to master, the warning will show up on Android 4 on 2022-07-31. Briar will refuse to start on Android 4 on 2023-01-31.