* Add `getForegroundInfo` implementation to try to fix issues with WorkManager on Android 12 and below This may be a MIUI-only issue as I couldn't reproduce it with several emulators on Android 11, 12 and 13. * Use `setExpedited` only on Android 13 or higher, it's not needed on older versions * Use an actual string resource, fix tests * Fix review comments * Fix broken test with Element Pro: Instead of using Robolectric with API < 33 (since Pro uses minSdk 33) use a `BuildVersionSdkIntProvider` * Remove `getForegroundInfo` and the associated permission, as we expect it to be dead code * Fix lint issues * Cleanup NotificationIdProvider --------- Co-authored-by: Benoit Marty <benoit@matrix.org>
34 lines
1.2 KiB
XML
34 lines
1.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?><!--
|
|
~ Copyright 2023 New Vector Ltd.
|
|
~
|
|
~ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
~ Please see LICENSE files in the repository root for full details.
|
|
-->
|
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
|
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
|
|
|
<application>
|
|
<receiver
|
|
android:name=".notifications.TestNotificationReceiver"
|
|
android:exported="false" />
|
|
<receiver
|
|
android:name=".notifications.NotificationBroadcastReceiver"
|
|
android:enabled="true"
|
|
android:exported="false" />
|
|
|
|
<provider
|
|
android:name=".notifications.NotificationsFileProvider"
|
|
android:authorities="${applicationId}.notifications.fileprovider"
|
|
android:exported="false"
|
|
android:grantUriPermissions="true">
|
|
<meta-data
|
|
android:name="android.support.FILE_PROVIDER_PATHS"
|
|
android:resource="@xml/notifications_provider_paths" />
|
|
</provider>
|
|
|
|
</application>
|
|
|
|
</manifest>
|