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

Verified Commit f64fb11f authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

Update build tools, disconnect after request

parent c28da938
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -12,8 +12,8 @@ script:
android:
  components:
  - tools
  - build-tools-24.0.2
  - android-24
  - build-tools-25.0.2
  - android-25
  - extra-android-m2repository
before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
+3 −3
Original line number Diff line number Diff line
@@ -19,17 +19,17 @@ buildscript {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
        classpath 'com.android.tools.build:gradle:2.3.1'
    }
}

allprojects {
    apply plugin: 'idea'
    ext.androidBuildVersionTools = "24.0.2"
    ext.androidBuildVersionTools = "25.0.2"
    ext.isReleaseVersion = false
}

def androidCompileSdk() { return 24 }
def androidCompileSdk() { return 25 }

def androidTargetSdk() { return 24 }

+2 −2
Original line number Diff line number Diff line
#Thu Sep 15 15:56:35 CEST 2016
#Sat Apr 22 15:09:21 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
+1 −1
Original line number Diff line number Diff line
/*
 * Copyright 2013-2016 microG Project Team
 * Copyright (C) 2013-2017 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.
+6 −4
Original line number Diff line number Diff line
/*
 * Copyright 2013-2016 microG Project Team
 * Copyright (C) 2013-2017 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.
@@ -46,7 +46,7 @@ public class RemoteDroidGuardConnector {
        res.statusCode = 14;
        connectForTask(new Task() {
            @Override
            public void run(IRemoteDroidGuard remote, final CountDownLatch countDownLatch) {
            public void run(IRemoteDroidGuard remote, final ServiceConnection connection, final CountDownLatch countDownLatch) {
                try {
                    RemoteDroidGuardRequest request = new RemoteDroidGuardRequest();
                    request.packageName = context.getPackageName();
@@ -59,6 +59,7 @@ public class RemoteDroidGuardConnector {
                            res.result = result;
                            res.statusCode = 0;
                            countDownLatch.countDown();
                            context.unbindService(connection);
                        }

                        @Override
@@ -66,6 +67,7 @@ public class RemoteDroidGuardConnector {
                            res.statusCode = 8;
                            res.errorMsg = err;
                            countDownLatch.countDown();
                            context.unbindService(connection);
                        }
                    }, request);
                } catch (RemoteException e) {
@@ -97,7 +99,7 @@ public class RemoteDroidGuardConnector {
    }

    private interface Task {
        void run(IRemoteDroidGuard remote, CountDownLatch countDownLatch);
        void run(IRemoteDroidGuard remote, ServiceConnection connection, CountDownLatch countDownLatch);
    }

    private class Connection implements ServiceConnection {
@@ -114,7 +116,7 @@ public class RemoteDroidGuardConnector {
        public void onServiceConnected(ComponentName name, IBinder service) {
            try {
                if (todo != null) {
                    todo.run(IRemoteDroidGuard.Stub.asInterface(service), countDownLatch);
                    todo.run(IRemoteDroidGuard.Stub.asInterface(service), this, countDownLatch);
                }
                todo = null;
            } catch (Exception e) {
Loading