Commit 0163eb74 authored by Romain Hunault's avatar Romain Hunault
Browse files

Merge tag 'v0.2.17.204714' into merge-v0.2.17.204714

parents 0c3ac354 baf890cf
Pipeline #96162 passed with stage
in 8 minutes and 36 seconds
name: Build
on: [pull_request, push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: ./gradlew --no-daemon build
env:
TERM: dumb
JAVA_OPTS: -Xmx2048m
[submodule "extern/Wearable"]
path = extern/Wearable
url = https://gitlab.e.foundation/e/apps/Wearable
branch = dev
[submodule "extern/RemoteDroidGuard"]
path = extern/RemoteDroidGuard
url = https://gitlab.e.foundation/e/apps/android_packages_apps_RemoteDroidGuard
branch = dev
language: java
jdk: openjdk8
install:
- mkdir $HOME/android-cmdline-tools
- curl https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip > $HOME/android-cmdline-tools/cmdline-tools.zip
- unzip -qq -n $HOME/android-cmdline-tools/cmdline-tools.zip -d $HOME/android-cmdline-tools
- echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'platform-tools'
- echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'build-tools;29.0.3'
- echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'platforms;android-30'
env:
- ANDROID_HOME=$HOME/android-sdk TERM=dumb JAVA_OPTS="-Xmx2048m"
before_script:
- echo sdk.dir $ANDROID_HOME > local.properties
script:
- ./gradlew --no-daemon build
<img src="http://i.imgur.com/hXY4lcC.png" height="42px" alt="microG" /> Services Core (GmsCore)
=======
[![Build Status](https://travis-ci.com/microg/GmsCore.svg?branch=master)](https://travis-ci.com/microg/GmsCore)
[![Build Status](https://github.com/microg/GmsCore/workflows/Build/badge.svg)](https://travis-ci.com/microg/GmsCore)
microG GmsCore is a FLOSS (Free/Libre Open Source Software) framework to allow applications designed for Google Play Services to run on systems, where Play Services is not available.
......
......@@ -57,7 +57,7 @@ def execResult(...args) {
return stdout.toString().trim()
}
def gmsVersion = "20.47.13"
def gmsVersion = "20.47.14"
def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', ''))
def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0', '--match=v[0-9]*').substring(1)
def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD"))
......
Subproject commit 04a68eb65a861bb9e62dd3558bbf4d0d4d9a7c67
Subproject commit 617a43e139c6470361e44015bf1964026f3107e7
<?xml version="1.0" encoding="utf-8"?>
<!--
~ SPDX-FileCopyrightText: 2020, microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<resources>
<string name="menu_advanced">Avanzado</string>
<string name="list_no_item_none">Ninguno</string>
<string name="list_item_see_all">Ver todo</string>
<string name="open_app">Abrir</string>
</resources>
<?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="foreground_service_notification_title">Фонавая актыўнасць</string>
<string name="foreground_service_notification_text"><xliff:g example="Exposure Notification">%1$s</xliff:g> працуе ў фонавым рэжыме.</string>
<string name="foreground_service_notification_big_text">Адключыце эканомію выкарыстання акумулятара для <xliff:g example="microG Services Core">%1$s</xliff:g>, каб ўбраць гэтае паведамленне.</string>
</resources>
<?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="foreground_service_notification_title">Фоновая активность</string>
<string name="foreground_service_notification_text"><xliff:g example="Exposure Notification">%1$s</xliff:g> работает в фоновом режиме.</string>
<string name="foreground_service_notification_big_text">Отключите экономию заряда батареи для <xliff:g example="microG Services Core">%1$s</xliff:g>, чтобы убрать это уведомление.</string>
</resources>
......@@ -55,7 +55,7 @@ public class GoogleApiAvailability {
/**
* Google Play services client library version (declared in library's AndroidManifest.xml android:versionCode).
*/
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = Constants.MAX_REFERENCE_VERSION;
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = Constants.GMS_VERSION_CODE;
private static GoogleApiAvailability instance;
......
......@@ -52,7 +52,7 @@ public class GooglePlayServicesUtil {
* Google Play services client library version (declared in library's AndroidManifest.xml android:versionCode).
*/
@Deprecated
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = Constants.MAX_REFERENCE_VERSION;
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = Constants.GMS_VERSION_CODE;
/**
* Package name for Google Play Store.
......
......@@ -40,6 +40,7 @@ android {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
buildConfigField "int", "VERSION_CODE", "$appVersionCode"
}
sourceSets {
......
......@@ -60,12 +60,12 @@ public class GetServiceRequest extends AutoSafeParcelable {
private GetServiceRequest() {
serviceId = -1;
gmsVersion = Constants.MAX_REFERENCE_VERSION;
gmsVersion = Constants.GMS_VERSION_CODE;
}
public GetServiceRequest(int serviceId) {
this.serviceId = serviceId;
this.gmsVersion = Constants.MAX_REFERENCE_VERSION;
this.gmsVersion = Constants.GMS_VERSION_CODE;
this.field12 = true;
}
......
......@@ -16,9 +16,13 @@
package org.microg.gms.common;
import org.microg.gms.basement.BuildConfig;
public class Constants {
public static final int MAX_REFERENCE_VERSION = 204713 * 1000;
public static final int GMS_VERSION_CODE = (BuildConfig.VERSION_CODE / 1000) * 1000;
public static final String GMS_PACKAGE_NAME = "com.google.android.gms";
public static final String GSF_PACKAGE_NAME = "com.google.android.gsf";
public static final String GMS_PACKAGE_SIGNATURE_SHA1 = "38918a453d07199354f8b19af05ec6562ced5788";
@Deprecated
public static final int MAX_REFERENCE_VERSION = GMS_VERSION_CODE;
}
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2013-2017 microG Project Team
~ Copyright (C) 2013-2020 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.
......@@ -16,4 +16,29 @@
-->
<resources>
</resources>
<string name="lib_name">Herramientas de IU de microG</string>
<string name="lib_license">Apache License 2.0, Equipo de microG</string>
<string name="about_version_str">Versión %1$s</string>
<string name="about_name_version_str">%1$s %2$s</string>
<string name="about_default_license">Todos los derechos reservados.</string>
<string name="prefcat_setup">Configuración</string>
<string name="self_check_title">Autocomprobación</string>
<string name="self_check_desc">Comprueba si el sistema está correctamente configurado para usar microG.</string>
<string name="self_check_cat_permissions">Permisos concedidos</string>
<string name="self_check_name_permission">Permiso para %1$s:</string>
<string name="self_check_resolution_permission">Toque aquí para conceder el permiso. No conceder el permiso puede resultar en comportamientos incorrectos de las aplicaciones.</string>
<string name="about_root_title">Demo de IU de microG</string>
<string name="about_root_summary">Resumen</string>
<string name="about_root_version">Versión v0.1.0</string>
<string name="about_root_libraries">Librerías incluidas</string>
<string name="about_android_support_v4">v4 Support Library</string>
<string name="about_android_support_v7_appcompat">v7 appcompat Support Library</string>
<string name="about_android_support_v7_preference">v7 preference Support Library</string>
<string name="about_android_support_license">Apache License 2.0, The Android Open Source Project</string>
</resources>
......@@ -56,6 +56,11 @@
android:description="@string/permission_service_writely_description"
android:label="@string/permission_service_writely_label"
android:protectionLevel="dangerous" />
<permission
android:name="com.google.android.gms.nearby.exposurenotification.EXPOSURE_CALLBACK"
android:protectionLevel="normal" />
<permission
android:name="org.microg.gms.STATUS_BROADCAST"
android:label="@string/perm_status_broadcast_label"
......
......@@ -25,7 +25,6 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.text.Html;
import android.util.Log;
......@@ -39,7 +38,6 @@ import android.widget.ListView;
import android.widget.TextView;
import com.google.android.gms.R;
import com.squareup.wire.Wire;
import org.microg.gms.common.PackageUtils;
import org.microg.gms.people.PeopleManager;
......@@ -107,7 +105,7 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity {
try {
applicationInfo = packageManager.getApplicationInfo(packageName, 0);
} catch (PackageManager.NameNotFoundException e) {
Log.w(TAG, e);
Log.w(TAG, "Failed to find package " + packageName, e);
finish();
return;
}
......@@ -119,18 +117,9 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity {
if (profileIcon != null) {
((ImageView) findViewById(R.id.account_photo)).setImageBitmap(profileIcon);
} else {
new Thread(new Runnable() {
@Override
public void run() {
final Bitmap profileIcon = PeopleManager.getOwnerAvatarBitmap(AskPermissionActivity.this, account.name, true);
runOnUiThread(new Runnable() {
@Override
public void run() {
((ImageView) findViewById(R.id.account_photo)).setImageBitmap(profileIcon);
}
});
}
new Thread(() -> {
final Bitmap profileIcon1 = PeopleManager.getOwnerAvatarBitmap(AskPermissionActivity.this, account.name, true);
runOnUiThread(() -> ((ImageView) findViewById(R.id.account_photo)).setImageBitmap(profileIcon1));
}).start();
}
......@@ -140,18 +129,8 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity {
} else {
((TextView) findViewById(R.id.title)).setText(getString(R.string.ask_service_permission_title, appLabel));
}
findViewById(android.R.id.button1).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onAllow();
}
});
findViewById(android.R.id.button2).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
onDeny();
}
});
findViewById(android.R.id.button1).setOnClickListener(v -> onAllow());
findViewById(android.R.id.button2).setOnClickListener(v -> onDeny());
((ListView) findViewById(R.id.permissions)).setAdapter(new PermissionAdapter());
}
......@@ -161,24 +140,20 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity {
findViewById(android.R.id.button2).setEnabled(false);
findViewById(R.id.progress_bar).setVisibility(VISIBLE);
findViewById(R.id.no_progress_bar).setVisibility(GONE);
new Thread(new Runnable() {
@Override
public void run() {
try {
AuthResponse response = authManager.requestAuth(fromAccountManager);
Bundle result = new Bundle();
result.putString(KEY_AUTHTOKEN, response.auth);
result.putString(KEY_ACCOUNT_NAME, account.name);
result.putString(KEY_ACCOUNT_TYPE, account.type);
result.putString(KEY_ANDROID_PACKAGE_NAME, packageName);
result.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, true);
setAccountAuthenticatorResult(result);
} catch (IOException e) {
Log.w(TAG, e);
}
finish();
new Thread(() -> {
try {
AuthResponse response = authManager.requestAuth(fromAccountManager);
Bundle result = new Bundle();
result.putString(KEY_AUTHTOKEN, response.auth);
result.putString(KEY_ACCOUNT_NAME, account.name);
result.putString(KEY_ACCOUNT_TYPE, account.type);
result.putString(KEY_ANDROID_PACKAGE_NAME, packageName);
result.putBoolean(AccountManager.KEY_BOOLEAN_RESULT, true);
setAccountAuthenticatorResult(result);
} catch (IOException e) {
Log.w(TAG, e);
}
finish();
}).start();
}
......@@ -189,8 +164,10 @@ public class AskPermissionActivity extends AccountAuthenticatorActivity {
@Override
public void finish() {
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel(packageName.hashCode());
if (packageName != null) {
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel(packageName.hashCode());
}
super.finish();
}
......
......@@ -58,7 +58,7 @@ public class AuthRequest extends HttpFormClient.Request {
@RequestContent("lang")
public String locale;
@RequestContent("google_play_services_version")
public int gmsVersion = Constants.MAX_REFERENCE_VERSION;
public int gmsVersion = Constants.GMS_VERSION_CODE;
@RequestContent("accountType")
public String accountType;
@RequestContent("Email")
......
......@@ -73,7 +73,7 @@ import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;
import static android.view.inputmethod.InputMethodManager.SHOW_IMPLICIT;
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
import static org.microg.gms.common.Constants.MAX_REFERENCE_VERSION;
import static org.microg.gms.common.Constants.GMS_VERSION_CODE;
public class LoginActivity extends AssistantActivity {
public static final String TMPL_NEW_ACCOUNT = "new_account";
......@@ -463,7 +463,7 @@ public class LoginActivity extends AssistantActivity {
@JavascriptInterface
public final int getPlayServicesVersionCode() {
return MAX_REFERENCE_VERSION;
return GMS_VERSION_CODE;
}
@JavascriptInterface
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment