Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-v-in committed Jan 12, 2021
1 parent b0fae31 commit baf890c
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<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.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions play-services-basement/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ android {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
buildConfigField "int", "VERSION_CODE", "$appVersionCode"
}

sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
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";
Expand Down Expand Up @@ -463,7 +463,7 @@ public final String getPhoneNumber() {

@JavascriptInterface
public final int getPlayServicesVersionCode() {
return MAX_REFERENCE_VERSION;
return GMS_VERSION_CODE;
}

@JavascriptInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public byte[] buildPayload(byte[] nonce) {
.packageName(packageName)
.fileDigest(getPackageFileDigest())
.signatureDigest(getPackageSignatures())
.gmsVersionCode(Constants.MAX_REFERENCE_VERSION)
.gmsVersionCode(Constants.GMS_VERSION_CODE)
//.googleCn(false)
.seLinuxState(new SELinuxState.Builder().enabled(true).supported(true).build())
.suCandidates(Collections.<FileState>emptyList())
Expand Down Expand Up @@ -155,7 +155,7 @@ private AttestResponse attest(AttestRequest request, String apiKey) throws IOExc
connection.setRequestProperty("content-type", "application/x-protobuf");
connection.setRequestProperty("Accept-Encoding", "gzip");
Build build = Utils.getBuild(context);
connection.setRequestProperty("User-Agent", "SafetyNet/" + Constants.MAX_REFERENCE_VERSION + " (" + build.device + " " + build.id + "); gzip");
connection.setRequestProperty("User-Agent", "SafetyNet/" + Constants.GMS_VERSION_CODE + " (" + build.device + " " + build.id + "); gzip");

OutputStream os = connection.getOutputStream();
os.write(request.encode());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import static com.google.android.gms.iid.InstanceID.ERROR_TIMEOUT;
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
import static org.microg.gms.common.Constants.GSF_PACKAGE_NAME;
import static org.microg.gms.common.Constants.MAX_REFERENCE_VERSION;
import static org.microg.gms.common.Constants.GMS_VERSION_CODE;
import static org.microg.gms.gcm.GcmConstants.ACTION_C2DM_REGISTER;
import static org.microg.gms.gcm.GcmConstants.ACTION_C2DM_REGISTRATION;
import static org.microg.gms.gcm.GcmConstants.ACTION_INSTANCE_ID;
Expand Down Expand Up @@ -284,7 +284,7 @@ private void sendRegisterMessage(Bundle data, KeyPair keyPair, String requestId)
data.putString(EXTRA_OS_VERSION, Integer.toString(Build.VERSION.SDK_INT));
data.putString(EXTRA_APP_VERSION_CODE, Integer.toString(getSelfVersionCode(context)));
data.putString(EXTRA_APP_VERSION_NAME, getSelfVersionName(context));
data.putString(EXTRA_CLIENT_VERSION, "iid-" + MAX_REFERENCE_VERSION);
data.putString(EXTRA_CLIENT_VERSION, "iid-" + GMS_VERSION_CODE);
data.putString(EXTRA_APP_ID, InstanceID.sha1KeyPair(keyPair));
String pub = base64encode(keyPair.getPublic().getEncoded());
data.putString(EXTRA_PUBLIC_KEY, pub);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected void onConnectedToBroker(IGmsServiceBroker broker, GmsCallbacks callba
throws RemoteException {
Bundle bundle = new Bundle();
bundle.putString("client_name", "locationServices");
broker.getGoogleLocationManagerService(callbacks, Constants.MAX_REFERENCE_VERSION,
broker.getGoogleLocationManagerService(callbacks, Constants.GMS_VERSION_CODE,
getContext().getPackageName(), bundle);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
}

override fun getVersion(params: GetVersionParams) {
params.callback.onResult(Status.SUCCESS, Constants.MAX_REFERENCE_VERSION.toLong())
params.callback.onResult(Status.SUCCESS, Constants.GMS_VERSION_CODE.toLong())
}

override fun getCalibrationConfidence(params: GetCalibrationConfidenceParams) {
Expand Down

0 comments on commit baf890c

Please sign in to comment.