Loading src/java/com/android/internal/telephony/TelephonyComponentFactory.java +4 −2 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public class TelephonyComponentFactory { private static final String TAG_COMPONENT = "component"; private static final String SYSTEM = "/system/"; private static final String PRODUCT = "/product/"; private static final String SYSTEM_EXT = "/system_ext/"; private final Set<String> mComponentNames = new HashSet<>(); private TelephonyComponentFactory mInjectedInstance; Loading @@ -90,7 +91,7 @@ public class TelephonyComponentFactory { /** * @return paths correctly configured to inject. * 1) PackageName and JarPath mustn't be empty. * 2) JarPath is restricted under /system or /product only. * 2) JarPath is restricted under /system or /product or /system_ext only. * 3) JarPath is on a READ-ONLY partition. */ private @Nullable String getValidatedPaths() { Loading @@ -99,7 +100,8 @@ public class TelephonyComponentFactory { } // filter out invalid paths return Arrays.stream(mJarPath.split(File.pathSeparator)) .filter(s -> (s.startsWith(SYSTEM) || s.startsWith(PRODUCT))) .filter(s -> (s.startsWith(SYSTEM) || s.startsWith(PRODUCT) || s.startsWith(SYSTEM_EXT))) .filter(s -> { try { // This will also throw an error if the target doesn't exist. Loading Loading
src/java/com/android/internal/telephony/TelephonyComponentFactory.java +4 −2 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ public class TelephonyComponentFactory { private static final String TAG_COMPONENT = "component"; private static final String SYSTEM = "/system/"; private static final String PRODUCT = "/product/"; private static final String SYSTEM_EXT = "/system_ext/"; private final Set<String> mComponentNames = new HashSet<>(); private TelephonyComponentFactory mInjectedInstance; Loading @@ -90,7 +91,7 @@ public class TelephonyComponentFactory { /** * @return paths correctly configured to inject. * 1) PackageName and JarPath mustn't be empty. * 2) JarPath is restricted under /system or /product only. * 2) JarPath is restricted under /system or /product or /system_ext only. * 3) JarPath is on a READ-ONLY partition. */ private @Nullable String getValidatedPaths() { Loading @@ -99,7 +100,8 @@ public class TelephonyComponentFactory { } // filter out invalid paths return Arrays.stream(mJarPath.split(File.pathSeparator)) .filter(s -> (s.startsWith(SYSTEM) || s.startsWith(PRODUCT))) .filter(s -> (s.startsWith(SYSTEM) || s.startsWith(PRODUCT) || s.startsWith(SYSTEM_EXT))) .filter(s -> { try { // This will also throw an error if the target doesn't exist. Loading