Skip to content

Commit

Permalink
Merge pull request #2275 from leancodepl/fix/opening-settings
Browse files Browse the repository at this point in the history
Fix opening settings app with clean state on iOS
  • Loading branch information
piotruela authored Jul 25, 2024
2 parents 7113e33 + 2aca175 commit ea94465
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/patrol/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- Implement `enableBluetooth` and `disableBluetooth` methods for Android > 11. (#2254)
- Implement `enableAirplaneMode` and `disableAirplaneMode` methods for Android. (#2254)
- Implement `enableLocation` and `disableLocation` methods for Android. (#2259)
- Fix opening settings app with clean state on iOS. (#2275)

## 3.9.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,8 @@
) throws {
try runAction(log) {
self.springboard.activate()
self.preferences.launch() // reset to a known state
self.preferences.activate() // Needed to make sure that settings will be opened with a clean state
self.preferences.launch()

block()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,13 @@
}
}

func enableBluetooth() throws {
func enableLocation() throws {
return try runCatching {
try automator.enableLocation()
}
}

func disableBluetooth() throws {
func disableLocation() throws {
return try runCatching {
try automator.disableLocation()
}
Expand Down

0 comments on commit ea94465

Please sign in to comment.