Skip to content

Commit

Permalink
StorageManager: Fixed default postal code returned for any key in app…
Browse files Browse the repository at this point in the history
… ID namespace. (#604)
  • Loading branch information
pahearn73 authored Aug 21, 2024
1 parent 57fcfcb commit a645570
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main", "1.8.rc" ]
branches: [ "main", "1.8.rc", "1.9.rc" ]

env:
CARGO_TERM_COLOR: always
Expand Down
23 changes: 13 additions & 10 deletions core/main/src/processor/storage/default_storage_properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ use ripple_sdk::{
KEY_ALLOW_WATCH_HISTORY, KEY_AUDIO_DESCRIPTION_ENABLED, KEY_BACKGROUND_COLOR,
KEY_BACKGROUND_OPACITY, KEY_COUNTRY_CODE, KEY_ENABLED, KEY_FONT_COLOR, KEY_FONT_EDGE,
KEY_FONT_EDGE_COLOR, KEY_FONT_FAMILY, KEY_FONT_OPACITY, KEY_FONT_SIZE, KEY_LANGUAGE,
KEY_LOCALE, KEY_NAME, KEY_SKIP_RESTRICTION, KEY_TEXT_ALIGN, KEY_TEXT_ALIGN_VERTICAL,
KEY_WINDOW_COLOR, KEY_WINDOW_OPACITY, NAMESPACE_ADVERTISING, NAMESPACE_AUDIO_DESCRIPTION,
NAMESPACE_CLOSED_CAPTIONS, NAMESPACE_DEVICE_NAME, NAMESPACE_LOCALIZATION,
NAMESPACE_PRIVACY,
KEY_LOCALE, KEY_NAME, KEY_POSTAL_CODE, KEY_SKIP_RESTRICTION, KEY_TEXT_ALIGN,
KEY_TEXT_ALIGN_VERTICAL, KEY_WINDOW_COLOR, KEY_WINDOW_OPACITY, NAMESPACE_ADVERTISING,
NAMESPACE_AUDIO_DESCRIPTION, NAMESPACE_CLOSED_CAPTIONS, NAMESPACE_DEVICE_NAME,
NAMESPACE_LOCALIZATION, NAMESPACE_PRIVACY,
},
log::debug,
};
Expand Down Expand Up @@ -240,12 +240,6 @@ impl DefaultStorageProperties {
key.to_owned(),
)),
}
} else if let Some(defaults) = state
.get_device_manifest()
.get_settings_defaults_per_app()
.get(namespace)
{
Ok(defaults.postal_code.clone())
} else if namespace.eq(NAMESPACE_ADVERTISING) {
match key {
KEY_SKIP_RESTRICTION => Ok(state
Expand All @@ -257,6 +251,15 @@ impl DefaultStorageProperties {
key.to_owned(),
)),
}
} else if let Some(defaults) = state
.get_device_manifest()
.get_settings_defaults_per_app()
.get(namespace)
{
match key {
KEY_POSTAL_CODE => Ok(defaults.postal_code.clone()),
_ => Err(DefaultStoragePropertiesError::NotFound(key.to_owned())),
}
} else {
Err(DefaultStoragePropertiesError::UnreconizedNamespace(
namespace.to_owned(),
Expand Down

0 comments on commit a645570

Please sign in to comment.