feat: share more code from android branch

This commit is contained in:
Steve Johnson
2023-11-17 01:19:20 +08:00
parent d28c3b50e3
commit 9e96d70840
17 changed files with 333 additions and 5 deletions

View File

@@ -0,0 +1,36 @@
// +build android
package provider
import (
"time"
)
var (
suspended bool
)
type UpdatableProvider interface {
UpdatedAt() time.Time
}
func (pp *proxySetProvider) UpdatedAt() time.Time {
return pp.Fetcher.UpdatedAt
}
func (pp *proxySetProvider) Close() error {
pp.healthCheck.close()
pp.Fetcher.Destroy()
return nil
}
func (cp *compatibleProvider) Close() error {
cp.healthCheck.close()
return nil
}
func Suspend(s bool) {
suspended = s
}