| 62687956 | 24-Sep-2020 |
Stanisław Chmiela <[email protected]> |
[android] Remove "share" and "save to launcher" actions from the persistent notification (#10333)
# Why
Kind of fixes https://github.com/expo/expo/issues/10301 (well, removing the buggy feature i
[android] Remove "share" and "save to launcher" actions from the persistent notification (#10333)
# Why
Kind of fixes https://github.com/expo/expo/issues/10301 (well, removing the buggy feature is kind of a fix).
# How
First I found out where the layout for the notification is held (`notification{.xml,_shell_app.xml}`). I noticed that `notification_shell_app.xml` defines exactly the layout we would like to keep, so I replaced `notification.xml` (used in Expo client) with `notification_shell_app.xml` (used in shell apps if `androidShowExponentNotificationInShellApp` manifest flag is `true`), removing the original one (now there's only one layout).
After removing buttons from the layout I had to also remove the code that bound actions to the buttons. I then went down the rabbit hole to code that was called and removed it too (see `ExponentIntentService`, `Kernel#installShortcut`).
**Note:** I left code responsible for handling shortcut opens so this is still supported.
# Test Plan
I have run Expo client with these changes and verified that there are no share or pin icons anymore.
show more ...
|