-
-
Notifications
You must be signed in to change notification settings - Fork 441
feat: Add Hide app icon
patch
#4977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
feat: Add Hide app icon
patch
#4977
Conversation
39bd4ad
to
22dd905
Compare
patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIcon.kt
Outdated
Show resolved
Hide resolved
22dd905
to
64efc2b
Compare
64efc2b
to
a63a303
Compare
patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
1f8bac6
to
e78880b
Compare
Was this done using AI? The |
I spoke too soon. This still doesn't work with YouTube.
|
If this can be finished, also verify this works with MicroG. Most notably, verify the whitelist battery functionality still works (patched YouTube shows the 'disable background optimizations' dialog on first startup). And verify the MicroG settings opens correctly from YouTube Settings > ReVanced > Miscellaneous > GmsCore. |
@vippium, any idea why it's failing to hide the app icon? |
Yes, actually. |
Yupp...this works with microg. But, intent-filters must be there in microg to make it optional. which'll help user whether he wants or not to hide the icon, using that option in microg settings.
But, in my case, it is working with every app. Even with YouTube. And, for cross-check, I also tried it with Lawnchair, Niagara and Smart too. Device using - iQOO Z7 Pro (A15)
Or, correct me if I'm wrong in understanding your q's. |
@vippium are you using the latest code that's here? When I tried patching YT it failed during patching and did not make any changes. |
Ahh...It's very typical for me to use the CLI for checking the PR. Let me know if you can generate me an rvp file for it. So, that I can use it with manager and let you know the results. Or any other way. |
@vippium There is talk of configuring pull requests to also generate an rvp file (way easier to quickly try out), but that hasn't happened yet. For now, an RVP file can be generated by building locally. But what's here does not work with YouTube. Possibly because of the hard coded "launcher" name it's looking for. |
PR build artifacts are generated for a while now, see the workflow runs |
After checking it with the patch, I can comfirm that it is not working. But how then it works if we change the launcher activity manually, with YT. Let me check if it works same way with others or not. Edit:
And, regarding the YT, I don't think that icon or name are hard-coded. Bcoz, if they are hard-coded, then, it should also not work with manual changes in manifest file. If manually changing the values in manifest works, then, it's not hard-coded. I think the patch needs to be reworked with the code. |
Well, thnx oSumAtrIX for this. |
Then, how it's gonna be work without the modifications. As of I know, for hiding the icon, this needs to be done. |
That is a warning, and is only displayed if the patch fails to find the manifest entries it's expecting. It's showing that because the patch is broken and it's not making any changes. |
Ohh... I thought something else. |
dae785a
to
e596c15
Compare
5273206
to
f5a38af
Compare
f5a38af
to
f79bc05
Compare
Finally...it is working. Even with YT and YTM. I just checked the compatibility with them. Here is a point. It only works with But, when I used revanced package change option, it doesn't install in any way. So, I tried with rvx package change patch, and it worked without issues. Give a check with rv option at your end too. |
Patch now works. Change package name is not needed. I patched Twitch (with only this patch), and icon is hidden. App can only be opened using assistant app ("open Twitch"), or the app is opened using a web link that redirects to the app (and only after 'supported web addresses' is manually enabled) |
Now just waiting for the "I use ALL the patches" users to report the app is missing after patching. |
@LisoUseInAIKyrios, what about opening the app from |
My device does not show the open action in the app info. |
Oh, okay. Then @vippium, can you check this?
|
It won't show that option. It only shows for those apps which have the launcher activity. If user is patching the app with this patch, I think user knows what he's doing. |
Should the patch be modified to show |
You can go with it if you prefer this. Instead of that, you can go with |
cf4dc59
to
d5da488
Compare
The latest change has broke the patch. It now shows up again in the launcher. |
Great... I think it is not possible to show open button in hidden app. Rather than this, just add that option in settings. It'll work same as the open button. Just like a bypass to open button. |
This reverts commit d5da488.
53efc48
to
1eafb9d
Compare
patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt
Outdated
Show resolved
Hide resolved
…HideAppIconPatch.kt Co-authored-by: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com>
…de-app-icon # Conflicts: # patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt
patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt
Show resolved
Hide resolved
patches/src/main/kotlin/app/revanced/patches/all/misc/appicon/HideAppIconPatch.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me besides the small change I mentioned
var changed = false | ||
|
||
val intentFilters = document.getElementsByTagName("intent-filter") | ||
for (i in 0 until intentFilters.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like node.childElementsSequence() this should use intentFilters.asSequence()
Hides the app icon from the launcher.
After patching, the app can only be opened in a few ways.
App links
The app supports opening web links in app, and the app info 'Opens supported links' and all supported web links are enabled. App is then opened using a web link, or opened using Android assistant app ("Hey Google, open app Whatever").
App is launched from another app
The app has a custom intent that other apps can launch from, such as MicroG that can be opened from ReVanced YouTube settings. Apps with deep integration in other apps may also support this (such as opening Facebook Messenger from Facebook, or opening Amazon Kindle from the Amazon shopping app).
Closes #3575.