Lines Matching defs:config

77  * CarrierConfigLoader binds to privileged carrier apps to fetch carrier config overlays.
82 // Package name for default carrier config app, bundled with system image.
91 // Carrier configs from privileged carrier config app, indexed by phoneID.
93 // Service connection for binding to config app.
124 // Rerun carrier config binding after system is unlocked.
143 // If there is a saved config file for either the default app or the carrier app, we skip
152 // 3. clearing config (e.g. due to sim removal)
163 PersistableBundle config;
183 // Only update if there are cached config removed to avoid updating config
195 config = restoreConfigFromXml(DEFAULT_CARRIER_CONFIG_PACKAGE, iccid);
196 if (config != null) {
197 log("Loaded config from XML. package=" + DEFAULT_CARRIER_CONFIG_PACKAGE
199 mConfigFromDefaultApp[phoneId] = config;
227 config = carrierService.getCarrierConfig(carrierId);
229 saveConfigToXml(DEFAULT_CARRIER_CONFIG_PACKAGE, iccid, config);
230 mConfigFromDefaultApp[phoneId] = config;
234 loge("Failed to get carrier config: " + ex.toString());
247 // config was cleared while we were waiting and we should not continue.
254 log("Found carrier config app: " + carrierPackageName);
264 config = restoreConfigFromXml(carrierPackageName, iccid);
265 if (config != null) {
266 log("Loaded config from XML. package=" + carrierPackageName + " phoneId="
268 mConfigFromCarrierApp[phoneId] = config;
298 config = carrierService.getCarrierConfig(carrierId);
301 saveConfigToXml(carrierPackageName, iccid, config);
302 mConfigFromCarrierApp[phoneId] = config;
306 loge("Failed to get carrier config: " + ex.toString());
319 // config was cleared while we were waiting and we should not continue.
397 /** Binds to the default or carrier config app. */
468 * @param config the bundle to be written. Null will be treated as an empty bundle.
470 private void saveConfigToXml(String packageName, String iccid, PersistableBundle config) {
472 loge("Cannot save config with null packageName or iccid.");
475 // b/32668103 Only save to file if config isn't empty.
477 // try loading config again on next power on or sim loaded.
480 if (config == null || config.isEmpty()) {
502 config.saveToXml(out);
521 * config bundle for the given package and ICCID.
523 * In case of errors, or if the saved config is from a different package version than the
528 * @return the bundle from the XML file. Returns null if there is no saved config, the saved
529 * version does not match, or reading config fails.
538 loge("Cannot restore config with null packageName or iccid.");
581 * Clears cached carrier config.
585 * @param packageName the name of a carrier package, or null if all cached config should be
608 /** Builds a canonical file name for a config file. */
623 /** Read up to date config.
625 * This reads config bundles for the given phoneId. That means getting the latest bundle from
627 * have a saved config file to use instead.
630 // Clear in-memory cache for carrier app config, so when carrier app gets uninstalled, no
631 // stale config is left.
651 PersistableBundle config = mConfigFromDefaultApp[phoneId];
652 if (config != null)
653 retConfig.putAll(config);
654 config = mConfigFromCarrierApp[phoneId];
655 if (config != null)
656 retConfig.putAll(config);
691 log("update config for phoneId: " + phoneId + " simState: " + simState);
738 log("Connected to config app: " + name.flattenToString());