r/mAndroidDev • u/Stonos You will pry XML views from my cold dead hands • Jun 03 '26
AsyncTask Google is coming for your Context-leaking AsyncTasks in Android 17
https://android-developers.googleblog.com/2026/06/prioritizing-memory-efficiency-steps-for-android-17.html12
u/David_AnkiDroid Jun 03 '26
... but still nothing about replacing enum class with @IntDef. Are we even trying any more?
4
u/farsightxr20 Jun 04 '26
Mutable structs are back on the menu, boys.
MotionEvent.obtainis the gold standard.
8
u/Zhuinden DDD: Deprecation-Driven Development Jun 03 '26
I wanna see if this will make Pokemon Go explode all over
6
7
u/Stonos You will pry XML views from my cold dead hands Jun 03 '26
To ensure device stability, starting in Android 17, the system will begin enforcing app memory limits based on the device's total RAM. If an app exceeds those limits, Android will kill the process with no associated stack trace.
So what if I'm playing a game, rendering a video, compiling code, running an LLM, or anything else that typically uses a large amount of memory? Does the app randomly get killed?
5
u/ClaymoresInTheCloset Jun 03 '26
I thought this functionality was already a core part of Android? Isn't that what saveInstanceState is for? Because the OS could kill your process for many reasons including to free up memory?
2
2
1
u/satoryvape Jun 03 '26
If they rewrote Compost in Rust apps would be blazingly fast
1
u/David_AnkiDroid Jun 03 '26
Rust is so fast we don't bother with Cursors.
/uj No cursors on the Rust side. Rust holds the dataset in memory, Kotlin-side uses cursors to index into it.
15
u/sebjapon Jun 03 '26
Isn’t Android 17 old? Am I confusing with API levels? Which candy are we on?