[FR]: Add MemoryBudgetManager sample

Aperta
#514 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@WSixx ci sta già lavorando.

Dal 16/11/2026.

  • #515 di @WSixx — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
android, kotlin
Ambito
mobile

Direzione di ricerca

Start with the specified sample path, then read the official App memory budgets guide linked in the issue. Implement the listed telemetry, budget transitions, lifecycle-aware listener and cache eviction, and document the manifest clauses and adb inspection commands. Confirm the sample demonstrates the API and its release-only usage; pull request #515 is already open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Is there an existing FR for this?
  • I have searched the existing issues
For which area is this FR?

General

Is it for a specific sample?

samples/performance/memory/src/main/java/com/example/platform/performance/memory/MemoryBudgetSample.kt

Describe the feature request

Add a sample module (:samples:performance:memory) demonstrating the Android 17 QPR2 (API level 37.2 / CINNAMON_BUN_2) MemoryBudgetManager API and <memory-budget> manifest declarations, following the official App memory budgets guide.

Scope:

  • On-demand memory usage and budget telemetry (processCurrentUsageBytes, packageCurrentUsageBytes, processBudgetBytes, packageBudgetBytes, and LIMIT_IS_DISABLED).
  • Discrete workload budget transitions (processBudgetBytes, clearProcessBudget(), idempotency, and IllegalArgumentException ceiling validation).
  • Lifecycle-aware OnOverBudgetListener registration (ON_START / ON_STOP) with fast, allocation-free high-yield LruCache<String, Bitmap> eviction.
  • Documentation for <memory-budget> manifest clauses, release-only usage, and adb inspection commands (dumpsys meminfo and dumpsys activity processes).
Code of Conduct
  • I agree to follow this project's Code of Conduct
Lingua principale
Kotlin
Stelle
1.8k
Fork
554
Merge medio
1g 23h
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di android/platform-samples

Tutte le issue di android/platform-samples

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.