feat: suspend apps from the configuration (setPackagesSuspended)

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

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đá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
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, java, kotlin, react, typescript
Lĩnh vực
backend, frontend, mobile

Hướng nghiên cứu

Find the config.apply parsing and the Android device agent code that calls DevicePolicyManager.setPackagesSuspended, then locate the console configuration app list for the optional Suspended action. Verify behavior for API 24+, packages that Android refuses to suspend, reapplying configuration at boot, and unsuspending packages removed from suspendedApps; the feature is done when the configured packages are suspended without uninstalling them and the agent reports rejected packages.

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

Mô tả

enhancement
Area

Device agent (Android)

The problem

On fully managed phones (parental control, small fleet) I sometimes need an app to stop working without removing it: for example blocked on school days, or until a rule is agreed on. Today the options are:

  • uninstall it (app.uninstall, #7 / #54): its data is lost, and it can simply be reinstalled;
  • kiosk mode: only the listed apps can run, which is far too strict for daily use;
  • DNS blocking: works for online apps only, and only while DNS goes through the filter.

None of them keeps the app installed but unusable.

Proposed solution

A list in the configuration, applied by the agent with DevicePolicyManager.setPackagesSuspended (API 24, Device Owner):

  • Key: suspendedApps in the config.apply document (open to another name): the package names to suspend. The app stays installed with its data, its icon is greyed out, and opening it shows the system's "app paused by your admin" dialog.
  • A package removed from the list is unsuspended. An absent key means not managed.
  • Suspension is lost if the app is uninstalled and reinstalled. Each config.apply, including the re-apply at boot, could suspend the listed packages again. Android 8+ no longer delivers PACKAGE_ADDED to manifest receivers, so another trigger would be needed to catch a reinstall right away.
  • Android refuses to suspend some packages (the Device Owner itself, the default launcher and dialer, etc.): setPackagesSuspended returns them, and the agent could report them in the result.
  • Console: a "Suspended" action or toggle in the configuration's app list, or a button in the device's Apps tab (#134).

#70 (blocking installs) and this one cover different needs: #70 stops new apps, this stops a given app that is already installed.

Alternatives considered
  • setApplicationHidden: the app disappears entirely, which is more confusing for the user and harder to notice.
  • DNS blocking (AdGuard Home and similar): useful, but bypassed by turning the VPN off or changing Private DNS, and useless for offline apps.
  • Kiosk mode: too strict, see above.
Before submitting
  • I searched existing issues and discussions for the same idea.
Ngôn ngữ chính
Java
Star
44
Fork
25
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
80

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 MDMesh-app/MDMesh

Tất cả issue của MDMesh-app/MDMesh

Issue tương tự

Thêm issue về Java

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.