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

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

parent 4fac9b14
Pipeline #38503617 passed with stages
in 6 minutes and 12 seconds
......@@ -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
......
......@@ -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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment