feat: suspend apps from the configuration (setPackagesSuspended)
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
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ả
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:
suspendedAppsin theconfig.applydocument (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 deliversPACKAGE_ADDEDto 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.):
setPackagesSuspendedreturns 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
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MDMesh-app/MDMesh
-
enhancement
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
MDMesh-app/MDMesh#252 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Change Kiosk TitleĐang mởenhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
MDMesh-app/MDMesh#253 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
MDMesh-app/MDMesh#232 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 45/100
MDMesh-app/MDMesh#205 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
MDMesh-app/MDMesh#204 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của MDMesh-app/MDMesh
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug devops low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
aphtech/brailleblaster#209 ·
Maintainer thường phản hồi trong vòng 1 ngày