Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL 0282 - Alert Manager #1861

Merged
merged 188 commits into from
Mar 1, 2021
Merged

Conversation

NicoleYarroch
Copy link
Contributor

@NicoleYarroch NicoleYarroch commented Nov 25, 2020

Fixes #1579

Risk

This PR makes minor API changes.

Testing Plan

  • I have verified that I have not introduced new warnings in this PR (or explain why below)
  • I have run the unit tests with this PR
  • I have tested this PR against Core and verified behavior (if applicable, if not applicable, explain why below).

Unit Tests

Unit tests were added for the new alert manager classes.

Core Tests

  • Send a text-field-1 only alert
  • Send a text-field-2 only alert
  • Send an audio file only alert
  • Send a speech synthesizer string only alert
  • Cancel a UI ony alert
  • Cancel a speech only alert
  • Cancel a UI and speech alert
  • Create an alert with a duration of 10 seconds. Send the alert. Wait two seconds and send a second alert (i.e. the first alert should still be on the screen). The second alert should be sent by the alert manager after the module dismisses the first alert (i.e. 8 seconds later).
  • Send an alert, modify the same alert view and send the same view 1 second later.
  • Send an alert with soft buttons. Select one of the soft buttons and make sure the handler is called. Send the same alert view again and make sure the soft button handlers are called when selected.
  • Send an alert with a soft button that has more than one state - an assertion should be thrown
  • Send an alert with neither text, secondaryText or audio set in the SDLAlertView - a custom error should be returned in the completion handler
  • Send an alert with only an audio file set in the SDLAlertView and connect to a module supporting RPC Spec version less than 5.0 - a custom error should be returned in the completion handler

Core version / branch / commit hash / module tested against: SYNC 3.0 and Manticore (SDL Core v6.1.1)
HMI name / version / branch / commit hash / module tested against: SYNC 3.0 and Manticore (Generic HMI v0.8.1)

Summary

Implements proposal SDL 0282 which adds alert management (based on the Alert RPC) to the screen manager API.

Changelog

Enhancements
  • An alert manager was added to the base Screen Manager that handles uploading data needed by the alert and sending the alert.

Tasks Remaining:

  • Testing with Core

CLA

Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
@NicoleYarroch NicoleYarroch self-assigned this Nov 25, 2020
@NicoleYarroch NicoleYarroch added manager-screen Relating to the manager layer - screen managers proposal Accepted SDL Evolution Proposal labels Nov 25, 2020
@codecov
Copy link

codecov bot commented Nov 25, 2020

Codecov Report

Merging #1861 (4b24391) into develop (ccff0af) will increase coverage by 0.40%.
The diff coverage is 98.20%.

@@             Coverage Diff             @@
##           develop    #1861      +/-   ##
===========================================
+ Coverage    85.01%   85.41%   +0.40%     
===========================================
  Files          429      434       +5     
  Lines        21640    22089     +449     
===========================================
+ Hits         18397    18868     +471     
+ Misses        3243     3221      -22     

Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>

# Conflicts:
#	SmartDeviceLink-iOS.xcodeproj/project.pbxproj
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Copy link
Contributor

@joeljfischer joeljfischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small comments

SmartDeviceLink/private/SDLError.m Outdated Show resolved Hide resolved
SmartDeviceLink/private/SDLError.m Outdated Show resolved Hide resolved
SmartDeviceLink/private/SDLError.m Outdated Show resolved Hide resolved
SmartDeviceLink/private/SDLError.m Outdated Show resolved Hide resolved
SmartDeviceLink/private/SDLPresentAlertOperation.m Outdated Show resolved Hide resolved
SmartDeviceLink/private/SDLPresentAlertOperation.m Outdated Show resolved Hide resolved
SmartDeviceLink/private/SDLPresentAlertOperation.m Outdated Show resolved Hide resolved
SmartDeviceLink/private/SDLPresentAlertOperation.m Outdated Show resolved Hide resolved
SmartDeviceLink/public/SDLAudioData.m Outdated Show resolved Hide resolved
SmartDeviceLink/public/SDLAudioData.m Outdated Show resolved Hide resolved
NicoleYarroch and others added 12 commits February 3, 2021 15:21
Audio data fixes

Co-authored-by: Joel Fischer <joeljfischer@gmail.com>
custom error fixes

Co-authored-by: Joel Fischer <joeljfischer@gmail.com>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Updated present alert operation

Co-authored-by: Joel Fischer <joeljfischer@gmail.com>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Signed-off-by: NicoleYarroch <nicole@livio.io>
Copy link
Contributor

@joeljfischer joeljfischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more minor point.

SmartDeviceLink/public/SDLAudioData.m Outdated Show resolved Hide resolved
Co-authored-by: Joel Fischer <joeljfischer@gmail.com>
Signed-off-by: NicoleYarroch <nicole@livio.io>

# Conflicts:
#	SmartDeviceLink-iOS.xcodeproj/project.pbxproj
#	SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowCapabilitySpec.m
@joeljfischer joeljfischer merged commit 7371e4a into develop Mar 1, 2021
@joeljfischer joeljfischer deleted the feature/issue_1579_alert_manager branch March 1, 2021 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manager-screen Relating to the manager layer - screen managers proposal Accepted SDL Evolution Proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SDL 0282] Screen Manager Alert Manager
2 participants