Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit fa374e68 authored by Harold Tan's avatar Harold Tan Committed by Michael Bestas
Browse files

WiredAccessoryManager: use dev index from UEventInfo to form devPath

DP extcon support does not always counts from index zero.
In checkDevIndex(), updating variable used to construct
dev path string, i.e. index, to dev_index so that
it also works in other device nodes.

CRs-Fixed: 2986549
Change-Id: Idb2ebfc18947681e9f8ca62bb8f7f5772b55b723
parent 45a0effa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -609,7 +609,7 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks {
                while (true) {
                    String devPath = String.format(Locale.US,
                            "/sys/devices/platform/soc/%s/extcon/extcon%d/name",
                            NAME_DP_AUDIO, index);
                            NAME_DP_AUDIO, devIndex);
                    if (LOG) {
                        Slog.v(TAG, "checkDevIndex " + devPath);
                    }