Skip to content

Commit

Permalink
add basic support for android eink refreshes on some rockchip devices
Browse files Browse the repository at this point in the history
  • Loading branch information
pazos committed Jan 30, 2019
1 parent 4874751 commit bc8542d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/device/android/device.lua
Expand Up @@ -13,6 +13,7 @@ local Device = Generic:new{
hasKeys = yes,
hasDPad = no,
isAndroid = yes,
hasEinkScreen = android.isEink(),
hasFrontlight = yes,
firmware_rev = android.app.activity.sdkVersion,
display_dpi = android.lib.AConfiguration_getDensity(android.app.config),
Expand Down
1 change: 1 addition & 0 deletions frontend/device/generic/device.lua
Expand Up @@ -25,6 +25,7 @@ local Device = {
hasFrontlight = no,
needsTouchScreenProbe = no,
hasClipboard = yes, -- generic internal clipboard on all devices
hasEinkScreen = yes,
hasColorScreen = no,
hasBGRFrameBuffer = no,
canToggleGSensor = no,
Expand Down
2 changes: 2 additions & 0 deletions frontend/device/sdl/device.lua
Expand Up @@ -15,6 +15,7 @@ local Device = Generic:new{
isTouchDevice = yes,
needsScreenRefreshAfterResume = no,
hasColorScreen = yes,
hasEinkScreen = no,
}

local AppImage = Device:new{
Expand All @@ -24,6 +25,7 @@ local AppImage = Device:new{
local Emulator = Device:new{
model = "Emulator",
isEmulator = yes,
hasEinkScreen = yes,
hasFrontlight = yes,
}

Expand Down
3 changes: 1 addition & 2 deletions frontend/ui/elements/screen_eink_opt_menu_table.lua
Expand Up @@ -25,8 +25,7 @@ local eink_settings_table = {
},
}

-- TODO reactivate if someone reverse engineers Android E Ink stuff
if not Device:isAndroid() then
if Device.hasEinkScreen then
table.insert(eink_settings_table.sub_item_table, 1, require("ui/elements/refresh_menu_table"))
end

Expand Down

0 comments on commit bc8542d

Please sign in to comment.