Added pin protection to mobile lib.

This commit is contained in:
Ginder Singh authored and Cuong Manh Le committed 2024-02-07 14:58:39 +07:00
1 parent 9515db7faf
commit faa0ed06b6
2 files changed
+19 -5

No files matched your search

+4 -4
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 {