diff options
| author | 2020-10-27 21:58:05 +0000 | |
|---|---|---|
| committer | 2020-10-27 23:14:12 +0000 | |
| commit | dbee03c575d95a1bd9a969a62200577314a609e7 (patch) | |
| tree | 5aff8576ad380685756f7bf0a688988aeb47fb18 | |
| parent | dd9cc9f4cc0a050e124ad58b307a19b3e20b3f89 (diff) | |
Remove special case for com.android.art.release, which no longer exists.
Test: `m droid com.android.art{,.debug}` and boot in Cuttlefish
with and without OVERRIDE_TARGET_FLATTEN_APEX=true
Bug: 169639321
Change-Id: I7581ab2a99822a6e80e158ae58ffc4b6c82f0f99
| -rw-r--r-- | services/core/java/com/android/server/pm/ApexManager.java | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/services/core/java/com/android/server/pm/ApexManager.java b/services/core/java/com/android/server/pm/ApexManager.java index 7992fea4a675..a12932a88487 100644 --- a/services/core/java/com/android/server/pm/ApexManager.java +++ b/services/core/java/com/android/server/pm/ApexManager.java @@ -1018,29 +1018,17 @@ public abstract class ApexManager { // the /apex directory is just a symlink to /system/apex. List<ActiveApexInfo> result = new ArrayList<>(); File apexDir = Environment.getApexDirectory(); - // In flattened configuration, init special-case the art directory and bind-mounts - // com.android.art.{release|debug} to com.android.art. At the time of writing, these - // directories are copied from the kArtApexDirNames variable in - // system/core/init/mount_namespace.cpp. - String[] skipDirs = {"com.android.art.release", "com.android.art.debug"}; if (apexDir.isDirectory()) { File[] files = apexDir.listFiles(); // listFiles might be null if system server doesn't have permission to read // a directory. if (files != null) { for (File file : files) { - if (file.isDirectory() && !file.getName().contains("@")) { - boolean skip = false; - for (String skipDir : skipDirs) { - if (file.getName().equals(skipDir)) { - skip = true; - break; - } - } - if (!skip) { - result.add( - new ActiveApexInfo(file, Environment.getRootDirectory())); - } + if (file.isDirectory() && !file.getName().contains("@") + // In flattened configuration, init special-cases the art directory + // and bind-mounts com.android.art.debug to com.android.art. + && !file.getName().equals("com.android.art.debug")) { + result.add(new ActiveApexInfo(file, Environment.getRootDirectory())); } } } |