feat: suspend apps from the configuration (setPackagesSuspended)
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Java
- スター
- 44
- フォーク
- 25
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 80
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MDMesh-app/MDMesh のほかの issue
-
enhancement
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
MDMesh-app/MDMesh#252 ·
メンテナーはふだん 2 日以内に返信
-
Change Kiosk Titleオープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
MDMesh-app/MDMesh#253 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
MDMesh-app/MDMesh#232 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 3/5 半日 初心者へのやさしさ 45/100
MDMesh-app/MDMesh#205 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
MDMesh-app/MDMesh#204 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
MDMesh-app/MDMesh の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug devops low
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
aphtech/brailleblaster#209 ·
メンテナーはふだん 1 日以内に返信