Convert all selinux_android_restorecon and _setfilecon calls to new API.

libselinux selinux_android_restorecon API is changing to the more
general interface with flags and dropping the older variants.

Also get rid of the old, no longer used selinux_android_setfilecon API
and rename selinux_android_setfilecon2 to it as it is the only API in use.

Change-Id: I1e71ec398ccdc24cac4ec76f1b858d0f680f4925
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 6fed798..fdeae57 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -91,7 +91,7 @@
         return -1;
     }
 
-    if (selinux_android_setfilecon2(pkgdir, pkgname, seinfo, uid) < 0) {
+    if (selinux_android_setfilecon(pkgdir, pkgname, seinfo, uid) < 0) {
         ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
         unlink(libsymlink);
         unlink(pkgdir);
@@ -245,7 +245,7 @@
         return -1;
     }
 
-    if (selinux_android_setfilecon2(pkgdir, pkgname, seinfo, uid) < 0) {
+    if (selinux_android_setfilecon(pkgdir, pkgname, seinfo, uid) < 0) {
         ALOGE("cannot setfilecon dir '%s': %s\n", pkgdir, strerror(errno));
         unlink(libsymlink);
         unlink(pkgdir);