(runtime, options = {})
| 304 | SystemAppSwitcherCommandOptions | undefined, |
| 305 | SystemAppSwitcherCommandResult |
| 306 | > = async (runtime, options = {}): Promise<SystemAppSwitcherCommandResult> => { |
| 307 | if (!runtime.backend.openAppSwitcher) { |
| 308 | throw new AppError( |
| 309 | 'UNSUPPORTED_OPERATION', |
| 310 | 'system.appSwitcher is not supported by this backend', |
| 311 | ); |
| 312 | } |
| 313 | const backendResult = await runtime.backend.openAppSwitcher(toBackendContext(runtime, options)); |
| 314 | const formattedBackendResult = toBackendResult(backendResult); |
| 315 | return { |
| 316 | kind: 'appSwitcherOpened', |
| 317 | ...(formattedBackendResult ? { backendResult: formattedBackendResult } : {}), |
| 318 | ...successText('Opened app switcher'), |
| 319 | }; |
| 320 | }; |
| 321 | |
| 322 | function requireOrientation(orientation: BackendDeviceOrientation): BackendDeviceOrientation { |
| 323 | switch (orientation) { |
nothing calls this directly
no test coverage detected