cmd/tailscale: remove unused field stateStore.dataDir

Signed-off-by: Elias Naur <mail@eliasnaur.com>
pull/3/head
Elias Naur 5 years ago
parent dfbfd2a3ed
commit 7de19cd9b8

@ -117,7 +117,7 @@ func main() {
fatalErr(err) fatalErr(err)
} }
a.appDir = appDir a.appDir = appDir
a.store = newStateStore(a.appDir, a.jvm, a.appCtx) a.store = newStateStore(a.jvm, a.appCtx)
go func() { go func() {
if err := a.runBackend(); err != nil { if err := a.runBackend(); err != nil {
fatalErr(err) fatalErr(err)

@ -16,8 +16,6 @@ import (
// backend by androidx.security.crypto.EncryptedSharedPreferences (see // backend by androidx.security.crypto.EncryptedSharedPreferences (see
// App.java). // App.java).
type stateStore struct { type stateStore struct {
dataDir string
jvm jni.JVM jvm jni.JVM
// appCtx is the global Android app context. // appCtx is the global Android app context.
appCtx jni.Object appCtx jni.Object
@ -27,11 +25,10 @@ type stateStore struct {
decrypt jni.MethodID decrypt jni.MethodID
} }
func newStateStore(dataDir string, jvm jni.JVM, appCtx jni.Object) *stateStore { func newStateStore(jvm jni.JVM, appCtx jni.Object) *stateStore {
s := &stateStore{ s := &stateStore{
dataDir: dataDir, jvm: jvm,
jvm: jvm, appCtx: appCtx,
appCtx: appCtx,
} }
jni.Do(jvm, func(env jni.Env) error { jni.Do(jvm, func(env jni.Env) error {
appCls := jni.GetObjectClass(env, appCtx) appCls := jni.GetObjectClass(env, appCtx)

Loading…
Cancel
Save