Merge c8ab0ae7be7ae2d10b983a0e0b6fd68729b98868 into 8a05c05596ca9ba0735dafd8e359885de4c2c969
This commit is contained in:
commit
865bdef2aa
@ -892,9 +892,11 @@ final class GatewayConnectionController {
|
||||
permissions["camera"] = AVCaptureDevice.authorizationStatus(for: .video) == .authorized
|
||||
permissions["microphone"] = AVCaptureDevice.authorizationStatus(for: .audio) == .authorized
|
||||
permissions["speechRecognition"] = SFSpeechRecognizer.authorizationStatus() == .authorized
|
||||
if let appModel = self.appModel {
|
||||
permissions["location"] = Self.isLocationAuthorized(
|
||||
status: CLLocationManager().authorizationStatus)
|
||||
status: appModel.locationAuthorizationStatus())
|
||||
&& CLLocationManager.locationServicesEnabled()
|
||||
}
|
||||
permissions["screenRecording"] = RPScreenRecorder.shared().isAvailable
|
||||
|
||||
let photoStatus = PHPhotoLibrary.authorizationStatus(for: .readWrite)
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import CoreLocation
|
||||
import OpenClawChatUI
|
||||
import OpenClawKit
|
||||
import OpenClawProtocol
|
||||
@ -514,6 +515,10 @@ final class NodeAppModel {
|
||||
}
|
||||
}
|
||||
|
||||
func locationAuthorizationStatus() -> CLAuthorizationStatus {
|
||||
self.locationService.authorizationStatus()
|
||||
}
|
||||
|
||||
func requestLocationPermissions(mode: OpenClawLocationMode) async -> Bool {
|
||||
guard mode != .off else { return true }
|
||||
let status = await self.locationService.ensureAuthorization(mode: mode)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user