[FR]: Add MemoryBudgetManager sample

Đang mở
#514 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@WSixx đang làm issue này rồi.

Từ ngày 16/11/2026.

  • #515 của @WSixx — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
20/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
android, kotlin
Lĩnh vực
mobile

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Kotlin
Star
1.8k
Fork
554
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của android/platform-samples

Tất cả issue của android/platform-samples

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.