Accueil / Apps & Logiciels / Android 17 QPR2 is live in AOSP

Android 17 QPR2 is live in AOSP

We pushed Android 17 QPR2 (SDK 37.2) to the Android Open Source Project (AOSP) as part of our ongoing commitment to open source. Transparent access to platform code empowers developers, device makers, and the broader Android community to inspect how the OS works, debug edge cases with confidence, and build innovative experiences across an open ecosystem.

Building on Android 17 and QPR1 (SDK 37.1), QPR2 delivers targeted platform APIs and runtime improvements for Android phones, foldables, and tablets. While QPR2 introduces no target-SDK behavior changes, it does ship a few runtime updates that apply to all apps (self-broadcast delivery, call-forwarding USSD requests, and Quick Settings brightness overrides) that are worth verifying. This guide walks through the updates across QPR1 and QPR2 that impact the widest set of Android apps: proactive memory budgeting and process-exit diagnostics, display jank and media pipeline improvements, a redesigned Picture-in-Picture experience, and privacy and security hardening to help you prepare for future Android releases.

In Android 17 QPR2 (SDK 37.2), App Memory Budgets let your app declare soft working-set targets for its package or individual processes. Exceeding a memory budget does not terminate your process; instead, the OS targets cold-page reclaim specifically toward your app—evicting clean file-backed pages, writing dirty pages back to disk, and swapping inactive anonymous heap pages to zRAM—so your app’s working set can stay in memory, while helping protect system stability.

Use MemoryBudgetManager at runtime to register a background pressure listener and inspect or tighten budgets:

While <memory-budget> manages soft working-set reclaim, Android 17 also enforces higher device-wide app memory limits (Memory Limiter) to terminate processes with runaway leaks. QPR2 (SDK 37.2) expands ApplicationExitInfo with dedicated exit reasons alongside Android 17's structured ANR metadata:

In QPR2 (SDK 37.2), SurfaceView and SurfaceControl now expose registerOnJankDataListener() so games, camera viewfinders, and custom renderers can see exactly when their frames appeared on-screen. Jank data is emitted when a desired presentation time is set, or when a specific VsyncId is set (such as by SurfaceControl.Transaction.setFrameTimeline). For example:

For activity triggered startups (ApplicationStartInfo.getStartComponent() equals to ApplicationStartInfo#START_COMPONENT_ACTIVITY), QPR2 also adds ApplicationStartInfo.START_TIMESTAMP_SOURCE_EVENT: the time (in SystemClock.uptimeNanos()) of the initial source event which triggered the start, such as the users click on the app icon in launcher.

Starting in Android 17 QPR2, Android optimizes self-broadcasts—broadcasts (such as sendBroadcast()) where every matching receiver runs in the same process that sent the broadcast—for all apps, regardless of targetSdkVersion. The system hands self-broadcasts back to the sending process for delivery without raising process importance or preventing a cached process from being frozen, and undelivered self-broadcasts are lost if the process is killed.

See the documentation for more detail on this.

QPR2 also helps prevent circular lock-inversion deadlocks in RemoteCallbackList by dispatching broadcast() and unfreeze-queued callbacks outside its per-interface monitor lock.

Determine whether your app is completely occluded so that you can avoid costly screen updates using TrustedPresentationThresholds.SIGNAL_MODE_STRICT_OCCLUSION with WindowManager.registerTrustedPresentationListener().

Android 17 QPR2 (SDK 37.2) modernizes Picture-in-Picture (PiP) on phones, foldables, and tablets with two high-impact additions to PictureInPictureParams.Builder:

Android 17 QPR2 (API level 37.2) introduces new APIs to implement backdrop blurring and other effects, such as frosted glass. With setBackdropRenderEffect(), a RenderNode can now automatically sample and blur whatever content sits underneath it, making it straightforward to add these effects to your app UI.

At the Android Dev Summit, we showed how you can chain blur, saturation, and shaders in Jetpack Compose to turn a "Jump to bottom" chat button into a magnifying glass, a kaleidoscope, or a morphing Android mascot.

Since media apps usually render video using a SurfaceView, Android 17 QPR2 introduces SurfaceView.setBlurRegions(). This allows you to do things like blur areas behind video player controls when they show and hide.

Several graphics, media, and UI improvements take effect automatically or require only a single API call:

Today, when an app launches Intent.ACTION_SEND or ACTION_SEND_MULTIPLE with content URIs in EXTRA_STREAM, the system implicitly grants the target app read access to them. For MediaStore.ACTION_IMAGE_CAPTURE and related capture actions, it grants read and write access to the URI in MediaStore.EXTRA_OUTPUT. In future Android releases the plan is to stop granting these permissions automatically.

Use Android 17's StrictMode.VmPolicy.Builder.detectImplicitUriPermissionGrant() in debug builds now, or the MissingExplicitUriGrant lint check, to find intents that rely on the implicit grant. Then add Intent.FLAG_GRANT_READ_URI_PERMISSION explicitly (plus FLAG_GRANT_WRITE_URI_PERMISSION for capture intents). If your app receives these intents, check whether the sender granted access, and degrade gracefully if it didn't.

Starting in QPR1, when an app requests location access with MediaStore.EXTRA_REQUEST_LOCATION_METADATA_ACCESS, users selecting photos through MediaStore.ACTION_PICK_IMAGES see a system toggle to strip or include geographic EXIF location metadata (with broader ACTION_GET_CONTENT coverage planned for future releases). Previously, location metadata was never included with photo picker URIs. Ensure your EXIF parsing handles both included and missing GPS coordinates gracefully, without interrupting uploads or app workflows:

Alongside the developer APIs above, Android 17 QPR1 and QPR2 bring user-visible platform updates across phones, foldables, and tablets that shape how people interact with your apps:

Beyond app-facing APIs, Android 17 QPR2 also rolls out several system-wide quality-of-life, connectivity, and accessibility upgrades:

Android 17 QPR2 (SDK 37.2) is available today on supported Google Pixel devices—including the Pixel 6a through Pixel 11 series, Pixel Fold, and Pixel Tablet or by using 64-bit Android Emulator system images (including phone, foldable, tablet, resizable, and 16 KB page-size images) in Android Studio.

Update compileSdk in your module's build.gradle.kts to minor API level 2 while keeping targetSdk = 37. When checking Build.VERSION.SDK_INT_FULL at runtime, always check Build.VERSION.SDK_INT >= Build.VERSION_CODES.BAKLAVA first so apps with minSdk < 36 do not throw NoSuchFieldError on Android 15 (API 35) or lower:

Guard QPR1 and QPR2 API calls at runtime with SDK_INT and SDK_INT_FULL:

For full build details, API changes, and issue tracking, see the Android 17 QPR2 release notes, the API 37.2 diff report, the App Memory Budgets guide, and report feedback through the Android Issue Tracker.

After over a year of joint preparation with industry leaders, regional partners, app distributors, and Android communities, our user protections successfully went live on September 30 for participating stores across Brazil, Indonesia, Singapore, and Thailand.

To give these experiences to players and ensure your games shine across every screen size, Google Play is introducing new large screen quality requirements for games

Today, at the Android Dev Summit, we are announcing the broad availability of many tools and APIs designed to remove everyday friction and give you more flexibility to build great Android apps.

Origine de l’article : lire l’article original

Traduction