Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
dependencies ▾

Modern-Apps.git / library / aosp-stubs / src / main / java / android / app / supervision / SupervisionManager.java

SupervisionManager.java34 lines · 1.2 KiBRaw
1package android.app.supervision;
2
3import java.util.List;
4
5/**
6 * Stub of the framework's {@code android.app.supervision.SupervisionManager}.
7 *
8 * <p>Obtained with {@code context.getSystemService(SupervisionManager.class)}.
9 *
10 * <p>{@link #getPolicies()} and {@link #setPolicy} both require
11 * {@code android.permission.MANAGE_SUPERVISION}, which is carried by the
12 * {@code SYSTEM_SUPERVISION} role rather than by privileged placement.
13 *
14 * <p>Note {@code setPolicy} with {@code TYPE_TIME_LIMIT} does not implement a timer upstream:
15 * {@code SupervisionService.applyPackageUsagePolicy} suspends the package the moment the policy
16 * is written, with a standing {@code TODO(b/482425646): Only suspend the package when limit is
17 * reached}. Callers wanting real limits must drive the timing themselves.
18 */
19public class SupervisionManager {
20
21 private SupervisionManager() {}
22
23 public boolean isSupervisionEnabled() {
24 throw new UnsupportedOperationException("stub");
25 }
26
27 public List<Policy> getPolicies() {
28 throw new UnsupportedOperationException("stub");
29 }
30
31 public void setPolicy(Policy policy) {
32 throw new UnsupportedOperationException("stub");
33 }
34}