Add a banner to ask the user to disable battery optimization when Event cannot be resolved from Push.
This commit is contained in:
parent
11c2467577
commit
7deed4cc86
22 changed files with 583 additions and 11 deletions
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* Copyright 2025 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.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.push.api.battery
|
||||
|
||||
import android.app.Activity
|
||||
|
||||
data class BatteryOptimizationState(
|
||||
val shouldDisplayBanner: Boolean,
|
||||
val dismiss: () -> Unit,
|
||||
val openSettings: (Activity?) -> Unit,
|
||||
)
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright 2025 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.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.push.api.battery
|
||||
|
||||
import android.app.Activity
|
||||
|
||||
fun aBatteryOptimizationState(
|
||||
shouldDisplayBanner: Boolean = false,
|
||||
dismiss: () -> Unit = {},
|
||||
openSettings: (Activity?) -> Unit = {},
|
||||
) = BatteryOptimizationState(
|
||||
shouldDisplayBanner = shouldDisplayBanner,
|
||||
dismiss = dismiss,
|
||||
openSettings = openSettings,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue