mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-23 09:01:45 +00:00
ae94260ff8
- 修复了12-4地图信息的错误
20 lines
598 B
Python
20 lines
598 B
Python
from module.device.connection import Connection
|
|
from module.logger import logger
|
|
|
|
|
|
class AppControl(Connection):
|
|
def app_is_running(self):
|
|
app = self.device.app_current()
|
|
package = app['package']
|
|
logger.attr('Package_name', package)
|
|
|
|
return package == self.config.PACKAGE_NAME
|
|
|
|
def app_stop(self):
|
|
logger.info(f'App stop: {self.config.PACKAGE_NAME}')
|
|
self.device.app_stop(self.config.PACKAGE_NAME)
|
|
|
|
def app_start(self):
|
|
logger.info(f'App start: {self.config.PACKAGE_NAME}')
|
|
self.device.app_start(self.config.PACKAGE_NAME)
|