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

Commit 8a9b0acd authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Don't do emulator checks (because we can only use shared runners at the moment); minor lint

parent 4fac9b14
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -9,8 +9,9 @@ cache:

test:
  script:
    - (cd /sdk/emulator; ./emulator @test -no-audio -no-window & wait-for-emulator.sh)
    - ./gradlew check connectedCheck
#   - (cd /sdk/emulator; ./emulator @test -no-audio -no-window & wait-for-emulator.sh)
#   - ./gradlew check connectedCheck
    - ./gradlew check
  artifacts:
    paths:
      - build/outputs/lint-results-debug.html
+7 −5
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ class CustomCertManager @JvmOverloads constructor(
    }

    var service: ICustomCertService? = null
    private var serviceConnection: ServiceConnection?
    private var serviceConn: ServiceConnection? = null
    private var serviceLock = Object()

    /** system-default trust store */
@@ -75,7 +75,7 @@ class CustomCertManager @JvmOverloads constructor(


    init {
        serviceConnection = object: ServiceConnection {
        val newServiceConn = object: ServiceConnection {
            override fun onServiceConnected(className: ComponentName, binder: IBinder) {
                Constants.log.fine("Connected to service")
                synchronized(serviceLock) {
@@ -96,7 +96,9 @@ class CustomCertManager @JvmOverloads constructor(
            throw IllegalStateException("must not be run on main thread")

        Constants.log.fine("Binding to service")
        if (context.bindService(Intent(context, CustomCertService::class.java), serviceConnection, Context.BIND_AUTO_CREATE)) {
        if (context.bindService(Intent(context, CustomCertService::class.java), newServiceConn, Context.BIND_AUTO_CREATE)) {
            serviceConn = newServiceConn

            Constants.log.fine("Waiting for service to be bound")
            synchronized(serviceLock) {
                while (service == null)
@@ -110,10 +112,10 @@ class CustomCertManager @JvmOverloads constructor(
    }

    override fun close() {
        serviceConnection?.let {
        serviceConn?.let {
            try {
                context.unbindService(it)
                serviceConnection = null
                serviceConn = null
            } catch (e: Exception) {
                Constants.log.log(Level.WARNING, "Couldn't unbind CustomCertService", e)
            }