Skip to content

Commit edf8423

Browse files
committed
oops
1 parent 0a838f7 commit edf8423

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

app/src/main/java/org/andbootmgr/app/DeviceInfo.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ abstract class MetaOnSdDeviceInfo : DeviceInfo {
5959
return !SuFile.open(logic.abmDb, "db.conf").exists()
6060
}
6161
override fun getAbmSettings(logic: DeviceLogic): String? {
62-
return logic.dmPath.absolutePath
62+
if (SuFile.open(bdev).exists())
63+
SDUtils.generateMeta(this)?.let { meta ->
64+
if (meta.p.isNotEmpty()) {
65+
val part = meta.dumpKernelPartition(1)
66+
if (part.type == SDUtils.PartitionType.RESERVED)
67+
return part.path
68+
}
69+
}
70+
return null
6371
}
6472
}
6573

@@ -72,15 +80,7 @@ abstract class SdLessDeviceInfo : DeviceInfo {
7280
return !SuFile.open(logic.abmDb, "db.conf").exists()
7381
}
7482
override fun getAbmSettings(logic: DeviceLogic): String? {
75-
if (SuFile.open(bdev).exists())
76-
SDUtils.generateMeta(this)?.let { meta ->
77-
if (meta.p.isNotEmpty()) {
78-
val part = meta.dumpKernelPartition(1)
79-
if (part.type == SDUtils.PartitionType.RESERVED)
80-
return part.path
81-
}
82-
}
83-
return null
83+
return logic.dmPath.absolutePath
8484
}
8585
}
8686

0 commit comments

Comments
 (0)