Loading services/core/java/com/android/server/ExtconUEventObserver.java +4 −1 Original line number Diff line number Diff line Loading @@ -91,6 +91,9 @@ public abstract class ExtconUEventObserver extends UEventObserver { /** Returns a new list of all external connections whose name matches {@code regex}. */ public static List<ExtconInfo> getExtconInfos(@Nullable String regex) { if (!extconExists()) { return new ArrayList<>(0); // Always return a new list. } Pattern p = regex == null ? null : Pattern.compile(regex); File file = new File("/sys/class/extcon"); File[] files = file.listFiles(); Loading Loading
services/core/java/com/android/server/ExtconUEventObserver.java +4 −1 Original line number Diff line number Diff line Loading @@ -91,6 +91,9 @@ public abstract class ExtconUEventObserver extends UEventObserver { /** Returns a new list of all external connections whose name matches {@code regex}. */ public static List<ExtconInfo> getExtconInfos(@Nullable String regex) { if (!extconExists()) { return new ArrayList<>(0); // Always return a new list. } Pattern p = regex == null ? null : Pattern.compile(regex); File file = new File("/sys/class/extcon"); File[] files = file.listFiles(); Loading