Add local network address classifier and permission advisor

This commit is contained in:
ganfra
2026-07-07 21:37:32 +02:00
parent 7c3d1e2e80
commit 74bc2c0f5d
9 changed files with 405 additions and 0 deletions
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2026 Element Creations 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.permissions.api
interface LocalNetworkPermissionAdvisor {
/**
* Returns true when the app should request the ACCESS_LOCAL_NETWORK permission before making
* network requests to [homeserverUrl].
*/
suspend fun shouldRequestPermissionFor(homeserverUrl: String): Boolean
}