maruos / maruos

Your phone is your PC.
https://maruos.com
Apache License 2.0
1.98k stars 122 forks source link

settings: Extract MaruOS desktop settings to a single app #127

Closed utzcoz closed 3 years ago

utzcoz commented 4 years ago

From Android N, Settings support extra settings. If we assign action com.android.settings.action.EXTRA_SETTINGS(in SettingsLib TileUtils) to category Activity, the TileUtils' getCategories will find this Activity, and add it to the Settings' page.

Maybe we can create a single app, and implement the content of MaruOS desktop to this app. Yes, this app should include the dependency of SettingsLib. After that, we can drop the modification of Settings, and remove it from MaruOS custom repository.

utzcoz commented 4 years ago

@pdsouza can help add settings or other more meaningful label to this issue? Thanks.

pdsouza commented 4 years ago

@utzcoz Yes, I noticed this too when porting from M to N. We should definitely do this. This app can also manage the desktop rootfs (#99).

utzcoz commented 4 years ago

Okay, maybe we can add settings function to this app now, just from zero to one.

utzcoz commented 4 years ago

@pdsouza If need, I can create a project to do it in my repository to start to extract MaruOS desktop settings to a single app.

pdsouza commented 4 years ago

@utzcoz Yeah that would be great if you have the time! Thanks!

utzcoz commented 4 years ago

Maru desktop settings depends on Settings code, instead of SettingsLib only, and current Settings doesn't provide a core library for other app, which is done in master branch. So I will check whether it's easy to archive the same function without Settings dependency.

pintaf commented 4 years ago

Hey ! Did someone started working on this ? I'm willing to continue the work

utzcoz commented 4 years ago

@pintaf I am working for it, and I push code to project vendor_maruos_packages_apps_MaruSettings. I just fix the build problem of MaruSettings with maruos modification to Settings. So if you have interested, you can checkout the code, and add your work.

pintaf commented 4 years ago

Thanks for the heads up. I've forked the project, and will contribute when I can

utzcoz commented 4 years ago

@pdsouza @pintaf , I have pushed a work version to my repository MaruSettings. And I have added a integrate to MaruOS manual to README.md, so you can download and test it. After integrating, we can see another Desktop entry on Settings dashboard homepage bottom. It looks like the same as origin Desktop item, and works fine as it too. I also added the detail to the README.md, so we can discuss whether it fits our need.

pintaf commented 4 years ago

Hello @utzcoz I checked the source. I'll try to integrate this in my LOS16 build. This seems like a really good job. I want to add the possibility to run mcprepare from the settings app too and maybe also the possibility to dl the rootfs. It'll be easier to work with your app than doing this on the LOS settings. Thanks !

utzcoz commented 3 years ago

In Android 10, the settings can't find custom fragment class with its ClassLoader. So we should implement preference content to outer settings activity.

utzcoz commented 3 years ago

@pdsouza if we start to maru-0.7, I can collaborate with @pintaf to do it for maru-0.7 based on @pintaf 's work. Maybe the maru-0.7 can be a more suitable place to integrate it. Also it can integrate some thoughts in Some suggestions for future releases by @twaik.

pdsouza commented 3 years ago

@utzcoz Yes, let's do that. I've already begun to set up a basic maru-0.7 manifest. You can see my early work here: https://github.com/pdsouza/manifest/tree/maru-0.7. I will merge this to our main manifest repo once I confirm I can get a LOS16 build working without issues. Then I can accept PRs on that branch to integrate MaruSettings and other suggestions by @twaik.

twaik commented 3 years ago

I do not think I will be ready for release soon. But there is a possibility that I can adaptate mflinger to be both X11- and Surfaceflinger client. Actually there is a 3rd solution. I used it for Termux project. I implemented basic wayland server that can be output only for XWayland. It implements a basic shared memory based output and keyboard/mouse/etc input. I stucked at touchpad emulation, but it is unneded if we use external devices for input. There were some lags on aarch64 based devices but I think I know how to get rid of them. The basic code without Activity adaptations is pretty simple.

pintaf commented 3 years ago

@Ready to work on that with you. I just set up again a build machine for maru building (will do it for Aquarus X2), so really looking forward pushing things further.

utzcoz commented 3 years ago

Okay, the MaruSettings has been added to maru-0.7, and it works with the basic functions. Although it has some works to be done, I will create new issue for the specific problem, so I close this old and long issue.