Repo Created

This commit is contained in:
Fr4nz D13trich 2025-11-15 17:44:12 +01:00
parent eb305e2886
commit a8c22c65db
4784 changed files with 329907 additions and 2 deletions

View file

@ -0,0 +1,38 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
android {
namespace "com.google.android.gms.ads.identifier"
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
buildFeatures {
aidl = true
}
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
apply from: '../gradle/publish-android.gradle'
description = 'microG implementation of play-services-ads-identifier'
dependencies {
api project(':play-services-basement')
}

View file

@ -0,0 +1,42 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
dependencies {
api project(':play-services-ads-identifier')
implementation project(':play-services-base-core')
}
android {
namespace "org.microg.gms.ads.identifier"
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
kotlinOptions {
jvmTarget = 1.8
}
lintOptions {
disable 'MissingTranslation', 'GetLocales'
}
}

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ SPDX-FileCopyrightText: 2023 microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<service android:name=".AdvertisingIdService">
<intent-filter>
<action android:name="com.google.android.gms.ads.identifier.service.START" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
</application>
</manifest>

View file

@ -0,0 +1,139 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ads.identifier
import android.app.Service
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Binder
import android.os.Bundle
import android.os.IBinder
import android.util.Log
import androidx.core.os.bundleOf
import com.google.android.gms.ads.identifier.internal.IAdvertisingIdService
import org.microg.gms.common.GooglePackagePermission
import org.microg.gms.common.PackageUtils
import java.util.UUID
const val TAG = "AdvertisingId"
const val EMPTY_AD_ID = "00000000-0000-0000-0000-000000000000"
class AdvertisingIdService : Service() {
override fun onBind(intent: Intent): IBinder? {
return AdvertisingIdServiceImpl(this).asBinder()
}
}
class MemoryAdvertisingIdConfiguration(context: Context) : AdvertisingIdConfiguration(context) {
override val adTrackingLimitedPerApp: MutableMap<Int, Boolean> = hashMapOf()
override var adTrackingLimitedGlobally: Boolean = true
override var debugLogging: Boolean = false
override var adId: String = EMPTY_AD_ID
override var debugAdId: String = EMPTY_AD_ID
init {
resetAdvertisingId()
}
}
abstract class AdvertisingIdConfiguration(private val context: Context) {
abstract val adTrackingLimitedPerApp: MutableMap<Int, Boolean>
abstract var adTrackingLimitedGlobally: Boolean
abstract var debugLogging: Boolean
abstract var adId: String
abstract var debugAdId: String
fun isAdTrackingLimitedForApp(uid: Int): Boolean {
if (adTrackingLimitedGlobally) return true
return adTrackingLimitedPerApp[uid] ?: false
}
fun resetAdvertisingId(): String {
adId = UUID.randomUUID().toString()
debugAdId = UUID.randomUUID().toString().dropLast(12) + "10ca1ad1abe1"
return if (debugLogging) debugAdId else adId
}
fun getAdvertisingIdForApp(uid: Int): String {
if (isAdTrackingLimitedForApp(uid)) return EMPTY_AD_ID
try {
val packageNames = context.packageManager.getPackagesForUid(uid) ?: return EMPTY_AD_ID
for (packageName in packageNames) {
val applicationInfo = context.packageManager.getApplicationInfo(packageName, 0)
if (applicationInfo.targetSdkVersion > 33) {
if (context.packageManager.checkPermission("com.google.android.gms.permission.AD_ID", packageName) == PackageManager.PERMISSION_DENIED) {
throw SecurityException("Permission not granted")
}
}
}
} catch (e: Exception) {
Log.w(TAG, "Permission check failed", e)
return EMPTY_AD_ID
}
val adId = if (debugLogging) debugAdId else adId
return adId.ifEmpty { resetAdvertisingId() }
}
}
class AdvertisingIdServiceImpl(private val context: Context) : IAdvertisingIdService.Stub() {
private val configuration = MemoryAdvertisingIdConfiguration(context)
override fun getAdvertisingId(): String {
return configuration.getAdvertisingIdForApp(Binder.getCallingUid())
}
override fun isAdTrackingLimited(ignored: Boolean): Boolean {
return configuration.isAdTrackingLimitedForApp(Binder.getCallingUid())
}
override fun resetAdvertisingId(packageName: String): String {
PackageUtils.checkPackageUid(context, packageName, getCallingUid())
PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID)
return configuration.resetAdvertisingId()
}
override fun setAdTrackingLimitedGlobally(packageName: String, limited: Boolean) {
PackageUtils.checkPackageUid(context, packageName, getCallingUid())
PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID)
configuration.adTrackingLimitedGlobally = limited
}
override fun setDebugLoggingEnabled(packageName: String, enabled: Boolean): String {
PackageUtils.checkPackageUid(context, packageName, getCallingUid())
PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID)
configuration.debugLogging = enabled
return advertisingId
}
override fun isDebugLoggingEnabled(): Boolean {
return configuration.debugLogging
}
override fun isAdTrackingLimitedGlobally(): Boolean {
PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID)
return configuration.adTrackingLimitedGlobally
}
override fun setAdTrackingLimitedForApp(uid: Int, limited: Boolean) {
PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID)
configuration.adTrackingLimitedPerApp[uid] = limited
}
override fun resetAdTrackingLimitedForApp(uid: Int) {
PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID)
configuration.adTrackingLimitedPerApp.remove(uid)
}
override fun getAllAppsLimitedAdTrackingConfiguration(): Bundle {
PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID)
return bundleOf(*configuration.adTrackingLimitedPerApp.map { it.key.toString() to it.value }.toTypedArray())
}
override fun getAdvertisingIdForApp(uid: Int): String {
PackageUtils.assertGooglePackagePermission(context, GooglePackagePermission.AD_ID)
return configuration.getAdvertisingIdForApp(uid)
}
}

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_label">إشعار مُعَرِّف الإعلان</string>
<string name="perm_ad_id_label">إذن مُعَرِّف الإعلان</string>
<string name="perm_ad_id_notification_description">يتيح للتطبيق تلقي إشعار عند تحديث مُعَرِّف الإعلان أو تحديد تفضيلات تتبع الإعلانات للمستخدم.</string>
<string name="perm_ad_id_description">يتيح لتطبيق الناشر بالوصول إلى مُعَرِّف إعلان صالح بشكل مباشر أو غير مباشر.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Permite qu\'una aplicación reciba un avisu al anovar la ID de publicidá o al llendar la preferencia de rastrexu publicitariu del usuariu.</string>
<string name="perm_ad_id_notification_label">Avisu d\'ID de publicidá</string>
<string name="perm_ad_id_description">Permite que l\'aplicación d\'un espublizador acceda in/direutamente a una ID de publicidá.</string>
<string name="perm_ad_id_label">Permisu d\'ID de publicidá</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Reklam ID İcazəsi</string>
<string name="perm_ad_id_description">Dərc edici tətbiq birbaşa və ya dolayı yolla etibarlı reklam ID-ə keçid icazəsi verir.</string>
<string name="perm_ad_id_notification_label">Reklam ID bildirişi</string>
<string name="perm_ad_id_notification_description">İstifadəçinin reklam ID-i və ya reklam izləmə seçiminin məhdudlaşdırılması yeniləndikdə, tətbiqə bildiriş almaq icazəsi verir.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Дазвол рэкламнага ідэнтыфікатара</string>
<string name="perm_ad_id_description">Дазваляе выдаўцу дадатку прама ці ўскосна атрымліваць доступ да рэкламнага ідэнтыфікатара.</string>
<string name="perm_ad_id_notification_label">Апавяшчэнне рэкламнага ідэнтыфікатара</string>
<string name="perm_ad_id_notification_description">Дазваляе дадаткам атрымліваць апавяшчэнне калі рэкламны ідэнтыфікатар або перавага аб ліміце рэкламнай сачэння карыстальніка абноўленыя.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Oprávnění k reklamnímu ID</string>
<string name="perm_ad_id_description">Umožní vydavatelské aplikaci přímý nebo nepřímý přístup k platnému reklamnímu ID.</string>
<string name="perm_ad_id_notification_label">Oznámení o reklamním ID</string>
<string name="perm_ad_id_notification_description">Umožní aplikaci obdržet oznámení při aktualizaci reklamního ID nebo uživatelské předvolby omezení reklamního sledování.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Erlaubt einer App, eine Benachrichtigung zu erhalten, wenn sich die Werbe-ID ändert oder der Nutzer das Tracking einschränkt.</string>
<string name="perm_ad_id_notification_label">Werbe-ID-Benachrichtigung</string>
<string name="perm_ad_id_description">Erlaubt einer App, direkt oder indirekt, auf die Werbe-ID zuzugreifen.</string>
<string name="perm_ad_id_label">Werbe-ID-Berechtigung</string>
</resources>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Permiso de identificación publicitaria</string>
<string name="perm_ad_id_description">Permite que una aplicación de editor acceda directa o indirectamente a un ID de publicidad válido.</string>
<string name="perm_ad_id_notification_label">Notificación del ID de publicidad</string>
<string name="perm_ad_id_notification_description">Permite que una aplicación reciba una notificación cuando se actualiza el ID de publicidad o la preferencia de limitar el seguimiento de anuncios del usuario.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">مجوز شناسه آگهی</string>
<string name="perm_ad_id_description">به یک برنامه ناشر اجازه می‌دهد تا به شیوه مستقیم یا غیرمستقیم به یک شناسه آگهی معتبر دسترسی پیدا کند.</string>
<string name="perm_ad_id_notification_label">آگاه‌ساز شناسه آگهی</string>
<string name="perm_ad_id_notification_description">به یک برنامه اجازه می‌دهد تا هنگام به‌روزرسانی شناسه آگهی یا تنظیمات ردیابی محدود آگهی کاربر، آگاه‌ساز دریافت کند.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Sallii sovelluksen vastaanottaa ilmoituksen, kun käyttäjän mainostunnus tai mainonnan seurantaa rajoittava asetus päivitetään.</string>
<string name="perm_ad_id_label">Mainostunnuslupa</string>
<string name="perm_ad_id_notification_label">Mainostunnusilmoitus</string>
<string name="perm_ad_id_description">Mahdollistaa julkaisijasovellukselle pääsyn voimassa olevaan mainostunnukseen suoraan tai välillisesti.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Pahintulot ng Advertising ID</string>
<string name="perm_ad_id_description">Nagbibigay-daan sa isang publisher app na mag-access ng wastong advertising ID nang direkta o hindi direkta.</string>
<string name="perm_ad_id_notification_label">Notification ng Advertising ID</string>
<string name="perm_ad_id_notification_description">Nagbibigay-daan sa isang app na makatanggap ng notification kapag na-update ang advertising ID o limitahan ang kagustuhan sa pagsubaybay sa ad ng user.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Permission de l\'identifiant publicitaire</string>
<string name="perm_ad_id_description">Autorise une application affichant de la publicité à accéder directement ou indirectement à un identifiant publicitaire valide.</string>
<string name="perm_ad_id_notification_label">Notification de l\'identifiant publicitaire</string>
<string name="perm_ad_id_notification_description">Autorise une application à être notifiée de la modification de l\'identifiant publicitaire ou de la limitation du suivi publicitaire de l\'utilisateur.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Ligeann sé daip fógra a fháil nuair a nuashonraítear an t-aitheantas fógraíochta nó an rogha rianaithe teorann atá ag an úsáideoir.</string>
<string name="perm_ad_id_notification_label">Fógra aitheantais fógraíochta</string>
<string name="perm_ad_id_label">Cead ID Fógraíochta</string>
<string name="perm_ad_id_description">Ligeann sé daip foilsitheora rochtain a fháil ar aitheantas bailí fógraíochta go díreach nó go hindíreach.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_description">Memungkinkan aplikasi penerbit mengakses ID periklanan yang valid secara langsung atau tidak langsung.</string>
<string name="perm_ad_id_label">Izin ID Periklanan</string>
<string name="perm_ad_id_notification_label">Pemberitahuan ID periklanan</string>
<string name="perm_ad_id_notification_description">Memungkinkan aplikasi menerima notifikasi ketika ID periklanan atau batas preferensi pelacakan iklan pengguna diperbarui.</string>
</resources>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Consente a un\'app di ricevere una notifica in caso di aggiornamento dell\'ID pubblicità o della preferenza dell\'utente relativa alla limitazione del tracciamento degli annunci.</string>
<string name="perm_ad_id_notification_label">Notifica sull\'ID pubblicità</string>
<string name="perm_ad_id_description">Consente a un\'app dell\'autore di accedere direttamente o indirettamente a un ID pubblicità valido.</string>
<string name="perm_ad_id_label">Autorizzazione accesso all\'ID pubblicità</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">ユーザーの広告 ID またはトラッキング拒否設定が更新されたときに、アプリが通知を受信できるようにします。</string>
<string name="perm_ad_id_notification_label">広告 ID の通知</string>
<string name="perm_ad_id_description">外部アプリが有効な広告 ID に直接的または間接的にアクセスできるようにします。</string>
<string name="perm_ad_id_label">広告 ID の許可</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">광고 ID 권한</string>
<string name="perm_ad_id_description">퍼블리셔 앱이 유효한 광고 ID에 직접 또는 간접적으로 접근할 수 있도록 합니다.</string>
<string name="perm_ad_id_notification_label">광고 ID 알림</string>
<string name="perm_ad_id_notification_description">사용자의 광고 ID 또는 광고 추적 제한 설정이 변경되면 앱이 알림을 받을 수 있습니다.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Reklāmas identifikatora atļauja</string>
<string name="perm_ad_id_description">Ļauj lietotnes izdevējam tieši vai netieši piekļūt derīgam reklāmas identifikatoram.</string>
<string name="perm_ad_id_notification_label">Reklāmas identifikatora paziņojums</string>
<string name="perm_ad_id_notification_description">Ļauj informēt lietotni, ja mainās reklāmas identifikators vai lietotāja ierobežotie, iestatītie reklāmu izsekošanas iestatījumi.</string>
</resources>

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">പരസ്യ ഐഡി അനുമതി</string>
<string name="perm_ad_id_description">ഒരു പ്രസാധക ആപ്പിന് സാധുവായ ഒരു പരസ്യ ഐഡി നേരിട്ടോ അല്ലാതെയോ ആക്‌സസ് ചെയ്യാൻ അനുവദിക്കുന്നു.</string>
<string name="perm_ad_id_notification_label">പരസ്യ ഐഡി അറിയിപ്പ്</string>
<string name="perm_ad_id_notification_description">ഉപയോക്താവിന്റെ പരസ്യ ഐഡി അല്ലെങ്കിൽ പരസ്യ ട്രാക്കിംഗ് മുൻഗണന പരിമിതപ്പെടുത്തുമ്പോൾ ഒരു ആപ്പിന് അറിയിപ്പ് ലഭിക്കാൻ അനുവദിക്കുന്നു.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Tillatelse til reklame-ID</string>
<string name="perm_ad_id_description">Lar en app få tilgang til en gyldig reklame-ID direkte eller indirekte.</string>
<string name="perm_ad_id_notification_label">Reklame-ID-varsling</string>
<string name="perm_ad_id_notification_description">Lar en app bli varslet når reklame-ID-en til brukeren eller innstillingene til denne oppdateres.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Staart een app om een bericht te ontvangen wanneer de reclame ID of de beperkte advertentie verkiesbaar is.</string>
<string name="perm_ad_id_label">Adverteren van ID Permissie</string>
<string name="perm_ad_id_description">Staart een uitgever app toe om toegang te krijgen tot een geldige advertentie ID direct of indirect.</string>
<string name="perm_ad_id_notification_label">Adverteren van ID-informatie</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Umożliwia aplikacji otrzymywanie powiadomień w przypadku aktualizacji identyfikatora reklamowego lub ograniczenia preferencji śledzenia użytkownika w celach reklamowych.</string>
<string name="perm_ad_id_notification_label">Powiadomienie o indentyfikatorze reklamowym</string>
<string name="perm_ad_id_description">Umożliwia wydawcy aplikacji na bezpośredni lub pośredni dostęp do ważnego identyfikatora reklamowego.</string>
<string name="perm_ad_id_label">Pozwolenie na używanie identyfikatora reklamowego</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Permissão do ID de publicidade</string>
<string name="perm_ad_id_description">Permite que o app publicante acesse um ID de publicidade válido diretamente ou indiretamente.</string>
<string name="perm_ad_id_notification_label">Notificação do ID de publicidade</string>
<string name="perm_ad_id_notification_description">Permite que um app receba uma notificação quando o ID de publicidade muda ou a configuração de limitação de rastreamento de anúncios do usuário muda.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Permissão do ID de publicidade</string>
<string name="perm_ad_id_description">Permite que a app de publicação aceda um ID de publicidade válido direta ou indireto.</string>
<string name="perm_ad_id_notification_label">Notificação do ID de publicidade</string>
<string name="perm_ad_id_notification_description">Permite que uma app receba uma notificação quando o ID de publicidade muda ou a configuração de limitação de rastreamento de anúncios do utilizador muda.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Permite unei aplicații să primească o notificare atunci când ID-ul de publicitate sau preferința limitată de urmărire a anunțurilor a utilizatorului este actualizată.</string>
<string name="perm_ad_id_notification_label">Notificare de identificare publicitară</string>
<string name="perm_ad_id_description">Permite unei aplicații de editor să acceseze direct sau indirect un ID de publicitate valid.</string>
<string name="perm_ad_id_label">Permisiune de identificare publicitară</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Разрешает приложению получать уведомление когда рекламный идентификатор или предпочтение о лимите рекламной слежки пользователя обновлены.</string>
<string name="perm_ad_id_label">Разрешение рекламного идентификатора</string>
<string name="perm_ad_id_description">Разрешает издателю приложения прямо или косвенно получать доступ к рекламному идентификатору.</string>
<string name="perm_ad_id_notification_label">Уведомление рекламного идентификатора</string>
</resources>

View file

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_label">Обавештење за ID оглашавања</string>
<string name="perm_ad_id_description">Дозвољава апликацији објављивача да директно или индиректно приступи важећем ID-у оглашавања.</string>
<string name="perm_ad_id_label">Дозвола за ID оглашавања</string>
<string name="perm_ad_id_notification_description">Дозвољава апликацији да прими обавештење када се ажурира ID оглашавања или ограничење праћења огласа корисника.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Tillåter en app att ta emot ett meddelande när annons-ID eller begränsad annonsspårningsinställning för användaren uppdateras.</string>
<string name="perm_ad_id_notification_label">Avisering av annons-ID</string>
<string name="perm_ad_id_description">Tillåter en publicerad app att få tillgång till ett giltigt annons-ID direkt eller indirekt.</string>
<string name="perm_ad_id_label">Behörighet för annons-ID</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_label">விளம்பர அடையாளம் அறிவிப்பு</string>
<string name="perm_ad_id_notification_description">விளம்பர அடையாளம் அல்லது பயனரின் விளம்பர கண்காணிப்பு விருப்பம் புதுப்பிக்கப்படும்போது ஒரு பயன்பாட்டை அறிவிப்பைப் பெற அனுமதிக்கிறது.</string>
<string name="perm_ad_id_label">விளம்பர அடையாளம் இசைவு</string>
<string name="perm_ad_id_description">சரியான விளம்பர அடையளத்தை நேரடியாகவோ அல்லது மறைமுகமாகவோ அணுக ஒரு வெளியீட்டாளர் பயன்பாட்டை அனுமதிக்கிறது.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">การอนุญาติให้เข้าถึงรหัสประจำตัวของโฆษณา</string>
<string name="perm_ad_id_notification_label">การแจ้งเตือน รหัสประจำตัวของโฆษณา</string>
<string name="perm_ad_id_description">อนุญาตให้ผู้สร้างแอปเข้าถึง รหัสประจำตัวของโฆษณาที่ถูกต้องได้โดยตรงหรือโดยอ้อม</string>
<string name="perm_ad_id_notification_description">อนุญาตให้แอปรับการแจ้งเตือนเมื่อมีการอัปเดต รหัสประจำตัวของโฆษณา หรือ การตั้งค่าการติดตามโฆษณาของผู้ใช้</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">Reklam kimliği izni</string>
<string name="perm_ad_id_notification_label">Reklam kimliği bildirimi</string>
<string name="perm_ad_id_notification_description">Bir uygulamanın, kullanıcının reklam takibini kısıtlama ayarını veya reklam kimliğini değiştirdiğinde bildirim almasına izin verir.</string>
<string name="perm_ad_id_description">Bir uygulamanın geçerli bir reklam kimliğine doğrudan veya dolaylı olarak erişmesine izin verir.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_label">ئېلان كىملىك ئۇقتۇرۇشى</string>
<string name="perm_ad_id_label">ئېلان كىملىك ئىجازىتى</string>
<string name="perm_ad_id_notification_description">ئەپنىڭ ئىشلەتكۈچى ئېلان كىملىكى ياكى ئېلان ئىزلاشنى چەكلەش مايىللىقى ئۆزگەرگەندە ئۇقتۇرۇش تاپشۇرۇۋېلىشىغا يول قويىدۇ.</string>
<string name="perm_ad_id_description">تارقاتقۇچىنىڭ ئەپىنىڭ بىۋاسىتە ياكى ۋاسىتىلىك ھالدا ئېلان كىملىكىنى زىيارەت قىلىشىغا يول قويىدۇ.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Дозволяє програмі отримувати сповіщення, коли рекламний ідентифікатор або обмеження налаштувань відстеження реклами користувача оновлюється.</string>
<string name="perm_ad_id_notification_label">Сповіщення рекламного ідентифікатора</string>
<string name="perm_ad_id_description">Дозволяє застосунку видавця отримувати доступ до дійсного рекламного ідентифікатор прямо або опосередковано.</string>
<string name="perm_ad_id_label">Дозвіл на рекламний ідентифікатор</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_notification_description">Cho phép một ứng dụng nhận thông báo khi ID quảng cáo hoặc tùy chọn giới hạn theo dõi quảng cáo của người dùng được cập nhật.</string>
<string name="perm_ad_id_label">Quyền truy cập ID quảng cáo</string>
<string name="perm_ad_id_notification_label">Thông báo về ID quảng cáo</string>
<string name="perm_ad_id_description">Cho phép ứng dụng của nhà phát hành truy cập trực tiếp hoặc gián tiếp vào ID quảng cáo hợp lệ.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">广告 ID 权限</string>
<string name="perm_ad_id_description">允许发布者应用直接或间接地访问广告 ID。</string>
<string name="perm_ad_id_notification_label">广告 ID 通知</string>
<string name="perm_ad_id_notification_description">允许应用在用户的广告 ID 或限制广告跟踪设置更改时接收通知。</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="perm_ad_id_label">廣告 ID 權限</string>
<string name="perm_ad_id_notification_label">廣告 ID 通知</string>
<string name="perm_ad_id_notification_description">允許應用程式在使用者更新廣告 ID 或限制廣告追蹤設定時收到通知。</string>
<string name="perm_ad_id_description">允許發布商應用程式直接或間接存取有效的廣告 ID。</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ SPDX-FileCopyrightText: 2023 microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="perm_ad_id_label">Advertising ID Permission</string>
<string name="perm_ad_id_description">Allows a publisher app to access a valid advertising ID directly or indirectly.</string>
<string name="perm_ad_id_notification_label">Advertising ID notification</string>
<string name="perm_ad_id_notification_description">Allows an app to receive a notification when the advertising ID or limit ad tracking preference of the user is updated.</string>
</resources>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2023 microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest />

View file

@ -0,0 +1,17 @@
package com.google.android.gms.ads.identifier.internal;
import android.os.Bundle;
interface IAdvertisingIdService {
String getAdvertisingId() = 0;
boolean isAdTrackingLimited(boolean ignored) = 1;
String resetAdvertisingId(String packageName) = 2;
void setAdTrackingLimitedGlobally(String packageName, boolean limited) = 3;
String setDebugLoggingEnabled(String packageName, boolean enabled) = 4;
boolean isDebugLoggingEnabled() = 5;
boolean isAdTrackingLimitedGlobally() = 6;
void setAdTrackingLimitedForApp(int uid, boolean limited) = 7;
void resetAdTrackingLimitedForApp(int uid) = 8;
Bundle getAllAppsLimitedAdTrackingConfiguration() = 9; // Map packageName -> Boolean
String getAdvertisingIdForApp(int uid) = 10;
}

View file

@ -0,0 +1,80 @@
/*
* SPDX-FileCopyrightText: 2023 microG Project Team
* SPDX-License-Identifier: Apache-2.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
package com.google.android.gms.ads.identifier;
import android.app.Activity;
import android.content.Context;
import android.provider.Settings;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import java.io.IOException;
/**
* Helper library for retrieval of advertising ID and related information such as the limit ad tracking setting.
* <p>
* It is intended that the advertising ID completely replace existing usage of other identifiers for ads purposes (such as use
* of {@code ANDROID_ID} in {@link Settings.Secure}) when Google Play Services is available. Cases where Google Play Services is
* unavailable are indicated by a {@link GooglePlayServicesNotAvailableException} being thrown by getAdvertisingIdInfo().
*/
public class AdvertisingIdClient {
/**
* Retrieves the user's advertising ID and limit ad tracking preference.
* <p>
* This method cannot be called in the main thread as it may block leading to ANRs. An {@code IllegalStateException} will be
* thrown if this is called on the main thread.
*
* @param context Current {@link Context} (such as the current {@link Activity}).
* @return AdvertisingIdClient.Info with user's advertising ID and limit ad tracking preference.
* @throws IOException signaling connection to Google Play Services failed.
* @throws IllegalStateException indicating this method was called on the main thread.
* @throws GooglePlayServicesNotAvailableException indicating that Google Play is not installed on this device.
* @throws GooglePlayServicesRepairableException indicating that there was a recoverable error connecting to Google Play Services.
*/
public static Info getAdvertisingIdInfo(Context context) {
// We don't actually implement this functionality, but always claim that ad tracking was limited by user preference
return new Info("00000000-0000-0000-0000-000000000000", true);
}
/**
* Includes both the advertising ID as well as the limit ad tracking setting.
*/
public static class Info {
private final String advertisingId;
private final boolean limitAdTrackingEnabled;
/**
* Constructs an {@code Info} Object with the specified advertising Id and limit ad tracking setting.
*
* @param advertisingId The advertising ID.
* @param limitAdTrackingEnabled The limit ad tracking setting. It is true if the user has limit ad tracking enabled. False, otherwise.
*/
public Info(String advertisingId, boolean limitAdTrackingEnabled) {
this.advertisingId = advertisingId;
this.limitAdTrackingEnabled = limitAdTrackingEnabled;
}
/**
* Retrieves the advertising ID.
*/
public String getId() {
return advertisingId;
}
/**
* Retrieves whether the user has limit ad tracking enabled or not.
* <p>
* When the returned value is true, the returned value of {@link #getId()} will always be
* {@code 00000000-0000-0000-0000-000000000000} starting with Android 12.
*/
public boolean isLimitAdTrackingEnabled() {
return limitAdTrackingEnabled;
}
}
}

View file

@ -0,0 +1,11 @@
/*
* SPDX-FileCopyrightText: 2022 microG Project Team
* SPDX-License-Identifier: CC-BY-4.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
/**
* Contains classes relating to the Android Advertising ID (AAID).
*/
package com.google.android.gms.ads.identifier;