This will make it easier to expose SecureStore to Rust as our native Rust codebase as inherently stateless.
Details
Details
- Reviewers
marcin kamil - Commits
- rCOMMcffd38ff042f: [native] Make SecureStore methods static
Tested on Android and iOS physical devices:
- Add log to SQLiteQueryExecutor::initilize that prints maybeEncryptionKey read from Secure Store
- Open the app -> encryption key is logged
- Log out and log in to trigger creation of a new encryption key
- Restart the app -> a different encryption key is logged
Tested notifications on physical devices:
- Send notification - ensure it is displayed correctly.
- Send notification to backgrounded app, kill keyserver in the terminal and open the app. Ensure that data delivered with notification are present even though the keyserver is not running.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/cpp/CommonCpp/Tools/CommSecureStore.h | ||
---|---|---|
13–15 ↗ | (On Diff #33387) | This needs to be inline because each variable can only be defined once. In case of instance variables this can be done in a header file (as each instance has a "separate" variable). In case of static variables their values normally would be specified in the .cpp files which is problematic for us as we have a separate implementations for iOS and Android. Fortunately we can use C++17 feature and mark them as inline which allows us the specify value in the header file. C++ reference, section "Static data members" |
Comment Actions
Test plan should include an additional steps that ensure notifications functionality is not broken by those changes:
- Send notification - ensure it is displayed correctly.
- Send notification to backgrounded app, kill keyserver in the terminal and open the app. Ensure that data delivered with notification are present even though the keyserver is not running.