Skip to content

feat(MainActivity): provide "hardwareType" and "Model" from Build as "android.prop"#381

Closed
hasezoey wants to merge 3 commits into
koreader:masterfrom
hasezoey:addDeviceProps
Closed

feat(MainActivity): provide "hardwareType" and "Model" from Build as "android.prop"#381
hasezoey wants to merge 3 commits into
koreader:masterfrom
hasezoey:addDeviceProps

Conversation

@hasezoey

@hasezoey hasezoey commented Sep 10, 2022

Copy link
Copy Markdown
Contributor

This PR provides Build.HARDWARE (ro.product.hardwareType) and Build.MODEL(ro.product.model) in lua for a PR for the frontend to detect Tolino


This change is Reviewable

Comment thread app/src/main/java/org/koreader/launcher/LuaInterface.kt Outdated

@Frenzie Frenzie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm give or take alphabetization nits but @pazos has the final word regardless

@pazos

pazos commented Sep 11, 2022

Copy link
Copy Markdown
Member

Hey @hasezoey, android.product is enough to identify a given tolino model.

If you want to export Build things to lua keep in mind we're talking about java Strings, so please double check they're not null. But that's already done in https://github.com/koreader/android-luajit-launcher/blob/master/app/src/main/java/org/koreader/launcher/device/DeviceInfo.kt#L168-L173
with https://github.com/koreader/android-luajit-launcher/blob/master/app/src/main/java/org/koreader/launcher/device/DeviceInfo.kt#L528-L534

So please repurpose those instead.

@hasezoey

Copy link
Copy Markdown
Contributor Author

updated the 2 functions to use DeviceInfo instead

@pazos

pazos commented Sep 16, 2022

Copy link
Copy Markdown
Member

superseeded by #383

@hasezoey

Copy link
Copy Markdown
Contributor Author

closing in favor of #383

@hasezoey hasezoey closed this Sep 16, 2022
@hasezoey hasezoey deleted the addDeviceProps branch September 16, 2022 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants