()
| 148 | }; |
| 149 | |
| 150 | var getOptions = function () { |
| 151 | var options = ariaNgStorageService.get(ariaNgConstants.optionStorageKey); |
| 152 | |
| 153 | if (options && !ariaNgLanguages[options.language]) { |
| 154 | options.language = getLanguageNameFromAliasOrDefaultLanguage(options.language); |
| 155 | } |
| 156 | |
| 157 | if (!options) { |
| 158 | options = angular.extend({}, ariaNgDefaultOptions); |
| 159 | options.language = getDefaultLanguage(); |
| 160 | |
| 161 | if (!options.rpcHost) { |
| 162 | initRpcSettingWithDefaultHostAndProtocol(options); |
| 163 | } |
| 164 | |
| 165 | if (angular.isArray(options.extendRpcServers)) { |
| 166 | for (var i = 0; i < options.extendRpcServers.length; i++) { |
| 167 | var rpcSetting = options.extendRpcServers[i]; |
| 168 | |
| 169 | if (!rpcSetting.rpcHost) { |
| 170 | initRpcSettingWithDefaultHostAndProtocol(rpcSetting); |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | setOptions(options); |
| 176 | fireFirstVisitEvent(); |
| 177 | } |
| 178 | |
| 179 | return options; |
| 180 | }; |
| 181 | |
| 182 | var clearAll = function () { |
| 183 | return ariaNgStorageService.clearAll(); |
no test coverage detected