Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add onyx max #348

Merged
merged 1 commit into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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