[fenix] For https://github.com/mozilla-mobile/fenix/issues/4977: Migrate fennec short...
commitd1ca8071c7226f6cfe2aabd22a57bb664370e1e0
authorMugurell <Mugurell@users.noreply.github.com>
Tue, 7 Jan 2020 17:07:51 +0000 (7 19:07 +0200)
committerSawyer Blatz <sdblatz@gmail.com>
Tue, 7 Jan 2020 17:07:51 +0000 (7 09:07 -0800)
tree271f8e337241604b4d0d8155a81714fbd70eac95
parent2691968e42e091ad20cfdc49ac94afa1685414a3
[fenix] For https://github.com/mozilla-mobile/fenix/issues/4977: Migrate fennec shortcuts (https://github.com/mozilla-mobile/fenix/pull/7251)

* For https://github.com/mozilla-mobile/fenix/issues/4977 - Support opening Fennec pinned website shortcuts in Fenix

Fennec's pinned website shortcuts are set to open the BrowserApp activity.
So we need a new activity alias to actually catch such Intents. Otherwise they
would open "org.mozilla.firefox/.App" without any way to inform that this is
the result of the user clicking on a pinned shortcut.
For actually checking if the newly received Intent is of a Fennec pinned
shortcut we introduce a new FennecBookmarkShortcutsIntentProcessor which will
prepare the Intent to open the shortcut's URL in a new tab.

* For https://github.com/mozilla-mobile/fenix/issues/4977 - Don't keep IntentReceiverActivity on the back stack

For successive Fennec pinned shortcuts to create a new IntentReceiverActivity
and be processed as normal we need to not keep this as our task root.

* For https://github.com/mozilla-mobile/fenix/issues/4977 - Test the FennecBookmarkShortcutsIntentProcessor
mobile/android/fenix/app/src/main/AndroidManifest.xml
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/IntentReceiverActivity.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/IntentProcessors.kt
mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/intent/FennecBookmarkShortcutsIntentProcessor.kt [new file with mode: 0644]
mobile/android/fenix/app/src/test/java/org/mozilla/fenix/home/intent/FennecBookmarkShortcutsIntentProcessorTest.kt [new file with mode: 0644]