Skip to content

Commit b2852f0

Browse files
Aalique Grahameluk1337
authored andcommitted
WiredAccessoryManager: update extcon file paths
Update the file paths used in WAM to reflect the new location of the extcon files. CRs-Fixed: 2232066 Change-Id: I3884074e71ea9fe974b4b2de7161dce8e5d08e76
1 parent 1ac5d4f commit b2852f0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

services/core/java/com/android/server/WiredAccessoryManager.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -536,8 +536,8 @@ private void getDevIndex() {
536536

537537
while (true) {
538538
String devPath = String.format(Locale.US,
539-
"/sys/class/switch/extcon%d/name",
540-
index);
539+
"/sys/devices/platform/soc/%s/extcon/extcon%d/name",
540+
mDevName, index);
541541

542542
try {
543543
FileReader file = new FileReader(devPath);
@@ -566,8 +566,8 @@ private void getCableIndex() {
566566

567567
while (true) {
568568
String cablePath = String.format(Locale.US,
569-
"/sys/class/switch/extcon%d/cable.%d/name",
570-
mDevIndex, index);
569+
"/sys/devices/platform/soc/%s/extcon/extcon%d/cable.%d/name",
570+
mDevName, mDevIndex, index);
571571

572572
try {
573573
FileReader file = new FileReader(cablePath);
@@ -606,8 +606,8 @@ public String getDevPath() {
606606
public String getSwitchStatePath() {
607607
if (mDevName.equals(NAME_DP_AUDIO)) {
608608
return String.format(Locale.US,
609-
"/sys/class/switch/extcon%d/cable.%d/state",
610-
mDevIndex, mCableIndex);
609+
"/sys/devices/platform/soc/%s/extcon/extcon%d/cable.%d/state",
610+
mDevName, mDevIndex, mCableIndex);
611611
}
612612
return String.format(Locale.US, "/sys/class/switch/%s/state", mDevName);
613613
}

0 commit comments

Comments
 (0)