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,27 @@
// +build android
package provider
import "time"
var (
suspended bool
)
type UpdatableProvider interface {
UpdatedAt() time.Time
}
func (f *ruleSetProvider) UpdatedAt() time.Time {
return f.Fetcher.UpdatedAt
}
func (rp *ruleSetProvider) Close() error {
rp.Fetcher.Destroy()
return nil
}
func Suspend(s bool) {
suspended = s
}