Bug 1706656 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

> Olivia, I see that we currently declare processes to be `android:isolatedProcess="false"` in a manifest file. Can we delay the decision of whether a process should be isolated or not to runtime, so we can check whether the user is on Android 8+? Or is there a way to specify a minimum Android version in the manifest file?

It looks like using a resource value to change `android:isolatedProcess` in the [manifest file](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/mobile/android/geckoview/src/main/AndroidManifest_overlay.jinja#14) based on device API could work as a solution. 

(Checked by turning on an isolated process test that would fail if isolated processes were enabled, set the [above changes](https://bugzilla.mozilla.org/show_bug.cgi?id=1706656#c10), and ran the test in API 24, 25, 26, 31. Test passed/failed as expected if isolated processes were in fact off/on - pass on 24, 25 and fail as expected on 26, 31.)

I think bug 1719762 to update the CI emulator would also become relevant for testing isolated processes (mozemulator right now is 24).

Just mentioning some additional implementation considerations for reference - If we go this direction, we would also need to adjust the build flag of `MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS` to turn on/off isolated processes in the `values-26/bool.xml` file (.jinja template layer?) or similar, update a [static pref](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/modules/libpref/init/StaticPrefList.yaml#9783) that uses that [flag](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/modules/libpref/init/generate_static_pref_list.py#401) to work as expected, and update [Enviroment.java](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/util/Environment.java#76).
> Olivia, I see that we currently declare processes to be `android:isolatedProcess="false"` in a manifest file. Can we delay the decision of whether a process should be isolated or not to runtime, so we can check whether the user is on Android 8+? Or is there a way to specify a minimum Android version in the manifest file?

It looks like using a resource value to change `android:isolatedProcess` in the [manifest file](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/mobile/android/geckoview/src/main/AndroidManifest_overlay.jinja#14) based on device API could work as a solution. 

(Checked by turning on an isolated process test that would fail if isolated processes were enabled and pass if not enabled, set the [above changes](https://bugzilla.mozilla.org/show_bug.cgi?id=1706656#c10), and ran the test in API 24, 25, 26, 31. Test passed/failed as expected if isolated processes were in fact off/on - pass on 24, 25 and fail as expected on 26, 31.)

I think bug 1719762 to update the CI emulator would also become relevant for testing isolated processes (mozemulator right now is 24).

Just mentioning some additional implementation considerations for reference - If we go this direction, we would also need to adjust the build flag of `MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS` to turn on/off isolated processes in the `values-26/bool.xml` file (add .jinja template layer?) or similar, update a [static pref](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/modules/libpref/init/StaticPrefList.yaml#9783) that uses that [flag](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/modules/libpref/init/generate_static_pref_list.py#401) to work as expected, and update [Enviroment.java](https://searchfox.org/mozilla-central/rev/abf6758ed833c203f84703aa2e3e3d317571b1e9/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/util/Environment.java#76).

Back to Bug 1706656 Comment 11