From a95f538b33b988755a12a0c65048e6a520a1ed6a Mon Sep 17 00:00:00 2001
From: Calin Juravle <calin@google.com>
Date: Thu, 16 Nov 2017 05:28:14 +0000
Subject: [PATCH] Revert "Revert "Put pm.* property in new pm_prop context""

This reverts commit 248b6dc64444ea3260fba8e9cb390e59e2b941ab.

Reason for revert: The dashboard complains that devices don't boot after this revert.

Change-Id: I6a4648b64b096cbaa97c67aae6bc38b76d54cb48
(cherry picked from commit 5316548f0d3ff5156a806c80c9549106fdc925bb)
---
 private/compat/26.0/26.0.cil | 3 ++-
 private/property_contexts    | 1 +
 private/system_server.te     | 1 +
 public/property.te           | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/private/compat/26.0/26.0.cil b/private/compat/26.0/26.0.cil
index 7c8f03ea2..15d5a6439 100644
--- a/private/compat/26.0/26.0.cil
+++ b/private/compat/26.0/26.0.cil
@@ -135,7 +135,8 @@
 (typeattributeset default_android_hwservice_26_0 (default_android_hwservice))
 (typeattributeset default_android_service_26_0 (default_android_service))
 (typeattributeset default_android_vndservice_26_0 (default_android_vndservice))
-(typeattributeset default_prop_26_0 (default_prop))
+(typeattributeset default_prop_26_0
+  ( default_prop pm_prop))
 (typeattributeset device_26_0 (device))
 (typeattributeset device_identifiers_service_26_0 (device_identifiers_service))
 (typeattributeset deviceidle_service_26_0 (deviceidle_service))
diff --git a/private/property_contexts b/private/property_contexts
index 55974c041..1706224da 100644
--- a/private/property_contexts
+++ b/private/property_contexts
@@ -68,6 +68,7 @@ ro.bt.                  u:object_r:bluetooth_prop:s0
 ro.boot.bootreason      u:object_r:bootloader_boot_reason_prop:s0
 persist.sys.boot.reason u:object_r:last_boot_reason_prop:s0
 sys.boot.reason         u:object_r:system_boot_reason_prop:s0
+pm.                     u:object_r:pm_prop:s0
 
 # Boolean property set by system server upon boot indicating
 # if device owner is provisioned.
diff --git a/private/system_server.te b/private/system_server.te
index bf25a840e..0c02fb22f 100644
--- a/private/system_server.te
+++ b/private/system_server.te
@@ -481,6 +481,7 @@ set_prop(system_server, fingerprint_prop)
 set_prop(system_server, device_logging_prop)
 set_prop(system_server, dumpstate_options_prop)
 set_prop(system_server, overlay_prop)
+set_prop(system_server, pm_prop)
 userdebug_or_eng(`set_prop(system_server, wifi_log_prop)')
 
 # ctl interface
diff --git a/public/property.te b/public/property.te
index 713dc8373..be84d4a97 100644
--- a/public/property.te
+++ b/public/property.te
@@ -39,6 +39,7 @@ type overlay_prop, property_type;
 type pan_result_prop, property_type, core_property_type;
 type persist_debug_prop, property_type, core_property_type;
 type persistent_properties_ready_prop, property_type;
+type pm_prop, property_type;
 type powerctl_prop, property_type, core_property_type;
 type radio_prop, property_type, core_property_type;
 type restorecon_prop, property_type, core_property_type;
-- 
GitLab