Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 44 additions & 11 deletions play-services-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013-2017 microG Project Team
~ Copyright (C) 2013-2019 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.
Expand Down Expand Up @@ -417,18 +417,11 @@

<!-- microG custom UI -->

<!-- microG Settings shown in Launcher -->
<!-- microG Settings activity -->
<activity
android:name="org.microg.gms.ui.SettingsActivity"
android:icon="@mipmap/ic_microg_settings"
android:roundIcon="@mipmap/ic_microg_settings"
android:label="@string/gms_settings_name"
android:exported="true"
android:theme="@style/Theme.AppCompat.Settings.Dashboard">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.APPLICATION_PREFERENCES"/>
<category android:name="android.intent.category.DEFAULT"/>
Expand All @@ -437,19 +430,54 @@

<!-- microG Settings embedded in System Settings on SDK 23 and newer -->
<activity-alias
android:enabled="true"
android:exported="true"
android:name="org.microg.gms.ui.SettingsActivityLink"
android:targetActivity="org.microg.gms.ui.SettingsActivity"
android:icon="@drawable/microg_light_color_24"
android:label="@string/gms_settings_name"
android:theme="@style/Theme.AppCompat.Settings.Dashboard">
<intent-filter>
<action android:name="com.android.settings.action.EXTRA_SETTINGS"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<meta-data android:name="com.android.settings.category" android:value="com.android.settings.category.personal"/>
<meta-data android:name="com.android.settings.icon" android:resource="@drawable/microg_light_color_24"/>
</activity-alias>

<!-- microG Settings embedded in System Settings on SDK 26 and newer -->
<activity-alias
android:enabled="true"
android:exported="true"
android:name="org.microg.gms.ui.SettingsActivityIALink"
android:targetActivity="org.microg.gms.ui.SettingsActivity"
android:icon="@drawable/microg_light_color_24"
android:label="@string/gms_settings_name"
android:theme="@style/Theme.AppCompat.Settings.Dashboard">
<intent-filter>
<action android:name="com.android.settings.action.IA_SETTINGS"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<meta-data android:name="com.android.settings.category" android:value="com.android.settings.category.device"/>
<meta-data android:name="com.android.settings.category" android:value="com.android.settings.category.ia.homepage"/>
<meta-data android:name="com.android.settings.icon" android:resource="@drawable/microg_light_color_24"/>
<meta-data android:name="com.android.settings.summary" android:resource="@string/gms_settings_summary"/>
</activity-alias>

<!-- microG Settings activity-alias shown in Launcher -->
<activity-alias
android:enabled="true"
android:name="org.microg.gms.ui.SettingsActivityLauncher"
android:targetActivity="org.microg.gms.ui.SettingsActivity"
android:icon="@mipmap/ic_microg_settings"
android:roundIcon="@mipmap/ic_microg_settings"
android:label="@string/gms_settings_name"
android:theme="@style/Theme.AppCompat.Settings.Dashboard">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>

<activity
android:name="org.microg.gms.ui.AskPushPermission"
android:excludeFromRecents="true"
Expand Down Expand Up @@ -500,6 +528,11 @@
android:label="@string/self_check_title"
android:theme="@style/Theme.AppCompat.Settings"/>

<activity
android:name="org.microg.gms.ui.GoogleAccountFragment$AsActivity"
android:label="@string/pref_manage_accounts"
android:theme="@style/Theme.AppCompat.Settings"/>

<activity
android:name="org.microg.gms.ui.AccountSettingsActivity"
android:theme="@style/Theme.AppCompat.Settings">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
* Copyright (C) 2019 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.
*/

package org.microg.gms.ui;

import android.accounts.Account;
import android.accounts.AccountManager;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.preference.Preference;

import com.google.android.gms.R;

import org.microg.gms.auth.AuthConstants;
import org.microg.gms.auth.AuthManager;
import org.microg.tools.ui.ResourceSettingsFragment;
import org.microg.tools.ui.AbstractSettingsActivity;

import static android.accounts.AccountManager.PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE;
import static android.accounts.AccountManager.VISIBILITY_USER_MANAGED_NOT_VISIBLE;
import static android.accounts.AccountManager.VISIBILITY_USER_MANAGED_VISIBLE;
import static org.microg.gms.auth.AuthManager.PREF_AUTH_VISIBLE;

public class GoogleAccountFragment extends ResourceSettingsFragment {

public GoogleAccountFragment() {
preferencesResource = R.xml.preferences_google_account;
}

@Override
public void onCreatePreferencesFix(@Nullable Bundle savedInstanceState, String rootKey) {
super.onCreatePreferencesFix(savedInstanceState, rootKey);
Preference pref = findPreference(PREF_AUTH_VISIBLE);
if (pref != null) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
pref.setVisible(false);
} else {
pref.setOnPreferenceChangeListener((preference, newValue) -> {
if (newValue instanceof Boolean) {
AccountManager am = AccountManager.get(getContext());
for (Account account : am.getAccountsByType(AuthConstants.DEFAULT_ACCOUNT_TYPE)) {
am.setAccountVisibility(account, PACKAGE_NAME_KEY_LEGACY_NOT_VISIBLE, (Boolean) newValue ? VISIBILITY_USER_MANAGED_VISIBLE : VISIBILITY_USER_MANAGED_NOT_VISIBLE);
}
}
return true;
});
}
}
}

public static class AsActivity extends AbstractSettingsActivity {
public AsActivity() {
showHomeAsUp = true;
}

@Override
protected Fragment getFragment() {
return new GoogleAccountFragment();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
android:viewportWidth="256"
android:viewportHeight="256"
android:width="256dp"
android:height="256dp">
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">

<path
android:fillColor="#ffffffff" android:pathData="M207.03481 139.53168c0.42667 -3.41333 0.74667 -6.82666 0.74667 -10.45333 0 -3.62667 -0.32 -7.04 -0.74667 -10.45333l22.50667 -17.6c2.02667 -1.599996 2.56 -4.479996 1.28 -6.826666L209.48815 57.291687c-1.28 -2.346666 -4.16 -3.2 -6.50667 -2.346666l-26.56 10.666666c-5.54667 -4.266666 -11.52 -7.786666 -18.02667 -10.453333l-4.05333 -28.266667c-0.32 -2.56 -2.56 -4.48 -5.22667 -4.48h-42.66666c-2.66667 0 -4.90667 1.92 -5.22667 4.48l-4.053331 28.266667c-6.50667 2.666667 -12.48 6.293333 -18.02667 10.453333l-26.56 -10.666666c-2.45333 -0.96 -5.22667 0 -6.50667 2.346666l-21.33333 36.906667c-1.38667 2.34667 -0.74667 5.22667 1.28 6.826666l22.50667 17.6c-0.42667 3.41333 -0.74667 6.93333 -0.74667 10.45333 0 3.52 0.32 7.04 0.74667 10.45333l-22.50667 17.6c-2.02667 1.6 -2.56 4.48 -1.28 6.82667l21.33333 36.90667c1.28 2.34666 4.16 3.2 6.50667 2.34666l26.56 -10.66666c5.54667 4.26666 11.52 7.78666 18.02667 10.45333l4.053331 28.26667c0.32 2.56 2.56 4.48 5.22667 4.48h42.66666c2.66667 0 4.90667 -1.92 5.22667 -4.48l4.05333 -28.26667c6.50667 -2.66667 12.48 -6.29333 18.02667 -10.45333l26.56 10.66666c2.45333 0.96 5.22667 0 6.50667 -2.34666l21.33333 -36.90667c1.28 -2.34667 0.74667 -5.22667 -1.28 -6.82667z">
</path>
android:fillColor="#ffffffff"
android:pathData="M14.5335,0.0569535 L9.43985,0.0705542 C9.24288,0.102156,9.0985,0.18001,9.06273,0.352909 L8.55771,3.75569 C7.70454,4.01856,7.0852,4.47885,6.46902,4.94163 L3.48987,3.74936 C3.23326,3.67936,2.95937,3.47486,2.64004,3.95331 L0.0871706,8.21668 C0.0372893,8.41036,0.0580599,8.56989,0.145272,8.69686 L2.93012,10.8425 C2.83047,11.6279,2.86713,12.4355,2.90092,13.2426 L0.23227,15.219 C0.005066,15.4246,0.050044,15.7049,0.087127,15.8119 L2.78493,20.2165 C2.89848,20.3411,3.04458,20.3919,3.22668,20.3608 L6.49813,19.1434 C7.12487,19.6363,7.79275,20.0492,8.52873,20.3294 L8.99269,23.3505 C9.11365,23.56,9.09564,23.8073,9.4858,23.9434 L14.6784,23.9434 C14.8701,23.8649,15.0801,23.8217,15.1137,23.4353 L15.5776,20.2729 C16.4832,19.9372,17.01,19.5277,17.6663,19.1435 L20.7121,20.3576 C21.1885,20.4803,21.2695,20.2522,21.3504,20.16 L23.8741,15.8401 C23.9395,15.7104,23.9625,15.4495,23.787,15.2191 L21.1762,13.2708 C21.1953,12.4738,21.2347,11.6899,21.1762,10.8426 L23.874,8.72511 C23.996,8.49886,23.9302,8.24834,23.874,8.10387 L21.3214,3.92514 C21.1924,3.70382,20.9206,3.64557,20.7701,3.67097 L17.6082,4.94163 C16.8967,4.38465,16.2039,3.98905,15.5197,3.67097 L14.9974,0.395711 C14.9027,0.136848,14.7173,0.0991057,14.5334,0.0570135 Z M11.8718,5.62811 C13.7255,5.60431,15.517,6.32771,16.5932,7.54186 L14.7953,9.4995 C13.2639,8.11395,9.57199,7.53593,8.30443,11.1012 C7.82376,12.9227,8.54727,14.4138,10.0518,15.2852 C11.6506,16.1862,14.0977,15.4204,14.7343,14.7492 L16.6846,16.6771 C15.8496,17.3442,12.7132,19.81,8.67011,17.6858 C6.61824,16.5517,4.69843,14.6267,5.53146,10.4485 C6.00671,8.8177,7.06262,7.50059,8.60931,6.53345 C9.62512,5.92563,10.7596,5.64239,11.8718,5.62811 Z" />
</vector>
12 changes: 12 additions & 0 deletions play-services-core/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,28 @@ Dies kann einige Minuten dauern."</string>
<string name="pref_auth_trust_google_title">Vertraue Google bei App Rechten</string>
<string name="pref_auth_trust_google_summary">Wenn deaktiviert, wird der Nutzer gefragt bevor eine App Autorisierungsanfrage an Google geschickt wird. Einige Apps werden das Google Konto nicht nutzen können, wenn deaktiviert.</string>

<string name="pref_auth_visible_title">Apps erlauben Accounts zu finden</string>
<string name="pref_auth_visible_summary">Wenn aktiviert, können alle Applikationen auf diesem Gerät die E-Mail-Adresse des Google-Accounts sehen, ohne vorher um Erlaubnis zu fragen.</string>

<string name="pref_checkin_enable_summary">Registriert den Gerät zur Nutzung von Google-Diensten und erzeugt eine eindeutige Kennung. microG entfernt identifizierende Daten außer dem Namen des Google-Kontos.</string>

<string name="pref_more_settings">Mehr</string>

<string name="pref_add_account_title">Konto</string>
<string name="pref_add_account_summary">Google Konto hinzufügen</string>
<string name="pref_manage_accounts">Konten verwalten</string>
<string name="pref_manage_accounts_summary">Konten und Einstellungen verwalten</string>
<string name="pref_gcm_enable_mcs_summary">Google Cloud Messaging ist ein Push-Nachrichten-Dienst, der von vielen Apps genutzt wird. Zur Benutzung muss Geräte Check-In aktiviert werden.</string>
<string name="pref_gcm_apps_title">Apps die Cloud Messaging benutzen</string>
<string name="pref_gcm_confirm_new_apps_title">Neue Apps bestätigen</string>
<string name="pref_gcm_confirm_new_apps_summary">Frage nach bevor neue Apps sich für Push-Nachrichten registrieren</string>
<string name="pref_gcm_ping_interval">Ping-Intervall: <xliff:g example="10 Minuten">%1$s</xliff:g></string>
<string name="pref_gcm_apps_messaging">Benachrichtigungen</string>
<string name="pref_gcm_apps_messaging_title">App bei eingehender Benachrichtigungen starten</string>
<string name="pref_gcm_apps_messaging_summary">App im Hintergrund starten, um eingehende Benachrichtigungen zu erhalten. Deaktivierung kann Verzögerungen bei der Zustellung oder Verlust von Benachrichtigungen zur Folge haben.</string>
<string name="pref_gcm_apps_registration">Registrierung</string>
<string name="pref_gcm_apps_registration_title">Registrierung erlauben</string>
<string name="pref_gcm_apps_registration_summary">Der App erlauben sich für Benachrichtigungen zu registrieren.</string>
<string name="pref_about_title">Über microG Services Core</string>
<string name="pref_about_summary">Versionsinformation und genutzte Bibliotheken</string>

Expand Down
12 changes: 7 additions & 5 deletions play-services-core/src/main/res/values-ru/plurals.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,20 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<plurals name="pref_unifiednlp_summary">
<item quantity="one"><xliff:g example="1">%1$d</xliff:g> backend-программа сконфигурирована</item>
<item quantity="other"><xliff:g example="3">%1$d</xliff:g> backend-программ(ы) сконфигурировано</item>
<item quantity="few"><xliff:g example="3">%1$d</xliff:g> backend-программы сконфигурировано</item>
<item quantity="other"><xliff:g example="3">%1$d</xliff:g> backend-программ сконфигурировано</item>
</plurals>
<plurals name="gcm_registered_apps_counter">
<item quantity="one"><xliff:g example="1">%1$d</xliff:g> привязанное приложение</item>
<item quantity="few"><xliff:g example="123">%1$d</xliff:g> привязанных приложения</item>
<item quantity="other"><xliff:g example="123">%1$d</xliff:g> привязанных приложений</item>
</plurals>
<plurals name="cond_perm_summary">
<item quantity="one">Не предоставлено разрешение, которое требуется для правильного функционирования microG Service Core.</item>
<item quantity="other">Не предоставлены разрешения, которые требуются для правильного функционирования microG Service Core.</item>
<item quantity="one">Не предоставлено разрешение, которое требуется для правильного функционирования microG Service Core</item>
<item quantity="other">Не предоставлены разрешения, которые требуются для правильного функционирования microG Service Core</item>
</plurals>
<plurals name="cond_perm_action">
<item quantity="one">Запросить отсутствующее разрешение</item>
<item quantity="one">Запросить отсутствующее разрешение</item>
<item quantity="other">Запросить отсутствующие разрешения</item>
</plurals>
</resources>
</resources>
Loading