DefaultUsageAndDiagnosticsRepository
class DefaultUsageAndDiagnosticsRepository(dataSource: UsageAndDiagnosticsPreferencesDataSource, buildInfoRepository: BuildInfoRepository, diagnostics: DiagnosticsReporter, consentRepository: ConsentRepository) : UsageAndDiagnosticsRepository(source)
Persists reporting and advertising consents, then applies the stored bundle to the consent SDKs. Applying after each write keeps SDK state current even when the settings screen is closed. Unset choices default to enabled in release builds and disabled in debug builds.
DataStore is main-safe, so this needs no dispatcher. A read or write that fails fails with a StorageException.
Constructors
Link copied to clipboard
constructor(dataSource: UsageAndDiagnosticsPreferencesDataSource, buildInfoRepository: BuildInfoRepository, diagnostics: DiagnosticsReporter, consentRepository: ConsentRepository)
Functions
Link copied to clipboard
Emits all usage and diagnostics related consent values.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Stores every value of settings together, for whole-bundle answers such as "Allow all", so observeSettings never reports a mix of the old and new choices in between.
Link copied to clipboard
Link copied to clipboard