GmsCore icon indicating copy to clipboard operation
GmsCore copied to clipboard

Add Miscellaneous setting and Hide app icon option

Open ILoveOpenSourceApplications opened this issue 1 year ago • 12 comments

Adds an option to hide icon from launcher.

Resolves #2263, resolves #2266 as well as resolves #2361.

Credits: @rufusin

The icon should be enabled by default.

These two should seems to do the opposite: CheckIn.HIDE_APP_ICON -> getSettingsBoolean(key, true) android:enabled="false"

ale5000-git avatar Jul 30 '24 23:07 ale5000-git

Also in my opinion the variable name seems a bit strange: private fun updateHideAppIcon(enabled: Boolean)

Personally I would choose private fun updateHideAppIcon(hide: Boolean) or private fun updateShowAppIcon(enabled: Boolean)

ale5000-git avatar Jul 30 '24 23:07 ale5000-git

The icon should be enabled by default.

android:defaultValue="false"/>

The option in microG settings is disabled so the icon should be enabled by default, but you disable the icon in reality here: https://github.com/microg/GmsCore/pull/2462/files#diff-d629a5125b2f479f4916b4b963c3ed5bc5b8c8e79951dfb805bc1fa4a7384624R597-R605

        <activity
            android:name="org.microg.gms.ui.MainSettingsActivity"
            android:enabled="false"

Edit: Now that I read better, here you don't disable the icon but the MainSettingsActivity so you actually break the microG settings. This one mustn't be disabled in any case.

This shouldn't be touched => org.microg.gms.ui.MainSettingsActivity This can be disabled (but not by default) => org.microg.gms.ui.SettingsActivity

ale5000-git avatar Jul 31 '24 17:07 ale5000-git

Also in my opinion the variable name seems a bit strange: private fun updateHideAppIcon(enabled: Boolean)

May I ask what the variable does here so that I could understand which one from the below two would make sense?

This is just personal opinion but in this case: updateHideAppIcon(enabled=true) when enabled = true, the icon is hidden so not enabled.

instead with this: updateHideAppIcon(hide=true) when hide = true, the icon is hidden so not enabled.

So actually it is the same in practice but I think the first is just more confusing but it is still personal preference.

@mar-v-in What do you think?

ale5000-git avatar Jul 31 '24 18:07 ale5000-git

@ale5000-git, I believe I have addressed all the requested changes in this pull request. Please let me know if there are any additional modifications or suggestions. @mar-v-in, your input would also be greatly appreciated. Thank you for your time and consideration.

@mar-v-in I think it would also be nice to be able to optionally set the default status in /system/etc/microg.xml, so ROM authors and flashable ZIPs can set it without the need to mess with it in other ways.

ale5000-git avatar Oct 02 '24 20:10 ale5000-git

I have made changes according to the requests, not sure if it is what was intended. Do let me know if further changes are needed.

@mar-v-in I think it would also be nice to be able to optionally set the default status in /system/etc/microg.xml, so ROM authors and flashable ZIPs can set it without the need to mess with it in other ways.

Is this within the scope of this PR or just a suggestion for the future of microg?

Is this within the scope of this PR or just a suggestion for the future of microg?

It can also be done later in a different PR.

ale5000-git avatar Oct 30 '24 21:10 ale5000-git

Also, please add a way to hide this setting on the Huawei build flavor, as devices with Huawei OS that support microG, the microG settings is automatically hidden from launcher.

@ILoveOpenSourceApplications You misunderstood this, this should happen on Huawei build flavor, it is a flavor of microG; it shouldn't check the device manufacturer.

ale5000-git avatar Oct 30 '24 21:10 ale5000-git

Also, although I haven't tried, the changes to AndroidManifest.xml seems totally unnecessary.

ale5000-git avatar Oct 30 '24 21:10 ale5000-git

@ILoveOpenSourceApplications You misunderstood this, this should happen on Huawei build flavor, it is a flavor of microG; it shouldn't check the device manufacturer.

Can you point me as to where I need to make the changes?

This isn't something I hoped would require these many changes. As it does, I'm not the one capable of doing so and hope someone else in the future may implement such a feature. And in that hope, I'm closing down this PR.

@ILoveOpenSourceApplications I'm busy with other things now but I will look at it when I get more free time

ale5000-git avatar Feb 02 '25 12:02 ale5000-git