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

Merge pull request #37 from Oizaro/master

Update dependencies & made notification translatable
This commit is contained in:
KevinX8 2020-08-29 20:11:32 +01:00 committed by GitHub
commit 50e803b018
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 20 additions and 49 deletions

View file

@ -1,28 +0,0 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
dependencies {
api project(':play-services-basement')
implementation "androidx.annotation:annotation:$annotationVersion"
}
android {
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}

View file

@ -1,9 +0,0 @@
<?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">
<application />
</manifest>

View file

@ -38,5 +38,5 @@ dependencies {
api project(':play-services-base-api')
implementation "androidx.fragment:fragment:$fragmentVersion"
implementation "com.google.android.gms:play-services-base:17.3.0"
implementation 'com.google.android.gms:play-services-base:17.4.0'
}

View file

@ -22,7 +22,7 @@ dependencies {
api "org.microg:safe-parcel:$safeParcelVersion"
implementation "androidx.annotation:annotation:$annotationVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.0"
}
android {

View file

@ -30,7 +30,6 @@ dependencies {
// Specified manually due to
// https://github.com/vitalidze/chromecast-java-api-v2/issues/91
implementation project(':play-services-base-core')
implementation project(':play-services-core-proto')
implementation project(':play-services-core:microg-ui-tools') // deprecated
implementation project(':play-services-api')
@ -47,7 +46,7 @@ dependencies {
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
implementation "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.0"
implementation project(path: ':play-services-basement')
}

View file

@ -10,6 +10,7 @@ import android.content.ComponentName;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Build;
import android.os.PowerManager;
import android.provider.Settings;
@ -17,7 +18,7 @@ import android.util.Log;
import androidx.annotation.RequiresApi;
import org.microg.gms.base.core.R;
import com.mgoogle.android.gms.R;
import java.util.List;
@ -69,7 +70,7 @@ public class ForegroundServiceContext extends ContextWrapper {
@RequiresApi(api = Build.VERSION_CODES.O)
private static Notification buildForegroundNotification(Context context) {
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_MIN);
NotificationChannel channel = new NotificationChannel("foreground-service", context.getResources().getString(R.string.notification_service_name), NotificationManager.IMPORTANCE_MIN);
channel.setShowBadge(false);
channel.setLockscreenVisibility(0);
channel.setVibrationPattern(new long[0]);
@ -81,8 +82,8 @@ public class ForegroundServiceContext extends ContextWrapper {
return new Notification.Builder(context, channel.getId())
.setOngoing(true)
.setContentIntent(pendingIntent)
.setContentTitle("Running in background")
.setContentText("Tap me to disable battery optimisations for microG")
.setContentTitle(context.getResources().getString(R.string.notification_service_title))
.setContentText(context.getResources().getString(R.string.notification_service_content))
.setSmallIcon(R.drawable.ic_foreground_notification)
.build();
}

View file

@ -43,6 +43,7 @@ import android.util.Log;
import androidx.annotation.RequiresApi;
import androidx.legacy.content.WakefulBroadcastReceiver;
import com.mgoogle.android.gms.R;
import com.squareup.wire.Message;
import org.microg.gms.checkin.LastCheckinInfo;
@ -320,13 +321,13 @@ public class McsService extends Service implements Handler.Callback {
@RequiresApi(api = Build.VERSION_CODES.O)
private Notification buildForegroundNotification() {
NotificationChannel channel = new NotificationChannel("foreground-service", "Foreground Service", NotificationManager.IMPORTANCE_LOW);
NotificationChannel channel = new NotificationChannel("foreground-service", getString(R.string.notification_service_name), NotificationManager.IMPORTANCE_LOW);
channel.setLockscreenVisibility(Notification.VISIBILITY_SECRET);
channel.setShowBadge(false);
getSystemService(NotificationManager.class).createNotificationChannel(channel);
return new Notification.Builder(this, channel.getId())
.setOngoing(true)
.setContentTitle("Running in background")
.setContentTitle(this.getResources().getString(R.string.notification_service_title))
.setSmallIcon(android.R.drawable.stat_notify_sync)
.build();
}

View file

@ -16,6 +16,11 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="gms_settings_name">Impostazioni di Vanced microG</string>
<string name="gms_settings_summary">Configura Vanced microG.</string>
<string name="notification_service_name">Servizio in Primo Piano</string>
<string name="notification_service_title">Esecuzione in secondo piano</string>
<string name="notification_service_content">Tocca per disattivare il risparmio energetico per microG</string>
<string name="just_a_sec">Giusto un secondo…</string>
<string name="ask_permission_tos">Continuando autorizzi questa applicazione e Google ad usare le tue informazioni in accordo con i rispettivi termini di servizio e politiche di riservatezza.</string>

View file

@ -18,6 +18,10 @@
<string name="gms_settings_name">Vanced microG Settings</string>
<string name="gms_settings_summary">Setup Vanced microG.</string>
<string name="notification_service_name">Foreground Service</string>
<string name="notification_service_title">Running in background</string>
<string name="notification_service_content">Tap me to disable battery saving for microG</string>
<string name="just_a_sec">Just a sec…</string>
<string name="ask_permission_tos">By continuing, you allow this app and Google to use your information in accordance with their respective terms of service and privacy policies.</string>
<string name="ask_scope_permission_title"><xliff:g example="F-Droid">%1$s</xliff:g> would like to:</string>

View file

@ -11,8 +11,6 @@ include ':play-services-base-api'
include ':play-services-tasks'
include ':play-services-core-proto'
include ':play-services-base-core'
include ':play-services-core'
include ':play-services-core:microg-ui-tools'