+
+ private fun updateDomainsSettingsSet() {
+ // Reset the domains settings set.
+ domainsSettingsSet = HashSet()
+
+ // Get a domains cursor.
+ val domainsCursor = domainsDatabaseHelper!!.domainNameCursorOrderedByDomain
+
+ // Get the current count of domains.
+ val domainsCount = domainsCursor.count
+
+ // Get the domain name column index.
+ val domainNameColumnIndex = domainsCursor.getColumnIndexOrThrow(DomainsDatabaseHelper.DOMAIN_NAME)
+
+ // Populate the domain settings set.
+ for (i in 0 until domainsCount) {
+ // Move the domains cursor to the current row.
+ domainsCursor.moveToPosition(i)
+
+ // Store the domain name in the domain settings set.
+ domainsSettingsSet.add(domainsCursor.getString(domainNameColumnIndex))
+ }
+
+ // Close the domains cursor.
+ domainsCursor.close()
+ }