Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #1

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
2bc1850
Setup CI
Jul 19, 2018
824ad17
Update Google Play Services version
Jul 23, 2018
f8dd0a9
Update extern/UnifiedNlp to latest
Jul 23, 2018
875d9e2
Default settings for Safety Net
Aug 20, 2018
89768b7
Default settings for Google Registration
Aug 20, 2018
b4eaae3
Default settings for Google Cloud Messaging
Aug 20, 2018
e9957f7
Git change UnifiedNlp remote repository
Aug 20, 2018
e82ab7d
Use default settings for UnifiedNlp
Aug 20, 2018
35a379e
Ability to load private projects
Aug 20, 2018
c2cc530
Shared UserId
Aug 21, 2018
94d7420
Revert Shared UserId
Aug 23, 2018
e6105b2
Merge branch 'microg/master'
Aug 29, 2018
61c63f0
Update CI process
Aug 29, 2018
60c0b7f
Test
Aug 29, 2018
a4c0b8d
android_packages_apps_UnifiedNlp
Aug 30, 2018
e4974d0
Only build with tags
Aug 31, 2018
233efff
Fix submodules issues
Aug 31, 2018
004cb64
Update CI
Aug 31, 2018
60b4f4e
Change GitLab registry url
Aug 30, 2018
3c7ead0
Merge branch 'microg/master'
Sep 30, 2018
63e63ea
Merge branch 'microg/master' into merge-upstream
Jun 3, 2019
f415dd2
Create local.properties during build
Jun 3, 2019
d6041f5
Build mapbox
Jun 3, 2019
2609850
Revert "Build mapbox"
Jun 5, 2019
18c6bb5
Fix SafetyNet
Jun 6, 2019
686ff93
Update CI conf
Jun 14, 2019
e95a2e0
Merge branch 'microg/master' into merge-upstream
Jun 14, 2019
2de26e1
Build mapbox
Jun 3, 2019
5138dac
Revert "Build mapbox"
Jul 1, 2019
1c80f6f
Fix SafetyNet default prefs
romain-hunault Jul 1, 2019
c0817e8
Merge branch 'v0.2.8.17785' into merge-upstream
Jul 11, 2019
a9a1400
Merge branch 'microg/master' into update-19420
Oct 24, 2019
0b55250
Build mapbox
Jun 3, 2019
3cae117
Fix build process
Oct 28, 2019
93e070b
Revert "Build mapbox"
Oct 30, 2019
890ea43
Merge branch 'microg/master' into update-19420
Nov 4, 2019
7404992
Always build
romain-hunault Nov 4, 2019
d89632c
Enable mapbox
romain-hunault Nov 25, 2019
cdbe42f
Resolve "Push Notifications don't work"
Nov 29, 2019
067295e
Merge branch '7-Push_Notifications_are_not_being_received' into 'spri…
romain-hunault Nov 29, 2019
0069eec
Return v1 for maps module
Nov 29, 2019
912af07
Merge branch '30-Module_Version_for_Maps' into 'sprint_cordoba'
romain-hunault Nov 29, 2019
0047182
Merge branch 'sprint_cordoba' into 'master'
romain-hunault Dec 16, 2019
d9f37c0
Fix copy/pasted from https://github.com/microg/android_packages_apps_…
Dec 16, 2019
71feebc
Merge branch '32-com_bankid_bus_failure_to_connect' into 'dev'
romain-hunault Dec 16, 2019
2447a9a
#21 fix: don't show 2 links to microG in Settings
Dec 16, 2019
aa4cb6d
Merge branch '21-Two_microG_links_in_settings' into 'dev'
romain-hunault Dec 16, 2019
85a2b8b
Revert "Merge branch '21-Two_microG_links_in_settings' into 'dev'"
Dec 17, 2019
1553e79
Hide a microG link in Settings
Dec 17, 2019
315ed12
Merge branch '21-Two_microG_links_in_Settings' into 'sprint_delhi'
romain-hunault Dec 17, 2019
f2e5a7f
Use /e/apps/ repos as submodules
Dec 20, 2019
89dbb73
Setup submodule sync
Dec 20, 2019
01447e0
Pointing RemoteDroidGuard submodule to fix, and updating all submodul…
Jan 2, 2020
3333ddd
Merge branch '6-DroidGuard_crashes' into 'dev'
romain-hunault Jan 2, 2020
3b8aff2
Resolve "Implement Firebase DynamicLinks"
Jan 3, 2020
c34da53
Merge branch '31-Implement_Firebase_DynamicLinks' into 'dev'
romain-hunault Jan 3, 2020
732dfd7
Added stub for setMapStyleOptions; don't set a member to null because…
Mar 6, 2020
5f2db00
Merge branch '1020-HealthMate_crash' into 'dev'
romain-hunault Mar 6, 2020
9b9ed81
Added stub for setMapStyleOptions; don't set a member to null because…
Mar 6, 2020
bd7488e
Merge branch '688-WhatsApp_location_crash' into 'dev'
romain-hunault Mar 6, 2020
8911e18
Added translation using Weblate (Dutch)
ManojNairOnline Apr 6, 2020
6778968
Translated using Weblate (French)
eAnonyme Apr 6, 2020
20c577a
Translated using Weblate (French)
eAnonyme Apr 12, 2020
bd2038a
Fix conflicts and code format
arnauvp Apr 20, 2020
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ build/
user.gradle
local.properties
.directory
bin/
.project
.classpath
.output/
.settings/
37 changes: 37 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
image: "registry.gitlab.e.foundation:5000/e/apps/docker-android-apps-cicd:latest"

stages:
- build

variables:
GIT_SUBMODULE_STRATEGY: recursive

before_script:
- if [ -d "/srv/userscripts" ]; then cp -R userscripts/* /srv/userscripts ; fi
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew

cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/

build:
stage: build
script:
- echo sdk.dir $ANDROID_HOME > local.properties
- echo mapbox.key $MAPBOX_KEY >> local.properties
- echo mapbox.enabled true >> local.properties
- export TERM=dumb
- export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx4096m"
- ./gradlew assemble
artifacts:
paths:
- play-services-core/build/outputs/apk/
15 changes: 10 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
[submodule "extern/UnifiedNlp"]
path = extern/UnifiedNlp
url = https://github.com/microg/android_packages_apps_UnifiedNlp.git
url = https://gitlab.e.foundation/e/apps/android_packages_apps_UnifiedNlp
branch = dev
[submodule "extern/GmsApi"]
path = extern/GmsApi
url = https://github.com/microg/android_external_GmsApi.git
url = https://gitlab.e.foundation/e/apps/GmsApi
branch = dev
[submodule "extern/Wearable"]
path = extern/Wearable
url = https://github.com/microg/android_external_Wearable.git
url = https://gitlab.e.foundation/e/apps/Wearable
branch = dev
[submodule "extern/GmsLib"]
path = extern/GmsLib
url = https://github.com/microg/android_external_GmsLib.git
url = https://gitlab.e.foundation/e/apps/GmsLib
branch = dev
[submodule "extern/RemoteDroidGuard"]
path = extern/RemoteDroidGuard
url = https://github.com/microg/android_packages_apps_RemoteDroidGuard.git
url = https://gitlab.e.foundation/e/apps/android_packages_apps_RemoteDroidGuard
branch = dev
2 changes: 1 addition & 1 deletion extern/GmsApi
Submodule GmsApi updated from 2a4344 to c6448e
2 changes: 1 addition & 1 deletion extern/GmsLib
Submodule GmsLib updated from 15cd44 to 614e11
2 changes: 1 addition & 1 deletion extern/RemoteDroidGuard
Submodule RemoteDroidGuard updated from 47073d to 0c5c94
2 changes: 1 addition & 1 deletion extern/UnifiedNlp
Submodule UnifiedNlp updated from 82479b to 5516c4
1 change: 1 addition & 0 deletions firebase-dynamic-links
1 change: 1 addition & 0 deletions firebase-dynamic-links-api
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.gradle.jvmargs=-Xms512m -Xmx4096m
1 change: 1 addition & 0 deletions play-services-appinvite
1 change: 1 addition & 0 deletions play-services-appinvite-api
6 changes: 6 additions & 0 deletions play-services-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ dependencies {
implementation project(':play-services-api')
implementation project(':play-services-cast-api')
implementation project(':play-services-wearable')
implementation project(':play-services-appinvite')
implementation project(':unifiednlp-base')
implementation project(':wearable-lib')
implementation project(':firebase-dynamic-links')

implementation project(':remote-droid-guard-lib')
if (useMapbox()) {
Expand Down Expand Up @@ -101,6 +103,10 @@ android {
}
}

lintOptions {
abortOnError false
}

lintOptions {
disable 'MissingTranslation', 'InvalidPackage', 'BatteryLife', 'ImpliedQuantity', 'MissingQuantity', 'InvalidWakeLockTag'
}
Expand Down
18 changes: 16 additions & 2 deletions play-services-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
</activity>

<!-- microG Settings embedded in System Settings on SDK 23 and newer -->
<activity-alias
<!--<activity-alias
android:name="org.microg.gms.ui.SettingsActivityLink"
android:icon="@drawable/microg_light_color_24"
android:label="@string/gms_settings_name"
Expand All @@ -461,7 +461,7 @@
<meta-data
android:name="com.android.settings.summary"
android:resource="@string/gms_settings_summary"/>
</activity-alias>
</activity-alias> -->

<activity
android:name="org.microg.gms.ui.AskPushPermission"
Expand Down Expand Up @@ -652,6 +652,18 @@
</intent-filter>
</service>

<service android:name="org.microg.gms.appinvite.AppInviteService">
<intent-filter>
<action android:name="com.google.android.gms.appinvite.service.START"/>
</intent-filter>
</service>

<service android:name="org.microg.gms.firebase.dynamiclinks.DynamicLinksService">
<intent-filter>
<action android:name="com.google.firebase.dynamiclinks.service.START"/>
</intent-filter>
</service>

<service android:name="org.microg.gms.DummyService">
<intent-filter>
<action android:name="com.google.android.gms.plus.service.START"/>
Expand Down Expand Up @@ -683,6 +695,8 @@
<action android:name="com.google.android.gms.phenotype.service.START"/>
<action android:name="com.google.android.gms.auth.api.credentials.service.START"/>
<action android:name="com.google.android.gms.gass.START"/>
<action android:name="com.google.android.gms.appinvite.service.START"/>
<action android:name="com.google.firebase.dynamiclinks.service.START"/>
</intent-filter>
</service>
</application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public int getModuleVersion2(IObjectWrapper context, String moduleId, boolean up
Log.d(TAG, "returning temp fix module version for " + moduleId + ". Cast API wil not be functional!");
return 1;
}
if (moduleId.equals("com.google.android.gms.maps_dynamite")) {
Log.d(TAG, "returning v1 for maps");
return 1;
}
Log.d(TAG, "unimplemented Method: getModuleVersion for " + moduleId);
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@

public class ProviderInstallerImpl {
private static final String TAG = "GmsProviderInstaller";

//private static final List<String> DISABLED = Collections.singletonList("com.discord");
private static final List<String> DISABLED = Collections.unmodifiableList(Arrays.asList("com.discord", "com.bankid.bus"));

public static void insertProvider(Context context) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright (C) 2019 e Foundation
*
* 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.appinvite;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import android.os.RemoteException;

import com.google.android.gms.common.api.CommonStatusCodes;
import com.google.android.gms.common.internal.GetServiceRequest;
import com.google.android.gms.common.internal.IGmsCallbacks;

import org.microg.gms.BaseService;
import org.microg.gms.common.GmsService;
import org.microg.gms.common.PackageUtils;

import org.microg.gms.appinvite.AppInviteServiceImpl;

public class AppInviteService extends BaseService {
private static final String TAG = "GmsAppInviteService";

public AppInviteService() {
super("GmsAppInviteSvc", GmsService.APP_INVITE);
}

@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
PackageUtils.getAndCheckCallingPackage(this, request.packageName);
Log.d(TAG, "callb: " + callback + " ; req: " + request + " ; serv: " + service);

callback.onPostInitComplete(0, new AppInviteServiceImpl(this, request.packageName, request.extras), null);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (C) 2019 e Foundation
*
* 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.appinvite;

import android.os.Parcel;
import android.os.RemoteException;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.content.Context;
import android.content.Intent;

import com.google.android.gms.common.api.Status;

import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.dynamic.ObjectWrapper;

import com.google.android.gms.appinvite.internal.IAppInviteService;
import com.google.android.gms.appinvite.internal.IAppInviteCallbacks;


public class AppInviteServiceImpl extends IAppInviteService.Stub {
private static final String TAG = "GmsAppInviteServImpl";

public AppInviteServiceImpl(Context context, String packageName, Bundle extras) {
}


@Override
public void updateInvitationOnInstall(IAppInviteCallbacks callback, String invitationId) throws RemoteException {
callback.onStatus(Status.SUCCESS);
}

@Override
public void convertInvitation(IAppInviteCallbacks callback, String invitationId) throws RemoteException {
callback.onStatus(Status.SUCCESS);
}

@Override
public void getInvitation(IAppInviteCallbacks callback) throws RemoteException {
callback.onStatusIntent(new Status(Activity.RESULT_CANCELED), null);
}


@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
if (super.onTransact(code, data, reply, flags)) {
return true;
}

Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.microg.gms.checkin.LastCheckinInfo;
import org.microg.gms.common.HttpFormClient;
import org.microg.gms.common.Utils;
import org.microg.gms.gcm.McsService;
import org.microg.gms.people.PeopleManager;

import java.io.IOException;
Expand Down Expand Up @@ -357,6 +358,7 @@ public void onException(Exception exception) {
private boolean checkin(boolean force) {
try {
CheckinManager.checkin(LoginActivity.this, force);
McsService.scheduleReconnect(this);
return true;
} catch (IOException e) {
Log.w(TAG, "Checkin failed", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static synchronized LastCheckinInfo checkin(Context context, boolean forc
LastCheckinInfo info = LastCheckinInfo.read(context);
if (!force && info.lastCheckin > System.currentTimeMillis() - MIN_CHECKIN_INTERVAL)
return null;
if (!PreferenceManager.getDefaultSharedPreferences(context).getBoolean(PREF_ENABLE_CHECKIN, false))
if (!PreferenceManager.getDefaultSharedPreferences(context).getBoolean(PREF_ENABLE_CHECKIN, true))
return null;
List<CheckinClient.Account> accounts = new ArrayList<CheckinClient.Account>();
AccountManager accountManager = AccountManager.get(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public CheckinService() {
protected void onHandleIntent(Intent intent) {
try {
ForegroundServiceContext.completeForegroundService(this, intent, TAG);
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(PREF_ENABLE_CHECKIN, false)) {
if (PreferenceManager.getDefaultSharedPreferences(this).getBoolean(PREF_ENABLE_CHECKIN, true)) {
LastCheckinInfo info = CheckinManager.checkin(this, intent.getBooleanExtra(EXTRA_FORCE_CHECKIN, false));
if (info != null) {
Log.d(TAG, "Checked in as " + Long.toHexString(info.androidId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void onReceive(Context context, Intent intent) {
boolean force = "android.provider.Telephony.SECRET_CODE".equals(intent.getAction());
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);

if (PreferenceManager.getDefaultSharedPreferences(context).getBoolean(PREF_ENABLE_CHECKIN, false) || force) {
if (PreferenceManager.getDefaultSharedPreferences(context).getBoolean(PREF_ENABLE_CHECKIN, true) || force) {
if (ConnectivityManager.CONNECTIVITY_ACTION.equals(intent.getAction()) &&
LastCheckinInfo.read(context).lastCheckin > System.currentTimeMillis() - REGULAR_CHECKIN_INTERVAL) {
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright (C) 2019 e Foundation
*
* 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.firebase.dynamiclinks;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import android.os.RemoteException;

import com.google.android.gms.common.api.CommonStatusCodes;
import com.google.android.gms.common.internal.GetServiceRequest;
import com.google.android.gms.common.internal.IGmsCallbacks;

import org.microg.gms.BaseService;
import org.microg.gms.common.GmsService;
import org.microg.gms.common.PackageUtils;

import org.microg.gms.firebase.dynamiclinks.DynamicLinksServiceImpl;

public class DynamicLinksService extends BaseService {
private static final String TAG = "GmsFrbDynamicLinksService";

public DynamicLinksService() {
super("GmsFrbDynamicLinksSvc", GmsService.FRB_DYNAMIC_LINKS);
}

@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
PackageUtils.getAndCheckCallingPackage(this, request.packageName);
Log.d(TAG, "callb: " + callback + " ; req: " + request + " ; serv: " + service);

callback.onPostInitComplete(0, new DynamicLinksServiceImpl(this, request.packageName, request.extras), null);
}
}
Loading