Loading services/core/java/com/android/server/ExtconUEventObserver.java +11 −2 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ public abstract class ExtconUEventObserver extends UEventObserver { private static final String TAG = "ExtconUEventObserver"; private static final boolean LOG = false; private static final String SELINUX_POLICIES_NEED_TO_BE_CHANGED = "This probably mean the selinux policies need to be changed."; "This probably means the selinux policies need to be changed."; private final Map<String, ExtconInfo> mExtconInfos = new ArrayMap<>(); Loading Loading @@ -159,6 +159,15 @@ public abstract class ExtconUEventObserver extends UEventObserver { /** Does the {@link /sys/class/extcon} directory exist */ public static boolean extconExists() { File extconDir = new File("/sys/class/extcon"); return extconDir.exists() && extconDir.isDirectory(); boolean retVal = extconDir.exists() && extconDir.isDirectory(); // TODO(b/124364409): return the correct value after selinux policy is updated. if (retVal) { Slog.w(TAG, extconDir + " exists " + extconDir.exists() + " isDir " + extconDir.isDirectory() + " but reporting it does not exist until selinux policies are updated." + " see b/124364409" ); } return false; } } Loading
services/core/java/com/android/server/ExtconUEventObserver.java +11 −2 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ public abstract class ExtconUEventObserver extends UEventObserver { private static final String TAG = "ExtconUEventObserver"; private static final boolean LOG = false; private static final String SELINUX_POLICIES_NEED_TO_BE_CHANGED = "This probably mean the selinux policies need to be changed."; "This probably means the selinux policies need to be changed."; private final Map<String, ExtconInfo> mExtconInfos = new ArrayMap<>(); Loading Loading @@ -159,6 +159,15 @@ public abstract class ExtconUEventObserver extends UEventObserver { /** Does the {@link /sys/class/extcon} directory exist */ public static boolean extconExists() { File extconDir = new File("/sys/class/extcon"); return extconDir.exists() && extconDir.isDirectory(); boolean retVal = extconDir.exists() && extconDir.isDirectory(); // TODO(b/124364409): return the correct value after selinux policy is updated. if (retVal) { Slog.w(TAG, extconDir + " exists " + extconDir.exists() + " isDir " + extconDir.isDirectory() + " but reporting it does not exist until selinux policies are updated." + " see b/124364409" ); } return false; } }