2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00

Merge pull request #610 from hwhw/master

Claim that Android devices do not have a keyboard
This commit is contained in:
Qingping Hou 2014-06-02 11:31:47 -04:00
commit 40dc9443bd

View File

@ -100,11 +100,13 @@ function Device:isKobo()
return string.find(self:getModel() or "", "Kobo_") == 1 return string.find(self:getModel() or "", "Kobo_") == 1
end end
Device.isAndroid = util.isAndroid
function Device:hasNoKeyboard() function Device:hasNoKeyboard()
if self.has_no_keyboard ~= nil then return self.has_no_keyboard end if self.has_no_keyboard ~= nil then return self.has_no_keyboard end
local model = self:getModel() local model = self:getModel()
self.has_no_keyboard = (model == "KindlePaperWhite") or (model == "KindlePaperWhite2") self.has_no_keyboard = (model == "KindlePaperWhite") or (model == "KindlePaperWhite2")
or (model == "KindleTouch") or self:isKobo() or (model == "KindleTouch") or self:isKobo() or self:isAndroid()
return self.has_no_keyboard return self.has_no_keyboard
end end