Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c7ead00 authored by Romain Hunault's avatar Romain Hunault
Browse files

Merge branch 'microg/master'

parents 60b4f4ed 1e444dc4
Loading
Loading
Loading
Loading
Loading
Compare a57ac35b to aa18e807
Original line number Diff line number Diff line
Subproject commit a57ac35b5da42e8b7f78cb1cd002daae404420fb
Subproject commit aa18e807a36440f67a16ca70f29e75ba3bc04e0b
+4 −3
Original line number Diff line number Diff line
@@ -46,15 +46,16 @@ def execResult(...args) {
    return stdout.toString().trim()
}

def gmsVersion = "12.8.79"
def gmsVersion = "13.2.80"
def gmsVersionCode = Integer.parseInt(gmsVersion.replaceAll('\\.', ''))
def gitVersionBase = execResult('git', 'describe', '--tags', '--abbrev=0').substring(1)
def gitCommitCount = Integer.parseInt(execResult('git', 'rev-list', '--count', "v$gitVersionBase..HEAD"))
def gitCommitId = execResult('git', 'show-ref', '--abbrev=7', '--head', 'HEAD').split(' ')[0]
def gitDirty = execResult('git', 'status', '--porcelain').size() > 0
def ourVersionBase = gitVersionBase.substring(0, gitVersionBase.lastIndexOf('.'))
def ourVersionCode = gmsVersionCode * 1000 + gitCommitCount + (gitDirty ? 1 : 0)
def ourVersionName = "$ourVersionBase.$gmsVersionCode" + (gitCommitCount > 0 ? "-$gitCommitCount-$gitCommitId" : "") + (gitDirty ? "-dirty" : "")
def ourVersionMinor = Integer.parseInt(ourVersionBase.substring(ourVersionBase.lastIndexOf('.') + 1))
def ourVersionCode = gmsVersionCode * 1000 + ourVersionMinor * 2  + (gitCommitCount > 0 || gitDirty ? 1 : 0)
def ourVersionName = "$ourVersionBase.$gmsVersionCode" + (gitCommitCount > 0 && !gitDirty ? "-$gitCommitCount" : "") + (gitDirty ? "-dirty" : "") + (gitCommitCount > 0 && !gitDirty ? " ($gitCommitId)" : "")
logger.lifecycle('Starting build for version {} ({})...', ourVersionName, ourVersionCode)

android {
+6 −4
Original line number Diff line number Diff line
@@ -205,16 +205,18 @@
            android:permission="com.google.android.c2dm.permission.RECEIVE">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.REGISTER"/>

                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.UNREGISTER"/>

                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </service>

        <receiver android:name="org.microg.gms.gcm.PushRegisterReceiver">
            <intent-filter>
                <action android:name="com.google.iid.TOKEN_REQUEST"/>
            </intent-filter>
        </receiver>

        <service android:name="org.microg.gms.gcm.McsService"/>

        <receiver
+7 −1
Original line number Diff line number Diff line
@@ -81,7 +81,13 @@ public class HttpFormClient {
        os.close();

        if (connection.getResponseCode() != 200) {
            throw new IOException(connection.getResponseMessage());
            String error = connection.getResponseMessage();
            try {
                error = new String(Utils.readStreamToEnd(connection.getErrorStream()));
            } catch (IOException e) {
                // Ignore
            }
            throw new IOException(error);
        }

        String result = new String(Utils.readStreamToEnd(connection.getInputStream()));
+9 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ public class PackageUtils {
        KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.playconsole", "d6c35e55b481aefddd74152ca7254332739a81d6");
        KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.travel.onthego", "0cbe08032217d45e61c0bc72f294395ee9ecb5d5");
        KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.tycho", "01b844184e360686aa98b48eb16e05c76d4a72ad");
        KNOWN_GOOGLE_PACKAGES.put("com.google.android.contacts", "ee3e2b5d95365c5a1ccc2d8dfe48d94eb33b3ebe");
        KNOWN_GOOGLE_PACKAGES.put("com.google.android.wearable.app", "a197f9212f2fed64f0ff9c2a4edf24b9c8801c8c");
        KNOWN_GOOGLE_PACKAGES.put("com.google.android.apps.youtube.music", "afb0fed5eeaebdd86f56a97742f4b6b33ef59875");
        KNOWN_GOOGLE_PACKAGES.put("com.google.android.vr.home", "fc1edc68f7e3e4963c998e95fc38f3de8d1bfc96");
@@ -154,4 +155,12 @@ public class PackageUtils {
            return -1;
        }
    }

    public static String versionName(Context context, String packageName) {
        try {
            return context.getPackageManager().getPackageInfo(packageName, 0).versionName;
        } catch (PackageManager.NameNotFoundException e) {
            return null;
        }
    }
}
Loading