Snap for 5916059 from b69df9c1fdf20a9240b65350e33b300e9fc1f5db to rvc-release

Change-Id: I6d19de41f4790b8a1e68fa51afe7a858c7de2a15
diff --git a/libselinux/exported.map b/libselinux/exported.map
index dd74294..fbc8acc 100644
--- a/libselinux/exported.map
+++ b/libselinux/exported.map
@@ -25,7 +25,6 @@
     selinux_android_hw_service_context_handle;
     selinux_android_load_policy;
     selinux_android_load_policy_from_fd;
-    selinux_android_prop_context_handle;
     selinux_android_restorecon;
     selinux_android_restorecon_pkgdir;
     selinux_android_seapp_context_init;
diff --git a/libselinux/exported_vendor.map b/libselinux/exported_vendor.map
index fd604fd..ccd5fef 100644
--- a/libselinux/exported_vendor.map
+++ b/libselinux/exported_vendor.map
@@ -13,7 +13,6 @@
     selabel_close;
     selabel_lookup;
     selabel_open;
-    selinux_android_prop_context_handle;
     selinux_android_restorecon;
     selinux_android_service_context_handle;
     selinux_android_hw_service_context_handle;
diff --git a/libselinux/include/selinux/android.h b/libselinux/include/selinux/android.h
index 99fc9ef..640ba2e 100644
--- a/libselinux/include/selinux/android.h
+++ b/libselinux/include/selinux/android.h
@@ -13,8 +13,6 @@
 
 extern struct selabel_handle* selinux_android_file_context_handle(void);
 
-extern struct selabel_handle* selinux_android_prop_context_handle(void);
-
 extern struct selabel_handle* selinux_android_service_context_handle(void);
 
 extern struct selabel_handle* selinux_android_hw_service_context_handle(void);
diff --git a/libselinux/src/android/android_platform.c b/libselinux/src/android/android_platform.c
index 1b807aa..931daae 100644
--- a/libselinux/src/android/android_platform.c
+++ b/libselinux/src/android/android_platform.c
@@ -31,30 +31,6 @@
     { SELABEL_OPT_PATH, "/odm_file_contexts" }
 };
 
-static const struct selinux_opt seopts_prop_plat[] = {
-    { SELABEL_OPT_PATH, "/system/etc/selinux/plat_property_contexts" },
-    { SELABEL_OPT_PATH, "/plat_property_contexts" }
-};
-static const struct selinux_opt seopts_prop_system_ext[] = {
-    { SELABEL_OPT_PATH, "/system_ext/etc/selinux/system_ext_property_contexts" },
-    { SELABEL_OPT_PATH, "/system_ext_property_contexts" }
-};
-static const struct selinux_opt seopts_prop_product[] = {
-    { SELABEL_OPT_PATH, "/product/etc/selinux/product_property_contexts" },
-    { SELABEL_OPT_PATH, "/product_property_contexts" }
-};
-static const struct selinux_opt seopts_prop_vendor[] = {
-    { SELABEL_OPT_PATH, "/vendor/etc/selinux/vendor_property_contexts" },
-    { SELABEL_OPT_PATH, "/vendor_property_contexts" },
-    // TODO: remove nonplat* when no need to retain backward compatibility.
-    { SELABEL_OPT_PATH, "/vendor/etc/selinux/nonplat_property_contexts" },
-    { SELABEL_OPT_PATH, "/nonplat_property_contexts" }
-};
-static const struct selinux_opt seopts_prop_odm[] = {
-    { SELABEL_OPT_PATH, "/odm/etc/selinux/odm_property_contexts" },
-    { SELABEL_OPT_PATH, "/odm_property_contexts" }
-};
-
 /*
  * XXX Where should this configuration file be located?
  * Needs to be accessible by zygote and installd when
@@ -145,55 +121,6 @@
     return selinux_android_file_context(seopts_file, size);
 }
 
-struct selabel_handle* selinux_android_prop_context_handle(void)
-{
-    struct selabel_handle* sehandle;
-    struct selinux_opt seopts_prop[MAX_FILE_CONTEXT_SIZE];
-    int size = 0;
-    unsigned int i;
-    for (i = 0; i < ARRAY_SIZE(seopts_prop_plat); i++) {
-        if (access(seopts_prop_plat[i].value, R_OK) != -1) {
-            seopts_prop[size++] = seopts_prop_plat[i];
-            break;
-        }
-    }
-    for (i = 0; i < ARRAY_SIZE(seopts_prop_system_ext); i++) {
-        if (access(seopts_prop_system_ext[i].value, R_OK) != -1) {
-            seopts_prop[size++] = seopts_prop_system_ext[i];
-            break;
-        }
-    }
-    for (i = 0; i < ARRAY_SIZE(seopts_prop_product); i++) {
-        if (access(seopts_prop_product[i].value, R_OK) != -1) {
-            seopts_prop[size++] = seopts_prop_product[i];
-            break;
-        }
-    }
-    for (i = 0; i < ARRAY_SIZE(seopts_prop_vendor); i++) {
-        if (access(seopts_prop_vendor[i].value, R_OK) != -1) {
-            seopts_prop[size++] = seopts_prop_vendor[i];
-            break;
-        }
-    }
-    for (i = 0; i < ARRAY_SIZE(seopts_prop_odm); i++) {
-        if (access(seopts_prop_odm[i].value, R_OK) != -1) {
-            seopts_prop[size++] = seopts_prop_odm[i];
-            break;
-        }
-    }
-
-    sehandle = selabel_open(SELABEL_CTX_ANDROID_PROP, seopts_prop, size);
-    if (!sehandle) {
-        selinux_log(SELINUX_ERROR, "%s: Error getting property context handle (%s)\n",
-                __FUNCTION__, strerror(errno));
-        return NULL;
-    }
-    selinux_log(SELINUX_INFO, "SELinux: Loaded property_contexts from %s & %s.\n",
-            seopts_prop[0].value, seopts_prop[1].value);
-
-    return sehandle;
-}
-
 enum levelFrom {
 	LEVELFROM_NONE,
 	LEVELFROM_APP,
diff --git a/libselinux/src/android/android_vendor.c b/libselinux/src/android/android_vendor.c
index 82fea4d..e4e95f7 100644
--- a/libselinux/src/android/android_vendor.c
+++ b/libselinux/src/android/android_vendor.c
@@ -6,9 +6,3 @@
     selinux_log(SELINUX_ERROR, "%s: not implemented for vendor variant of libselinux\n", __FUNCTION__);
     return -1;
 }
-
-struct selabel_handle* selinux_android_prop_context_handle(void)
-{
-    selinux_log(SELINUX_ERROR, "%s: not implemented for vendor variant of libselinux\n", __FUNCTION__);
-    return NULL;
-}