frameworks/base
修訂 | 0b67139d52ddb0977ae3fe3dcbda3f2f56137c17 (tree) |
---|---|
時間 | 2020-04-14 23:46:54 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
pm: ignore restorecon failure
On the 9p filesystem, restorecon won't work. It causes apk can't be
installed. Just ignore the errors to workaround it.
@@ -754,7 +754,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements | ||
754 | 754 | } |
755 | 755 | |
756 | 756 | if (!SELinux.restorecon(stageDir)) { |
757 | - throw new IOException("Failed to restorecon session dir: " + stageDir); | |
757 | + Slog.e(TAG, "Failed to restorecon session dir: " + stageDir); | |
758 | 758 | } |
759 | 759 | } |
760 | 760 |
@@ -15811,7 +15811,6 @@ public class PackageManagerService extends IPackageManager.Stub | ||
15811 | 15811 | |
15812 | 15812 | if (!SELinux.restoreconRecursive(afterCodeFile)) { |
15813 | 15813 | Slog.w(TAG, "Failed to restorecon"); |
15814 | - return false; | |
15815 | 15814 | } |
15816 | 15815 | |
15817 | 15816 | // Reflect the rename internally |