Skip to content

Commit

Permalink
Add onyx max (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
pazos authored Jan 6, 2022
1 parent 5855067 commit 251bff2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/src/main/java/org/koreader/launcher/device/DeviceInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ object DeviceInfo {
ONYX_C67,
ONYX_DARWIN7,
ONYX_KON_TIKI2,
ONYX_MAX,
ONYX_NOVA2,
ONYX_NOVA3_COLOR,
ONYX_NOVA_AIR,
Expand All @@ -69,6 +70,7 @@ object DeviceInfo {
enum class QuirkDevice {
NONE,
EMULATOR,
ONYX_MAX,
ONYX_POKE2,
SONY_RP1
}
Expand Down Expand Up @@ -105,6 +107,7 @@ object DeviceInfo {
private val ONYX_C67: Boolean
private val ONYX_DARWIN7: Boolean
private val ONYX_KON_TIKI2: Boolean
private val ONYX_MAX: Boolean
private val ONYX_NOVA2: Boolean
private val ONYX_NOVA3_COLOR: Boolean
private val ONYX_NOVA_AIR: Boolean
Expand Down Expand Up @@ -214,6 +217,11 @@ object DeviceInfo {
&& (MODEL.contentEquals("bnrv510") || MODEL.contentEquals("bnrv520") || MODEL.contentEquals("bnrv700")
|| MODEL.contentEquals("evk_mx6sl") || MODEL.startsWith("ereader"))

// Onyx Max
ONYX_MAX = (MANUFACTURER.contentEquals("onyx")
&& PRODUCT.contentEquals("max")
&& DEVICE.contentEquals("max"))

// Onyx Nova 2
ONYX_NOVA2 = (MANUFACTURER.contentEquals("onyx")
&& PRODUCT.contentEquals("nova2")
Expand Down Expand Up @@ -263,6 +271,7 @@ object DeviceInfo {
// devices with known bugs
val bugMap = HashMap<QuirkDevice, Boolean>()
bugMap[QuirkDevice.EMULATOR] = EMULATOR_X86
bugMap[QuirkDevice.ONYX_MAX] = ONYX_MAX
bugMap[QuirkDevice.ONYX_POKE2] = ONYX_POKE2
bugMap[QuirkDevice.SONY_RP1] = SONY_RP1

Expand Down Expand Up @@ -301,6 +310,7 @@ object DeviceInfo {
deviceMap[EinkDevice.ONYX_C67] = ONYX_C67
deviceMap[EinkDevice.ONYX_DARWIN7] = ONYX_DARWIN7
deviceMap[EinkDevice.ONYX_KON_TIKI2] = ONYX_KON_TIKI2
deviceMap[EinkDevice.ONYX_MAX] = ONYX_MAX
deviceMap[EinkDevice.ONYX_NOVA2] = ONYX_NOVA2
deviceMap[EinkDevice.ONYX_NOVA3_COLOR] = ONYX_NOVA3_COLOR
deviceMap[EinkDevice.ONYX_NOVA_AIR] = ONYX_NOVA_AIR
Expand Down Expand Up @@ -355,6 +365,7 @@ object DeviceInfo {

// Android devices without lights
QUIRK_NO_LIGHTS = when (QUIRK) {
QuirkDevice.ONYX_MAX,
QuirkDevice.SONY_RP1 -> true
else -> false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ object EPDFactory {
}

DeviceInfo.EinkDevice.ONYX_KON_TIKI2,
DeviceInfo.EinkDevice.ONYX_MAX,
DeviceInfo.EinkDevice.ONYX_NOVA2,
DeviceInfo.EinkDevice.ONYX_NOVA3_COLOR,
DeviceInfo.EinkDevice.ONYX_NOVA_AIR -> {
Expand Down

0 comments on commit 251bff2

Please sign in to comment.