HomePhabricator
Diffusion Comm e64243b4a3eb

Make CommSecureStore initialization idempotent on Android

Description

Make CommSecureStore initialization idempotent on Android

Summary: This diff makes succesive calls to CommSecureStore.getInstance().initialize(...) idempotent. We need it since MainApplication and CommNotificationsHAndler may initialize CommSecureStore independently of each other.

Test Plan: Temporarily place logging into initialize() method. Check that logs appear only once between succesive foregrounding/backgrounding of the app. Also make sure that logs do not appear after the app is backgrounded and notification is received (CommNotificationsNahdler gets called).

Reviewers: palys-swm, ashoat

Reviewed By: palys-swm, ashoat

Subscribers: ashoat, Adrian, atul, yayabosh

Differential Revision: https://phab.comm.dev/D4240

Details