Zygote
API 17 · JELLY_BEAN_MR1

Android 4.2 Jelly Bean

Photo Sphere

released
2012-11-13
runtime
Dalvik
design
Holo
status
stable

What shipped

  • Photo Sphere
  • Gestures on the keyboard
  • Multi-user tablets
  • Daydream screensavers

Platform internals

What changed underneath the APIs. These are the changes this site's architecture modules explain in depth.

  • Multi-user support on tablets
  • SELinux enforcement begins in the kernel (behind the scenes)

What developers had to deal with

  • Multi-user APIs
  • Daydream service
  • Wireless display (Miracast)

Behaviour changes

The full archive has every recorded change with its migration advice.

targetingui

Orientation and resizability restrictions are ignored on large screens

Apps targeting Android 17 cannot opt out of resizing on screens wider than 600dp: the system ignores screenOrientation, setRequestedOrientation(), resizeableActivity=false and aspect-ratio constraints.

What to doMake the app adapt to any window size and support free-form windowing. Games in the Play games category remain exempt.

targetingruntime

MessageQueue is lock-free

For apps targeting API 37, android.os.MessageQueue uses a lock-free implementation. It reduces missed frames and speeds up busy queues, but breaks apps that reflect on its private fields.

What to doRemove reflection on MessageQueue internals; use TestLooperManager's new peekWhen and poll APIs for instrumentation instead.

targetingruntime

static final fields are truly final

Apps targeting API 37 cannot modify static final fields. Reflection now throws IllegalAccessException and JNI SetStatic<Type>Field calls crash the app.

What to doStop mutating static final fields. Use a replaceable holder (such as an AtomicReference or an injectable dependency) if a value must vary in tests.

targetingnotifications

Custom notification view restrictions are tightened

Android 17 further restricts the size of custom notification views and closes a loophole that allowed bypassing the limits using URIs.

What to doReduce custom notification layouts to supported APIs and keep them small; prefer standard notification styles.

targetingsecurity

Native dynamic code loading must be read-only

The Safer Dynamic Code Loading protection that already covered DEX and JAR files now applies to native libraries for apps targeting 37: files loaded with System.load must be marked read-only.

What to doEnsure native libraries loaded dynamically are not writable, or the system throws UnsatisfiedLinkError. Package native code in the APK where possible.

targetingconnectivity

Local network access needs a permission

Apps targeting Android 17 require the ACCESS_LOCAL_NETWORK runtime permission, or a system picker, to talk to devices on the local network such as smart home hardware and casting receivers.

What to doDeclare and request ACCESS_LOCAL_NETWORK, or adopt the system device pickers for local network communication.

targetingprivacy

SMS OTP access is delayed

Standard SMS one-time-passwords are withheld for three hours from apps targeting API 37 that are not the intended recipient. WebOTP format messages are delayed for any app with a domain mismatch.

What to doMigrate to the SMS Retriever or SMS User Consent APIs instead of reading all SMS messages.

all appssecurity

Encrypted Client Hello is enabled

Android 17 enables ECH, which hides the destination hostname in the TLS handshake from observers.

What to doNo app change required, but network inspection tools and proxies may no longer see the SNI of connections.

all appsui

Password characters are hidden from physical keyboards

Android 17 stops showing the last typed character by default when entering passwords, PINs and similar secrets on a physical keyboard.

What to doNo app change required; the user can still change the display setting.

targetingui

Memory limit widget

Android 17 enforces strict app memory limits based on device RAM, terminating processes that exceed them, and exposes memory use in a system UI element.

What to doMonitor memory with ApplicationExitInfo and profiling triggers, and reduce peak allocation. Use R8 full mode to shrink your code.

all appsruntime

Generational garbage collection in ART

ART's Concurrent Mark-Compact collector gains young-generation collections, which separate short-lived objects from long-lived ones and reduce pause time.

What to doNo app change, but fewer and shorter GC pauses mean less jank. Avoid allocating in layout and draw paths to make the most of it.

all appsmedia

Background audio hardening

Android 17 tightens the rules for audio playback started from the background.

What to doStart playback from a foreground service with the mediaPlayback type, and handle being stopped.

all appsruntime

Activity recreation defaults change

Activities no longer restart for keyboard, navigation, touchscreen and colour-mode configuration changes; they receive onConfigurationChanged instead.

What to doMove logic that must run on these changes into onConfigurationChanged, or opt back in with android:recreateOnConfigChanges.

Where this sits

Release 17 of 37 API levels, by date
Headline features
4
Architecture changes
2
Developer changes
3
Sources cited
3

Kernel

This release shipped on Linux kernel versions 3.0.31. Kernel versions vary by device.