mobile/sensor: don't panic, return an availability error on non-android
Change-Id: I42152d6fd5af220a780a6e3a288a97551ee53f39 Reviewed-on: https://go-review.googlesource.com/8413 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
2beb6b6bcd
commit
96e541427e
|
@ -6,27 +6,29 @@
|
|||
|
||||
package sensor
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
type manager struct {
|
||||
}
|
||||
|
||||
func (m *manager) initialize() {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (m *manager) enable(t Type, delay time.Duration) error {
|
||||
panic("not implemented")
|
||||
return errors.New("sensor: no sensors available")
|
||||
}
|
||||
|
||||
func (m *manager) disable(t Type) error {
|
||||
panic("not implemented")
|
||||
return errors.New("sensor: no sensors available")
|
||||
}
|
||||
|
||||
func (m *manager) read(e []Event) (n int, err error) {
|
||||
panic("not implemented")
|
||||
return 0, errors.New("sensor: no sensor data available")
|
||||
}
|
||||
|
||||
func (m *manager) close() error {
|
||||
panic("not implemented")
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue