diff options
| author | Elliot Sisteron <elliotsisteron@google.com> | 2021-11-17 13:40:22 +0000 |
|---|---|---|
| committer | Elliot Sisteron <elliotsisteron@google.com> | 2021-11-23 21:47:25 +0000 |
| commit | 56c1563b3a1c5deb82395c9bad078481eb769809 (patch) | |
| tree | 92acf5b1fb62d06da0cff927c7c74adef3bbae8c /core/java/android | |
| parent | c71f19f0fab5d0d56fe3575c28968bcb16b64781 (diff) | |
Adding SafetyCenter system service and permission.
This implements a basic version of go/angel-in-mainline-api, only
for the bits that are unlikely to change (i.e. introduce the ability
for safety sources to provide data to the safety center).
SELinux Policy changes in aosp/1897505 and aosp/1899011
Test: ag/16284943
Ignore-AOSP-First: Yes
Bug: 203098016
Bug: 203400898
Bug: 205111656
Change-Id: I5d139782decf5226f0c4a8dcaed7c5691a86fed4
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/SystemServiceRegistry.java | 2 | ||||
| -rw-r--r-- | core/java/android/content/Context.java | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java index 74e28581717d..04763070cded 100644 --- a/core/java/android/app/SystemServiceRegistry.java +++ b/core/java/android/app/SystemServiceRegistry.java @@ -196,6 +196,7 @@ import android.permission.PermissionControllerManager; import android.permission.PermissionManager; import android.print.IPrintManager; import android.print.PrintManager; +import android.safetycenter.SafetyCenterFrameworkInitializer; import android.scheduling.SchedulingFrameworkInitializer; import android.security.FileIntegrityManager; import android.security.IFileIntegrityService; @@ -1530,6 +1531,7 @@ public final class SystemServiceRegistry { SchedulingFrameworkInitializer.registerServiceWrappers(); SupplementalProcessFrameworkInitializer.registerServiceWrappers(); UwbFrameworkInitializer.registerServiceWrappers(); + SafetyCenterFrameworkInitializer.registerServiceWrappers(); } finally { // If any of the above code throws, we're in a pretty bad shape and the process // will likely crash, but we'll reset it just in case there's an exception handler... diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 25d1d53752a7..05e2e8787d0d 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -3842,6 +3842,7 @@ public abstract class Context { UWB_SERVICE, MEDIA_METRICS_SERVICE, SUPPLEMENTAL_PROCESS_SERVICE, + //@hide: SAFETY_CENTER_SERVICE, }) @Retention(RetentionPolicy.SOURCE) public @interface ServiceName {} @@ -5871,6 +5872,17 @@ public abstract class Context { public static final String SUPPLEMENTAL_PROCESS_SERVICE = "supplemental_process"; /** + * Use with {@link #getSystemService(String)} to retrieve a {@link + * android.safetycenter.SafetyCenterManager} instance for interacting with the safety center. + * + * @see #getSystemService(String) + * @see android.safetycenter.SafetyCenterManager + * @hide + */ + @SystemApi + public static final String SAFETY_CENTER_SERVICE = "safety_center"; + + /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. * |
