mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
android: unbreak KO on scoped storage devices
This commit is contained in:
@@ -11,7 +11,7 @@ function DataStorage:getDataDir()
|
|||||||
if data_dir then return data_dir end
|
if data_dir then return data_dir end
|
||||||
|
|
||||||
if isAndroid then
|
if isAndroid then
|
||||||
data_dir = android.externalStorage() .. "/koreader"
|
data_dir = android.getExternalStoragePath() .. "/koreader"
|
||||||
elseif os.getenv("UBUNTU_APPLICATION_ISOLATION") then
|
elseif os.getenv("UBUNTU_APPLICATION_ISOLATION") then
|
||||||
local app_id = os.getenv("APP_ID")
|
local app_id = os.getenv("APP_ID")
|
||||||
local package_name = app_id:match("^(.-)_")
|
local package_name = app_id:match("^(.-)_")
|
||||||
|
|||||||
@@ -20,7 +20,11 @@ local function getCodename()
|
|||||||
local api = android.app.activity.sdkVersion
|
local api = android.app.activity.sdkVersion
|
||||||
local codename = ""
|
local codename = ""
|
||||||
|
|
||||||
if api > 27 then
|
if api > 29 then
|
||||||
|
codename = "R"
|
||||||
|
elseif api == 29 then
|
||||||
|
codename = "Q"
|
||||||
|
elseif api == 28 then
|
||||||
codename = "Pie"
|
codename = "Pie"
|
||||||
elseif api == 27 or api == 26 then
|
elseif api == 27 or api == 26 then
|
||||||
codename = "Oreo"
|
codename = "Oreo"
|
||||||
|
|||||||
Reference in New Issue
Block a user