Added pin protection to mobile lib.

This commit is contained in:
Ginder Singh
2024-02-07 01:36:42 -05:00
committed by Cuong Manh Le
parent 9515db7faf
commit faa0ed06b6
2 changed files with 19 additions and 5 deletions

View File

@@ -61,13 +61,13 @@ func mapCallback(callback AppCallback) cli.AppCallback {
}
}
func (c *Controller) Stop() bool {
if c.stopCh != nil {
func (c *Controller) Stop(Pin int64) int {
errorCode := cli.CheckDeactivationPin(Pin)
if errorCode == 0 && c.stopCh != nil {
close(c.stopCh)
c.stopCh = nil
return true
}
return false
return errorCode
}
func (c *Controller) IsRunning() bool {