change: remove unused code

This commit is contained in:
lilong.129
2025-02-07 18:12:27 +08:00
parent 03bdb2b741
commit 06d7a7e721
6 changed files with 2 additions and 24 deletions

View File

@@ -1 +1 @@
v5.0.0+2502071804
v5.0.0+2502071814

View File

@@ -118,7 +118,6 @@ func (ud *UIA2Driver) NewSession(capabilities option.Capabilities) (sessionInfo
sessionID := reply.Value.SessionId
ud.Reset()
ud.sessionID = sessionID
// d.sessionIdCache[sessionID] = true
return Session{sessionID: sessionID}, nil
}

View File

@@ -19,5 +19,4 @@ type IDevice interface {
Uninstall(packageName string) error
GetPackageInfo(packageName string) (AppInfo, error)
GetCurrentWindow() (windowInfo WindowInfo, err error)
}

View File

@@ -135,7 +135,3 @@ func (dev *HarmonyDevice) GetPackageInfo(packageName string) (AppInfo, error) {
log.Warn().Msg("get package info not implemented for harmony device, skip")
return AppInfo{}, nil
}
func (dev *HarmonyDevice) GetCurrentWindow() (WindowInfo, error) {
return WindowInfo{}, nil
}

View File

@@ -308,18 +308,6 @@ func (dev *IOSDevice) Install(appPath string, opts ...option.InstallOption) (err
return err
}
func (dev *IOSDevice) InstallByUrl(url string, opts ...option.InstallOption) (err error) {
appPath, err := builtin.DownloadFileByUrl(url)
if err != nil {
return err
}
err = dev.Install(appPath, opts...)
if err != nil {
return err
}
return nil
}
func (dev *IOSDevice) Uninstall(bundleId string) error {
svc, err := installationproxy.New(dev.d)
if err != nil {
@@ -635,10 +623,6 @@ func (dev *IOSDevice) NewStubDriver() (driver IDriver, err error) {
return stubDriver, nil
}
func (dev *IOSDevice) GetCurrentWindow() (WindowInfo, error) {
return WindowInfo{}, nil
}
func (dev *IOSDevice) GetPackageInfo(packageName string) (AppInfo, error) {
svc, err := installationproxy.New(dev.d)
if err != nil {

View File

@@ -29,7 +29,7 @@ do
echo "(gofumpt) $file"
gofumpt -w "$file"
echo "(goimports-reviser) $file"
goimports-reviser -file-path "$file" -rm-unused
goimports-reviser -file-path "$file" -rm-unused -format
git add "$file"
done