Skip to content

Commit

Permalink
rework DeviceInfo.kt
Browse files Browse the repository at this point in the history
Reduce duplication to make it easier to maintain.

Fix the following issues:

- possible problem with `EINK` value on `TOLINO_EPOS3` devices
  (since both `TOLINO` and `TOLINO_EPOS3` booleans would be set)
- `EINK` was never set to `EinkDevice.TOLINO_VISION6`,
  but checked in `device/EPDFactory.kt`
- same with `HANVON_960` & `HYREAD_MINI6`
- `LIGHTS` was never set to `LightsDevice.ONYX_NOTE_PRO`,
  but checked in `device/LightsFactory.kt`
- `LIGTS` could be set to `LightsDevice.ONYX_PALMA`,
  but was never checked in `device/LightsFactory.kt`

Note: also drop device properties: `is_boyue` (unused) & `is_tolino`
(only used to add direction pad mappings, details were added to the
relevant wiki page instead).
  • Loading branch information
benoit-pierre committed Nov 8, 2024
1 parent 4af40b5 commit 51f357e
Show file tree
Hide file tree
Showing 5 changed files with 579 additions and 896 deletions.
5 changes: 2 additions & 3 deletions app/src/main/java/org/koreader/launcher/device/Device.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ class Device(activity: Activity) {
val einkPlatform = epd.getPlatform()

val properties: String
get() = String.format("%s;%s;%s;%s;%s;%s;%b;%b",
get() = String.format("%s;%s;%s;%s;%s;%s;%s",
DeviceInfo.MANUFACTURER,
DeviceInfo.BRAND,
DeviceInfo.MODEL,
DeviceInfo.DEVICE,
DeviceInfo.PRODUCT,
DeviceInfo.HARDWARE,
DeviceInfo.BOYUE,
DeviceInfo.TOLINO)
)
}
Loading

0 comments on commit 51f357e

Please sign in to comment.