d365a3b6b3
We need to be able to test our build system against newer emulators. Include both API-30 and API-31 -based emulator images into our nightly test pipeline `azure-pipelines-nightly.yaml`. We will leave the normal CI tests running on API-29 for now as the newer emulators seem to be reliable in a CI environment. One of the changes is in the use of `Context.GetExternalFilesDir(null)` to create a subdirectory within the external files directory. This is due to [permissions changes which came into effect in API-30][0]: > **Note**: On Android 11 (API level 30) and higher, apps cannot > create their own app-specific directory on external storage. As a result our previous code can no longer be used on newer devices. We shall instead unify the tests to all use `Context.GetExternalFilesDir(null)`, then use `Context.FilesDir.AbsolutePath` as a backup. The result of this change is we MUST use the `run-as` command to retrieve the test log file for processing on API-30. This is because the external directory is no longer readable globally on API-30; it is only readable for the app. As a result we also need to make the API-30 build of the test app "debuggable" via `[Application (Debuggable=true)]`. Thankfully this change was reverted somewhat in API-31, so we can still `adb pull` from the directory returned by `Context.GetExternalFilesDir(null);`. Other changes include updating tests to include the `x86_64` abi. This is because the newer x86_64 emulators no longer appear to be able to run `x86` code. [0]: https://developer.android.com/training/data-storage/app-specific#external-access-files |
||
---|---|---|
.. | ||
EmbeddedDSO |