0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-11-30 23:23:01 +00:00

Make nearby module optional, move UI bits in own module

This commit is contained in:
Marvin W 2020-10-07 18:14:41 +02:00
parent 4486ff52ef
commit d0668d3c83
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
68 changed files with 593 additions and 214 deletions

View file

@ -0,0 +1,58 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
dependencies {
api project(':play-services-base')
// AndroidX UI
implementation "androidx.multidex:multidex:$multidexVersion"
implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation "androidx.mediarouter:mediarouter:$mediarouterVersion"
implementation "androidx.preference:preference:$preferenceVersion"
// Navigation
implementation "androidx.navigation:navigation-fragment:$navigationVersion"
implementation "androidx.navigation:navigation-ui:$navigationVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
}
android {
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
dataBinding {
enabled = true
}
sourceSets {
main {
java.srcDirs += 'src/main/kotlin'
}
}
lintOptions {
disable 'MissingTranslation'
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest package="org.microg.gms.base.core.ui">
<application />
</manifest>

View file

@ -12,7 +12,13 @@ import android.os.Build
import android.os.Bundle
import android.provider.Settings
import android.util.Log
import android.util.TypedValue
import android.view.View
import androidx.annotation.AttrRes
import androidx.annotation.ColorInt
import androidx.annotation.IdRes
import androidx.core.content.ContextCompat
import androidx.databinding.BindingAdapter
import androidx.navigation.NavController
import androidx.navigation.navOptions
import androidx.navigation.ui.R
@ -50,3 +56,15 @@ val Context.systemAnimationsEnabled: Boolean
}
return duration != 0f && transition != 0f
}
@ColorInt
fun Context.resolveColor(@AttrRes resid: Int): Int? {
val typedValue = TypedValue()
if (!theme.resolveAttribute(resid, typedValue, true)) return null
val colorRes = if (typedValue.resourceId != 0) typedValue.resourceId else typedValue.data
return ContextCompat.getColor(this, colorRes)
}
@BindingAdapter("app:backgroundColorAttr")
fun View.setBackgroundColorAttribute(@AttrRes resId: Int) = context.resolveColor(resId)?.let { setBackgroundColor(it) }

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Erweitert</string>
<string name="list_no_item_none">Keine</string>
<string name="list_item_see_all">Alle anzeigen</string>
<string name="open_app">Öffnen</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Avancé</string>
<string name="list_no_item_none">Aucun</string>
</resources>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Impostazioni avanzate</string>
<string name="list_no_item_none">Nessuna</string>
<string name="list_item_see_all">Mostra tutte</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Zaawansowane</string>
<string name="list_no_item_none">Brak</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Avançado</string>
<string name="list_no_item_none">Nenhum</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Дополнительно</string>
<string name="list_no_item_none">Пусто</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Напредно</string>
<string name="list_no_item_none">Ништа</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Додатково</string>
<string name="list_no_item_none">Порожньо</string>
</resources>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">進階</string>
<string name="list_no_item_none"></string>
</resources>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<style name="Theme.AppCompat.DayNight.Dialog.Alert.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
</resources>

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Advanced</string>
<string name="list_no_item_none">None</string>
<string name="list_item_see_all">See all</string>
<string name="open_app">Open</string>
</resources>

View file

@ -16,17 +16,19 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
configurations {
mapboxImplementation
vtmImplementation
withMapboxImplementation
withVtmImplementation
withNearbyImplementation
withoutNearbyImplementation
}
dependencies {
implementation "com.squareup.wire:wire-runtime:$wireVersion"
implementation "de.hdodenhof:circleimageview:1.3.0"
implementation "com.diogobernardino:williamchart:3.7.1"
implementation "org.conscrypt:conscrypt-android:2.1.0"
// TODO: Switch to upstream once raw requests are merged
// https://github.com/vitalidze/chromecast-java-api-v2/pull/99
@ -40,8 +42,10 @@ dependencies {
implementation project(':firebase-dynamic-links-api')
implementation project(':play-services-base-core')
implementation project(':play-services-base-core-ui')
implementation project(':play-services-location-core')
implementation project(':play-services-nearby-core')
withNearbyImplementation project(':play-services-nearby-core')
withNearbyImplementation project(':play-services-nearby-core-ui')
implementation project(':play-services-core-proto')
implementation project(':play-services-core:microg-ui-tools') // deprecated
implementation project(':play-services-api')
@ -50,8 +54,8 @@ dependencies {
implementation "org.microg:wearable:$wearableVersion"
implementation "org.microg.gms:remote-droid-guard:$remoteDroidGuardVersion"
mapboxImplementation project(':play-services-maps-core-mapbox')
vtmImplementation project(':play-services-maps-core-vtm')
withMapboxImplementation project(':play-services-maps-core-mapbox')
withVtmImplementation project(':play-services-maps-core-vtm')
// AndroidX UI
implementation "androidx.multidex:multidex:$multidexVersion"
@ -96,6 +100,12 @@ android {
main {
java.srcDirs += 'src/main/kotlin'
}
withNearby {
java.srcDirs += 'src/withNearby/kotlin'
}
withoutNearby {
java.srcDirs += 'src/withoutNearby/kotlin'
}
}
lintOptions {
@ -109,15 +119,22 @@ android {
}
}
flavorDimensions 'maps'
flavorDimensions 'maps', 'nearby'
productFlavors {
mapbox {
withMapbox {
dimension 'maps'
}
vtm {
withVtm {
dimension 'maps'
versionNameSuffix '-vtm'
}
withNearby {
dimension 'nearby'
}
withoutNearby {
dimension 'nearby'
versionNameSuffix '-noen'
}
}
compileOptions {

View file

@ -107,8 +107,6 @@
android:name="android.permission.UPDATE_APP_OPS_STATS"
tools:ignore="ProtectedPermissions" />
<uses-sdk tools:overrideLibrary="com.db.williamchart" />
<application
android:name="androidx.multidex.MultiDexApplication"
android:allowBackup="false"
@ -426,18 +424,6 @@
android:authorities="com.google.android.gms.chimera"
android:exported="true" />
<!-- microG custom UI -->
<activity
android:name="org.microg.gms.ui.ExposureNotificationsConfirmActivity"
android:exported="false"
android:process=":ui"
android:theme="@style/Theme.AppCompat.DayNight.Dialog.Alert.NoActionBar">
<intent-filter>
<action android:name="org.microg.gms.nearby.exposurenotification.CONFIRM" />
</intent-filter>
</activity>
<!-- microG Settings shown in Launcher -->
<activity
android:name="org.microg.gms.ui.SettingsActivity"

View file

@ -1,7 +1,6 @@
package org.microg.gms.ui;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.annotation.Nullable;
@ -13,8 +12,6 @@ import androidx.navigation.ui.NavigationUI;
import com.google.android.gms.R;
import org.microg.gms.nearby.exposurenotification.Constants;
public class SettingsActivity extends AppCompatActivity {
private AppBarConfiguration appBarConfiguration;
@ -27,9 +24,7 @@ public class SettingsActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
if (Constants.ACTION_EXPOSURE_NOTIFICATION_SETTINGS.equals(intent.getAction()) && intent.getData() == null) {
intent.setData(Uri.parse("x-gms-settings://exposure-notifications"));
}
NearbyPreferencesIntegration.Companion.preProcessSettingsIntent(intent);
setContentView(R.layout.settings_root_activity);

View file

@ -5,7 +5,6 @@
package org.microg.gms.ui
import android.os.Build
import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController
@ -14,7 +13,6 @@ import com.google.android.gms.R
import org.microg.gms.checkin.getCheckinServiceInfo
import org.microg.gms.gcm.GcmDatabase
import org.microg.gms.gcm.getGcmServiceInfo
import org.microg.gms.nearby.exposurenotification.getExposureNotificationsServiceInfo
import org.microg.gms.snet.getSafetyNetServiceInfo
import org.microg.nlp.client.UnifiedLocationClient
import org.microg.tools.ui.ResourceSettingsFragment
@ -40,7 +38,7 @@ class SettingsFragment : ResourceSettingsFragment() {
true
}
findPreference<Preference>(PREF_EXPOSURE)!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
findNavController().navigate(requireContext(), R.id.openExposureNotificationSettings)
findNavController().navigate(requireContext(), NearbyPreferencesIntegration.exposureNotificationNavigationId)
true
}
findPreference<Preference>(PREF_ABOUT)!!.onPreferenceClickListener = Preference.OnPreferenceClickListener {
@ -73,16 +71,8 @@ class SettingsFragment : ResourceSettingsFragment() {
val backendCount = UnifiedLocationClient[requireContext()].getLocationBackends().size + UnifiedLocationClient[requireContext()].getGeocoderBackends().size
findPreference<Preference>(PREF_UNIFIEDNLP)!!.summary = resources.getQuantityString(R.plurals.pref_unifiednlp_summary, backendCount, backendCount);
if (Build.VERSION.SDK_INT >= 21) {
findPreference<Preference>(PREF_EXPOSURE)!!.isVisible = true
if (getExposureNotificationsServiceInfo(requireContext()).configuration.enabled) {
findPreference<Preference>(PREF_EXPOSURE)!!.summary = getString(R.string.service_status_enabled_short)
} else {
findPreference<Preference>(PREF_EXPOSURE)!!.setSummary(R.string.service_status_disabled_short)
}
} else {
findPreference<Preference>(PREF_EXPOSURE)!!.isVisible = false
}
findPreference<Preference>(PREF_EXPOSURE)!!.isVisible = NearbyPreferencesIntegration.isAvailable
findPreference<Preference>(PREF_EXPOSURE)!!.summary = NearbyPreferencesIntegration.getExposurePreferenceSummary(requireContext())
}
companion object {

View file

@ -29,7 +29,7 @@
app:destination="@id/googleMoreFragment" />
<action
android:id="@+id/openExposureNotificationSettings"
app:destination="@id/exposureNotificationsFragment" />
app:destination="@id/nav_nearby" />
<action
android:id="@+id/openAbout"
app:destination="@id/aboutFragment" />
@ -100,38 +100,7 @@
android:label="@string/gms_settings_name" />
<include app:graph="@navigation/nav_unlp" />
<fragment
android:id="@+id/exposureNotificationsFragment"
android:name="org.microg.gms.ui.ExposureNotificationsFragment"
android:label="@string/service_name_exposure"
tools:layout="@layout/exposure_notifications_fragment">
<deepLink
app:action="com.google.android.gms.settings.EXPOSURE_NOTIFICATION_SETTINGS"
app:uri="x-gms-settings://exposure-notifications" />
<action
android:id="@+id/openExposureRpis"
app:destination="@id/exposureNotificationsRpisFragment" />
<action
android:id="@+id/openExposureAppDetails"
app:destination="@id/exposureNotificationsAppFragment" />
</fragment>
<fragment
android:id="@+id/exposureNotificationsRpisFragment"
android:name="org.microg.gms.ui.ExposureNotificationsRpisFragment"
android:label="@string/pref_exposure_collected_rpis_title" />
<fragment
android:id="@+id/exposureNotificationsAppFragment"
android:name="org.microg.gms.ui.ExposureNotificationsAppFragment"
android:label="@string/service_name_exposure"
tools:layout="@layout/exposure_notifications_app_fragment">
<argument
android:name="package"
app:argType="string" />
</fragment>
<include app:graph="@navigation/nav_nearby" />
<fragment
android:id="@+id/aboutFragment"

View file

@ -58,7 +58,6 @@ Dies kann einige Minuten dauern."</string>
<string name="service_name_checkin">Google Geräte-Registrierung</string>
<string name="service_name_mcs">Google Cloud Messaging</string>
<string name="service_name_snet">Google SafetyNet</string>
<string name="service_name_exposure">Exposure Notifications</string>
<string name="service_status_disabled">Deaktiviert</string>
<string name="service_status_enabled">Aktiviert</string>
@ -67,12 +66,6 @@ Dies kann einige Minuten dauern."</string>
<string name="service_status_enabled_short">Ein</string>
<string name="service_status_disabled_short">Aus</string>
<string name="menu_advanced">Erweitert</string>
<string name="list_no_item_none">Keine</string>
<string name="list_item_see_all">Alle anzeigen</string>
<string name="open_app">Öffnen</string>
<string name="games_title">Google Play Games</string>
<string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g> möchte Play Games benutzen</string>
<string name="games_info_content">Um Play Games zu nutzen, ist die Installation der Google Play Games App erforderlich. Diese App funktioniert eventuell auch ohne Play Games, verhält sich dabei unter Umständen aber ungewöhnlich.</string>
@ -145,38 +138,6 @@ Dies kann einige Minuten dauern."</string>
<string name="checkin_last_registration">Letzte Registierung: <xliff:g example="Yesterday, 02:20 PM">%1$s</xliff:g></string>
<string name="checkin_enable_switch">Gerät registrieren</string>
<string name="pref_exposure_enable_info_summary">Öffne eine App, die Exposure Notifications unterstützt, um diese zu aktivieren.</string>
<string name="prefcat_exposure_apps_title">Apps, die Exposure Notifications nutzen</string>
<string name="pref_exposure_collected_rpis_title">Gesammelte IDs</string>
<string name="pref_exposure_collected_rpis_summary"><xliff:g example="63">%1$d</xliff:g> IDs in den letzten 60 Minuten</string>
<string name="pref_exposure_advertising_id_title">Aktuell verwendete ID</string>
<string name="pref_exposure_app_checks_summary"><xliff:g example="5">%1$d</xliff:g> Prüfungen während der letzen 14 Tage</string>
<string name="pref_exposure_app_last_check_summary">Letzte Prüfung: <xliff:g example="3 hours ago">%1$s</xliff:g></string>
<string name="prefcat_exposure_rpis_histogram_title"><xliff:g example="230">%1$d</xliff:g> gesammelte IDs</string>
<string name="pref_exposure_rpi_delete_all_title">Alle gesammelten IDs löschen</string>
<string name="pref_exposure_info_summary">"Die Exposure Notifications API ermöglicht es Apps, dich zu warnen, falls du Kontakt zu einer positiv getesteten Person hattest.
Das Datum, die Zeitdauer und die Signalstärke, die dem Kontakt zugeordnet sind, werden mit der zugehörigen App geteilt."</string>
<string name="pref_exposure_rpis_details_summary">"Während die Exposure Notification API aktiviert ist, sammelt das Gerät passiv IDs (Rolling Proximity Identifiers bzw. RPIs) von Geräten in der Nähe.
Sobald die Eigentümer von Geräten positiv getestet wurden, können ihre IDs geteilt werden. Dein Gerät prüft, ob eine gespeicherte ID zu einer positiv getesteten Person gehört und berechnet das Infektionsrisiko."</string>
<string name="exposure_enable_switch">Exposure Notifications aktivieren</string>
<string name="exposure_confirm_start_title">Exposure Notifications aktivieren?</string>
<string name="exposure_confirm_start_summary">"Dein Smartphone benötigt Bluetooth, um IDs von anderen Personen sicher zu teilen und zu speichern.
<xliff:g example="Corona-Warn">%1$s</xliff:g> kann dich benachrichtigen, falls du Kontakt zu einer positiv getesteten Person hattest.
Das Datum, die Zeitdauer und die Signalstärke, die einem Kontakt zugeordnet wurden werden mit der App geteilt."</string>
<string name="exposure_confirm_start_button">Einschalten</string>
<string name="exposure_confirm_stop_title">Exposure Notifications deaktivieren?</string>
<string name="exposure_confirm_stop_summary">Nach dem Deaktivieren wirst du nicht mehr benachrichtigt, falls du Kontakt mit einer positiv getesteten Person hattest.</string>
<string name="exposure_confirm_stop_button">Deaktivieren</string>
<string name="exposure_confirm_keys_title">IDs mit <xliff:g example="Corona-Warn">%1$s</xliff:g> teilen?</string>
<string name="exposure_confirm_keys_summary">"Deine IDs der letzten Tage werden genutzt, um Nutzer, die in den letzten 14 Tagen mit dir Kontakt hatten, zu benachrichtigen.
Deine Identität oder das Testergebnis werden nicht geteilt."</string>
<string name="exposure_confirm_keys_button">Teilen</string>
<!-- test -->
<string name="pref_info_status">Status</string>
<string name="pref_more_settings">Mehr</string>

View file

@ -54,9 +54,6 @@ Ceci peut prendre plusieurs minutes."</string>
<string name="service_status_automatic">Automatique</string>
<string name="service_status_manual">Manuel</string>
<string name="menu_advanced">Avancé</string>
<string name="list_no_item_none">Aucun</string>
<string name="games_title">Google Play Jeux</string>
<string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g> voudrait utiliser Play Jeux</string>
<string name="games_info_content">Pour utiliser Play Jeux il est requis dinstaller lapplication Google Play Jeux. Lapplication peut poursuivre sans Play Jeux, mais il est possible quelle se comporte de manière imprévue.</string>

View file

@ -66,10 +66,6 @@ Questa operazione può richiedere alcuni minuti."</string>
<string name="service_status_enabled_short">Abilitato</string>
<string name="service_status_disabled_short">Disabilitato</string>
<string name="menu_advanced">Impostazioni avanzate</string>
<string name="list_no_item_none">Nessuna</string>
<string name="list_item_see_all">Mostra tutte</string>
<string name="games_title">Google Play Giochi</string>
<string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g> vorrebbe utilizzare Play Giochi</string>
<string name="games_info_content">Per usare Play Giochi è necessario installare l\'applicazione di Play Giochi. L\'applicazione può continuare ad essere utilizzata senza Play Giochi, ma è possibile che funzioni in modo anomalo.</string>

View file

@ -54,9 +54,6 @@ To zajmie kilka minut.</string>
<string name="service_status_automatic">Automatyczny</string>
<string name="service_status_manual">Ręczny</string>
<string name="menu_advanced">Zaawansowane</string>
<string name="list_no_item_none">Brak</string>
<string name="games_title">Gry Google Play</string>
<string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g> chce wykorzystać Gry Google Play</string>
<string name="games_info_content">Aby korzystać z gier Google Play wymagana jest instalacja aplikacji Gry Google Play . Aplikacja może dalej działać bez Gry Google Play, ale możliwe, że nie będzie działać prawidłowo.</string>

View file

@ -47,8 +47,6 @@ Isso pode demorar alguns minutos."</string>
<string name="service_name_checkin">Registro de dispositivo do Google</string>
<string name="service_name_mcs">Google Cloud Messaging</string>
<string name="menu_advanced">Avançado</string>
<string name="list_no_item_none">Nenhum</string>
<string name="games_title">Google Play Games</string>
<string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g> gostaria de usar Play Games</string>

View file

@ -61,9 +61,6 @@
<string name="service_status_enabled">Активно</string>
<string name="service_status_automatic">Автоматически</string>
<string name="service_status_manual">Руководство</string>
<string name="menu_advanced">Дополнительно</string>
<string name="list_no_item_none">Пусто</string>
<string name="games_title">Google Play Игры</string>
<string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g> хочет использовать Play Игры</string>

View file

@ -47,8 +47,6 @@
<string name="service_name_checkin">Пријава уређаја на Гугл</string>
<string name="service_name_mcs">Гуглове облак поруке</string>
<string name="menu_advanced">Напредно</string>
<string name="list_no_item_none">Ништа</string>
<string name="games_title">Гугл Плеј игре</string>
<string name="games_info_title">%1$s жели да користи Плеј игре</string>

View file

@ -61,9 +61,6 @@
<string name="service_status_automatic">Автоматично</string>
<string name="service_status_manual">Вручну</string>
<string name="menu_advanced">Додатково</string>
<string name="list_no_item_none">Порожньо</string>
<string name="games_title">Ігри Google Play</string>
<string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g> бажає використовувати Play ігри</string>
<string name="games_info_content">Для використання можливостей Play Games, необхідно встановити додаток Google Play Games. Додаток може працювати і без нього, але можливі проблеми під час роботи.</string>

View file

@ -47,8 +47,6 @@
<string name="service_name_checkin">註冊為Google設備</string>
<string name="service_name_mcs">Google雲端訊息(GCM)</string>
<string name="menu_advanced">進階</string>
<string name="list_no_item_none"></string>
<string name="games_title">Google Play遊戲</string>
<string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g>將要使用Play遊戲</string>

View file

@ -32,8 +32,4 @@
<item quantity="one">Request missing permission</item>
<item quantity="other">Request missing permissions</item>
</plurals>
<plurals name="pref_exposure_app_last_report_summary">
<item quantity="one">Last report: <xliff:g example="1">%1$d</xliff:g> match, <xliff:g example="3">%2$d</xliff:g> days ago</item>
<item quantity="other">Last report: <xliff:g example="2">%1$d</xliff:g> matches, latest <xliff:g example="3">%2$d</xliff:g> days ago</item>
</plurals>
</resources>

View file

@ -58,7 +58,6 @@ This can take a couple of minutes."</string>
<string name="service_name_checkin">Google device registration</string>
<string name="service_name_mcs">Google Cloud Messaging</string>
<string name="service_name_snet">Google SafetyNet</string>
<string name="service_name_exposure">Exposure Notifications</string>
<string name="service_status_disabled">Disabled</string>
<string name="service_status_enabled">Enabled</string>
@ -67,12 +66,6 @@ This can take a couple of minutes."</string>
<string name="service_status_enabled_short">On</string>
<string name="service_status_disabled_short">Off</string>
<string name="menu_advanced">Advanced</string>
<string name="list_no_item_none">None</string>
<string name="list_item_see_all">See all</string>
<string name="open_app">Open</string>
<string name="games_title">Google Play Games</string>
<string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g> would like to use Play Games</string>
<string name="games_info_content">To use Play Games it is required to install the Google Play Games app. The application might continue without Play Games, but it is possible that it will behave unexpectedly.</string>
@ -146,39 +139,6 @@ This can take a couple of minutes."</string>
<string name="checkin_last_registration">Last registration: <xliff:g example="Yesterday, 02:20 PM">%1$s</xliff:g></string>
<string name="checkin_enable_switch">Register device</string>
<string name="pref_exposure_enable_info_summary">To enable Exposure Notifications, open any app supporting it.</string>
<string name="prefcat_exposure_apps_title">Apps using Exposure Notifications</string>
<string name="pref_exposure_collected_rpis_title">Collected IDs</string>
<string name="pref_exposure_collected_rpis_summary"><xliff:g example="63">%1$d</xliff:g> IDs in last hour</string>
<string name="pref_exposure_advertising_id_title">Currently broadcasted ID</string>
<string name="pref_exposure_app_checks_summary"><xliff:g example="5">%1$d</xliff:g> checks in past 14 days</string>
<string name="pref_exposure_app_last_check_summary">Last check: <xliff:g example="3 hours ago">%1$s</xliff:g></string>
<string name="prefcat_exposure_rpis_histogram_title"><xliff:g example="230">%1$d</xliff:g> IDs collected</string>
<string name="pref_exposure_rpi_delete_all_title">Delete all collected IDs</string>
<string name="pref_exposure_info_summary">"Exposure Notifications API allows apps to notify you if you were exposed to someone who reported to be diagnosed positive.
The date, duration, and signal strength associated with an exposure will be shared with the corresponding app."</string>
<string name="pref_exposure_rpis_details_summary">"While Exposure Notification API is enabled, your device passively collects IDs (called Rolling Proximity Identifiers, or RPIs) from nearby devices.
When device owners report to be diagnosed positive, their IDs can be shared. Your device checks if any of the known diagnosed IDs matches any of the collected IDs and calculates your infection risk."</string>
<string name="exposure_enable_switch">Use Exposure Notifications</string>
<string name="exposure_confirm_start_title">Turn on Exposure Notifications?</string>
<string name="exposure_confirm_start_summary">"Your phone needs to use Bluetooth to securely collect and share IDs with other phones that are nearby.
<xliff:g example="Corona-Warn">%1$s</xliff:g> can notify you if you were exposed to someone who reported to be diagnosed positive.
The date, duration, and signal strength associated with an exposure will be shared with the app."</string>
<string name="exposure_confirm_start_button">Turn on</string>
<string name="exposure_confirm_stop_title">Turn off Exposure Notifications?</string>
<string name="exposure_confirm_stop_summary">After disabling Exposure Notifications, you will no longer be notified when you were exposed to someone who reported to be diagnosed positive.</string>
<string name="exposure_confirm_stop_button">Turn off</string>
<string name="exposure_confirm_keys_title">Share your IDs with <xliff:g example="Corona-Warn">%1$s</xliff:g>?</string>
<string name="exposure_confirm_keys_summary">"Your IDs from the last 14 days will be used to help notify others that you&apos;ve been near about potential exposure.
Your identity or test result won&apos;t be shared with other people."</string>
<string name="exposure_confirm_keys_button">Share</string>
<string name="pref_info_status">Status</string>
<string name="pref_more_settings">More</string>

View file

@ -16,11 +16,6 @@
<resources>
<style name="Theme.AppCompat.DayNight.Dialog.Alert.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
<style name="Theme.LoginBlue" parent="Theme.LoginBlue.Base" />
<style name="Theme.LoginBlue.Base" parent="Theme.AppCompat.Light">

View file

@ -65,7 +65,8 @@
<Preference
android:icon="@drawable/ic_virus_outline"
android:key="pref_exposure"
android:title="@string/service_name_exposure" />
android:title="@string/service_name_exposure"
app:isPreferenceVisible="false" />
</PreferenceCategory>
<PreferenceCategory android:layout="@layout/preference_category_no_label">
<Preference

View file

@ -0,0 +1,33 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
import android.content.Context
import android.content.Intent
import android.net.Uri
import com.google.android.gms.R
import org.microg.gms.nearby.exposurenotification.Constants
import org.microg.gms.nearby.exposurenotification.getExposureNotificationsServiceInfo
interface NearbyPreferencesIntegration {
companion object {
suspend fun getExposurePreferenceSummary(context: Context): String = if (isAvailable && getExposureNotificationsServiceInfo(context).configuration.enabled) {
context.getString(R.string.service_status_enabled_short)
} else {
context.getString(R.string.service_status_disabled_short)
}
fun preProcessSettingsIntent(intent: Intent) {
if (Constants.ACTION_EXPOSURE_NOTIFICATION_SETTINGS == intent.action && intent.data == null) {
intent.data = Uri.parse("x-gms-settings://exposure-notifications")
}
}
val isAvailable: Boolean = android.os.Build.VERSION.SDK_INT >= 21
const val exposureNotificationNavigationId: Int = R.id.openExposureNotificationSettings
}
}

View file

@ -0,0 +1,19 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
import android.content.Context
import android.content.Intent
import com.google.android.gms.R
interface NearbyPreferencesIntegration {
companion object {
suspend fun getExposurePreferenceSummary(context: Context): String = context.getString(R.string.service_status_disabled_short)
fun preProcessSettingsIntent(intent: Intent) {}
const val exposureNotificationNavigationId: Int = 0
const val isAvailable: Boolean = false
}
}

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_nearby">
</navigation>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="service_name_exposure">Exposure Notifications</string>
</resources>

View file

@ -0,0 +1,60 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
dependencies {
implementation project(':play-services-nearby-core')
implementation project(':play-services-base-core-ui')
implementation "com.diogobernardino:williamchart:3.7.1"
// AndroidX UI
implementation "androidx.multidex:multidex:$multidexVersion"
implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation "androidx.preference:preference:$preferenceVersion"
// Navigation
implementation "androidx.navigation:navigation-fragment:$navigationVersion"
implementation "androidx.navigation:navigation-ui:$navigationVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
}
android {
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
dataBinding {
enabled = true
}
sourceSets {
main {
java.srcDirs = ['src/main/kotlin']
}
}
lintOptions {
disable 'MissingTranslation'
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.microg.gms.nearby.core.ui">
<uses-sdk tools:overrideLibrary="com.db.williamchart" />
<application>
<activity
android:name="org.microg.gms.nearby.core.ui.ExposureNotificationsConfirmActivity"
android:exported="false"
android:process=":ui"
android:theme="@style/Theme.AppCompat.DayNight.Dialog.Alert.NoActionBar">
<intent-filter>
<action android:name="org.microg.gms.nearby.exposurenotification.CONFIRM" />
</intent-filter>
</activity>
</application>
</manifest>

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
package org.microg.gms.nearby.core.ui
import android.content.Context
import android.util.AttributeSet
@ -11,7 +11,6 @@ import androidx.preference.Preference
import androidx.preference.PreferenceViewHolder
import com.db.williamchart.data.Scale
import com.db.williamchart.view.BarChartView
import com.google.android.gms.R
class BarChartPreference : Preference {
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
package org.microg.gms.nearby.core.ui
import android.content.Intent
import android.net.Uri
@ -15,10 +15,8 @@ import android.view.ViewGroup
import androidx.appcompat.content.res.AppCompatResources
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import com.google.android.gms.R
import com.google.android.gms.databinding.ExposureNotificationsAppFragmentBinding
import com.google.android.gms.databinding.ExposureNotificationsFragmentBinding
import org.microg.gms.nearby.exposurenotification.ExposurePreferences
import org.microg.gms.nearby.core.ui.databinding.ExposureNotificationsAppFragmentBinding
import org.microg.gms.ui.getApplicationInfoIfExists
class ExposureNotificationsAppFragment : Fragment(R.layout.exposure_notifications_app_fragment) {
private lateinit var binding: ExposureNotificationsAppFragmentBinding

View file

@ -3,15 +3,13 @@
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
package org.microg.gms.nearby.core.ui
import android.content.Intent
import android.os.Bundle
import android.text.format.DateUtils
import android.util.JsonReader
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import com.google.android.gms.R
import org.json.JSONObject
import org.microg.gms.nearby.exposurenotification.ExposureDatabase
import java.util.concurrent.TimeUnit

View file

@ -3,15 +3,16 @@
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
package org.microg.gms.nearby.core.ui
import android.os.Bundle
import android.os.ResultReceiver
import android.widget.Button
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
import com.google.android.gms.R
import org.microg.gms.nearby.core.ui.R
import org.microg.gms.nearby.exposurenotification.*
import org.microg.gms.ui.getApplicationInfoIfExists
class ExposureNotificationsConfirmActivity : AppCompatActivity() {
private var resultCode: Int = RESULT_CANCELED

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
package org.microg.gms.nearby.core.ui
import android.os.Bundle
import android.view.LayoutInflater
@ -11,11 +11,12 @@ import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import com.google.android.gms.R
import com.google.android.gms.databinding.ExposureNotificationsFragmentBinding
import org.microg.gms.nearby.core.ui.R
import org.microg.gms.nearby.core.ui.databinding.ExposureNotificationsFragmentBinding
import org.microg.gms.nearby.exposurenotification.ServiceInfo
import org.microg.gms.nearby.exposurenotification.getExposureNotificationsServiceInfo
import org.microg.gms.nearby.exposurenotification.setExposureNotificationsServiceConfiguration
import org.microg.gms.ui.PreferenceSwitchBarCallback
class ExposureNotificationsFragment : Fragment(R.layout.exposure_notifications_fragment) {
private lateinit var binding: ExposureNotificationsFragmentBinding

View file

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
package org.microg.gms.nearby.core.ui
import android.os.Bundle
import android.os.Handler
@ -13,11 +13,13 @@ import androidx.navigation.fragment.findNavController
import androidx.preference.Preference
import androidx.preference.PreferenceCategory
import androidx.preference.PreferenceFragmentCompat
import com.google.android.gms.R
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.microg.gms.nearby.exposurenotification.ExposureDatabase
import org.microg.gms.nearby.exposurenotification.getExposureNotificationsServiceInfo
import org.microg.gms.ui.AppIconPreference
import org.microg.gms.ui.getApplicationInfoIfExists
import org.microg.gms.ui.navigate
class ExposureNotificationsPreferencesFragment : PreferenceFragmentCompat() {
private lateinit var exposureEnableInfo: Preference

View file

@ -3,18 +3,15 @@
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.ui
package org.microg.gms.nearby.core.ui
import android.annotation.TargetApi
import android.icu.text.DateFormat.getDateInstance
import android.os.Bundle
import android.text.format.DateFormat
import android.text.format.DateUtils
import androidx.lifecycle.lifecycleScope
import androidx.preference.PreferenceCategory
import androidx.preference.PreferenceFragmentCompat
import com.db.williamchart.data.Scale
import com.google.android.gms.R
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.microg.gms.nearby.exposurenotification.ExposureDatabase

View file

@ -0,0 +1,14 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.nearby.core.ui
import android.view.View
import androidx.annotation.AttrRes
import androidx.databinding.BindingAdapter
import org.microg.gms.ui.resolveColor
@BindingAdapter("app:backgroundColorAttr")
fun View.setBackgroundColorAttribute(@AttrRes resId: Int) = context.resolveColor(resId)?.let { setBackgroundColor(it) }

View file

@ -20,7 +20,7 @@
<variable
name="callbacks"
type="org.microg.gms.ui.ExposureNotificationsAppFragmentCallbacks" />
type="org.microg.gms.nearby.core.ui.ExposureNotificationsAppFragmentCallbacks" />
</data>
<LinearLayout
@ -74,7 +74,7 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/sub_preferences"
android:name="org.microg.gms.ui.ExposureNotificationsAppPreferencesFragment"
android:name="org.microg.gms.nearby.core.ui.ExposureNotificationsAppPreferencesFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>

View file

@ -5,8 +5,7 @@
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
@ -33,9 +32,9 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/sub_preferences"
android:name="org.microg.gms.ui.ExposureNotificationsPreferencesFragment"
android:name="org.microg.gms.nearby.core.ui.ExposureNotificationsPreferencesFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
android:layout_weight="1" />
</LinearLayout>
</layout>

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_nearby"
app:startDestination="@id/exposureNotificationsFragment"
tools:ignore="UnusedNavigation">
<fragment
android:id="@+id/exposureNotificationsFragment"
android:name="org.microg.gms.nearby.core.ui.ExposureNotificationsFragment"
android:label="@string/service_name_exposure"
tools:layout="@layout/exposure_notifications_fragment">
<deepLink
app:action="com.google.android.gms.settings.EXPOSURE_NOTIFICATION_SETTINGS"
app:uri="x-gms-settings://exposure-notifications" />
<action
android:id="@+id/openExposureRpis"
app:destination="@id/exposureNotificationsRpisFragment" />
<action
android:id="@+id/openExposureAppDetails"
app:destination="@id/exposureNotificationsAppFragment" />
</fragment>
<fragment
android:id="@+id/exposureNotificationsRpisFragment"
android:name="org.microg.gms.nearby.core.ui.ExposureNotificationsRpisFragment"
android:label="@string/pref_exposure_collected_rpis_title" />
<fragment
android:id="@+id/exposureNotificationsAppFragment"
android:name="org.microg.gms.nearby.core.ui.ExposureNotificationsAppFragment"
android:label="@string/service_name_exposure"
tools:layout="@layout/exposure_notifications_app_fragment">
<argument
android:name="package"
app:argType="string" />
</fragment>
</navigation>

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="service_name_exposure">Exposure Notifications</string>
<string name="pref_exposure_enable_info_summary">Öffne eine App, die Exposure Notifications unterstützt, um diese zu aktivieren.</string>
<string name="prefcat_exposure_apps_title">Apps, die Exposure Notifications nutzen</string>
<string name="pref_exposure_collected_rpis_title">Gesammelte IDs</string>
<string name="pref_exposure_collected_rpis_summary"><xliff:g example="63">%1$d</xliff:g> IDs in den letzten 60 Minuten</string>
<string name="pref_exposure_advertising_id_title">Aktuell verwendete ID</string>
<string name="pref_exposure_app_checks_summary"><xliff:g example="5">%1$d</xliff:g> Prüfungen während der letzen 14 Tage</string>
<string name="pref_exposure_app_last_check_summary">Letzte Prüfung: <xliff:g example="3 hours ago">%1$s</xliff:g></string>
<string name="prefcat_exposure_rpis_histogram_title"><xliff:g example="230">%1$d</xliff:g> gesammelte IDs</string>
<string name="pref_exposure_rpi_delete_all_title">Alle gesammelten IDs löschen</string>
<string name="pref_exposure_info_summary">"Die Exposure Notifications API ermöglicht es Apps, dich zu warnen, falls du Kontakt zu einer positiv getesteten Person hattest.
Das Datum, die Zeitdauer und die Signalstärke, die dem Kontakt zugeordnet sind, werden mit der zugehörigen App geteilt."</string>
<string name="pref_exposure_rpis_details_summary">"Während die Exposure Notification API aktiviert ist, sammelt das Gerät passiv IDs (Rolling Proximity Identifiers bzw. RPIs) von Geräten in der Nähe.
Sobald die Eigentümer von Geräten positiv getestet wurden, können ihre IDs geteilt werden. Dein Gerät prüft, ob eine gespeicherte ID zu einer positiv getesteten Person gehört und berechnet das Infektionsrisiko."</string>
<string name="exposure_enable_switch">Exposure Notifications aktivieren</string>
<string name="exposure_confirm_start_title">Exposure Notifications aktivieren?</string>
<string name="exposure_confirm_start_summary">"Dein Smartphone benötigt Bluetooth, um IDs von anderen Personen sicher zu teilen und zu speichern.
<xliff:g example="Corona-Warn">%1$s</xliff:g> kann dich benachrichtigen, falls du Kontakt zu einer positiv getesteten Person hattest.
Das Datum, die Zeitdauer und die Signalstärke, die einem Kontakt zugeordnet wurden werden mit der App geteilt."</string>
<string name="exposure_confirm_start_button">Einschalten</string>
<string name="exposure_confirm_stop_title">Exposure Notifications deaktivieren?</string>
<string name="exposure_confirm_stop_summary">Nach dem Deaktivieren wirst du nicht mehr benachrichtigt, falls du Kontakt mit einer positiv getesteten Person hattest.</string>
<string name="exposure_confirm_stop_button">Deaktivieren</string>
<string name="exposure_confirm_keys_title">IDs mit <xliff:g example="Corona-Warn">%1$s</xliff:g> teilen?</string>
<string name="exposure_confirm_keys_summary">"Deine IDs der letzten Tage werden genutzt, um Nutzer, die in den letzten 14 Tagen mit dir Kontakt hatten, zu benachrichtigen.
Deine Identität oder das Testergebnis werden nicht geteilt."</string>
<string name="exposure_confirm_keys_button">Teilen</string>
</resources>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2017 microG Project Team
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<plurals name="pref_exposure_app_last_report_summary">
<item quantity="one">Last report: <xliff:g example="1">%1$d</xliff:g> match, <xliff:g example="3">%2$d</xliff:g> days ago</item>
<item quantity="other">Last report: <xliff:g example="2">%1$d</xliff:g> matches, latest <xliff:g example="3">%2$d</xliff:g> days ago</item>
</plurals>
</resources>

View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2013-2017 microG Project Team
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="service_name_exposure">Exposure Notifications</string>
<string name="pref_exposure_enable_info_summary">To enable Exposure Notifications, open any app supporting it.</string>
<string name="prefcat_exposure_apps_title">Apps using Exposure Notifications</string>
<string name="pref_exposure_collected_rpis_title">Collected IDs</string>
<string name="pref_exposure_collected_rpis_summary"><xliff:g example="63">%1$d</xliff:g> IDs in last hour</string>
<string name="pref_exposure_advertising_id_title">Currently broadcasted ID</string>
<string name="pref_exposure_app_checks_summary"><xliff:g example="5">%1$d</xliff:g> checks in past 14 days</string>
<string name="pref_exposure_app_last_check_summary">Last check: <xliff:g example="3 hours ago">%1$s</xliff:g></string>
<string name="prefcat_exposure_rpis_histogram_title"><xliff:g example="230">%1$d</xliff:g> IDs collected</string>
<string name="pref_exposure_rpi_delete_all_title">Delete all collected IDs</string>
<string name="pref_exposure_info_summary">"Exposure Notifications API allows apps to notify you if you were exposed to someone who reported to be diagnosed positive.
The date, duration, and signal strength associated with an exposure will be shared with the corresponding app."</string>
<string name="pref_exposure_rpis_details_summary">"While Exposure Notification API is enabled, your device passively collects IDs (called Rolling Proximity Identifiers, or RPIs) from nearby devices.
When device owners report to be diagnosed positive, their IDs can be shared. Your device checks if any of the known diagnosed IDs matches any of the collected IDs and calculates your infection risk."</string>
<string name="exposure_enable_switch">Use Exposure Notifications</string>
<string name="exposure_confirm_start_title">Turn on Exposure Notifications?</string>
<string name="exposure_confirm_start_summary">"Your phone needs to use Bluetooth to securely collect and share IDs with other phones that are nearby.
<xliff:g example="Corona-Warn">%1$s</xliff:g> can notify you if you were exposed to someone who reported to be diagnosed positive.
The date, duration, and signal strength associated with an exposure will be shared with the app."</string>
<string name="exposure_confirm_start_button">Turn on</string>
<string name="exposure_confirm_stop_title">Turn off Exposure Notifications?</string>
<string name="exposure_confirm_stop_summary">After disabling Exposure Notifications, you will no longer be notified when you were exposed to someone who reported to be diagnosed positive.</string>
<string name="exposure_confirm_stop_button">Turn off</string>
<string name="exposure_confirm_keys_title">Share your IDs with <xliff:g example="Corona-Warn">%1$s</xliff:g>?</string>
<string name="exposure_confirm_keys_summary">"Your IDs from the last 14 days will be used to help notify others that you&apos;ve been near about potential exposure.
Your identity or test result won&apos;t be shared with other people."</string>
<string name="exposure_confirm_keys_button">Share</string>
</resources>

View file

@ -9,7 +9,7 @@
<PreferenceCategory
android:key="prefcat_exposure_rpi_histogram"
tools:title="@string/prefcat_exposure_rpis_histogram_title">
<org.microg.gms.ui.BarChartPreference
<org.microg.gms.nearby.core.ui.BarChartPreference
android:key="pref_exposure_rpi_histogram"
tools:layout="@layout/preference_bar_chart" />
</PreferenceCategory>

View file

@ -26,6 +26,9 @@ include ':play-services-maps-core-vtm'
include ':play-services-maps-core-vtm:vtm-microg-theme'
include ':play-services-nearby-core'
include ':play-services-base-core-ui'
include ':play-services-nearby-core-ui'
include ':play-services-core:microg-ui-tools' // Legacy
include ':play-services-core'