mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Remove dead code.
This commit is contained in:
-29
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2023, 2024 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.androidutils.accessibility
|
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import android.view.accessibility.AccessibilityManager
|
|
||||||
import androidx.core.content.getSystemService
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether a screen reader is enabled.
|
|
||||||
*
|
|
||||||
* Avoid changing UI or app behavior based on the state of accessibility.
|
|
||||||
* See [AccessibilityManager.isTouchExplorationEnabled] for more details.
|
|
||||||
*
|
|
||||||
* @return true if the screen reader is enabled.
|
|
||||||
*/
|
|
||||||
fun Context.isScreenReaderEnabled(): Boolean {
|
|
||||||
val accessibilityManager = getSystemService<AccessibilityManager>()
|
|
||||||
?: return false
|
|
||||||
|
|
||||||
return accessibilityManager.let {
|
|
||||||
it.isEnabled && it.isTouchExplorationEnabled
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user