Lines Matching refs:phoneId
89 // Carrier configs from default app, indexed by phoneID.
91 // Carrier configs from privileged carrier config app, indexed by phoneID.
135 // For each phoneId, the event sequence should be:
153 int phoneId = msg.arg1;
154 log("mHandler: " + msg.what + " phoneId: " + phoneId);
162 if (mConfigFromDefaultApp[phoneId] == null &&
163 mConfigFromCarrierApp[phoneId] == null)
165 mConfigFromDefaultApp[phoneId] = null;
166 mConfigFromCarrierApp[phoneId] = null;
167 mServiceConnection[phoneId] = null;
168 broadcastConfigChangedIntent(phoneId);
184 iccid = getIccIdForPhoneId(phoneId);
188 + " phoneId=" + phoneId);
189 mConfigFromDefaultApp[phoneId] = config;
190 Message newMsg = obtainMessage(EVENT_LOADED_FROM_DEFAULT, phoneId, -1);
195 phoneId, EVENT_CONNECTED_TO_DEFAULT)) {
196 sendMessageDelayed(obtainMessage(EVENT_BIND_DEFAULT_TIMEOUT, phoneId, -1),
200 broadcastConfigChangedIntent(phoneId);
207 carrierId = getCarrierIdForPhoneId(phoneId);
210 if (mServiceConnection[phoneId] != conn || conn.service == null) {
218 iccid = getIccIdForPhoneId(phoneId);
220 mConfigFromDefaultApp[phoneId] = config;
221 sendMessage(obtainMessage(EVENT_LOADED_FROM_DEFAULT, phoneId, -1));
225 mContext.unbindService(mServiceConnection[phoneId]);
230 mContext.unbindService(mServiceConnection[phoneId]);
231 broadcastConfigChangedIntent(phoneId);
238 && mServiceConnection[phoneId] == null) {
241 carrierPackageName = getCarrierPackageForPhoneId(phoneId);
244 sendMessage(obtainMessage(EVENT_FETCH_CARRIER, phoneId));
246 broadcastConfigChangedIntent(phoneId);
251 carrierPackageName = getCarrierPackageForPhoneId(phoneId);
252 iccid = getIccIdForPhoneId(phoneId);
255 log("Loaded config from XML. package=" + carrierPackageName + " phoneId="
256 + phoneId);
257 mConfigFromCarrierApp[phoneId] = config;
258 Message newMsg = obtainMessage(EVENT_LOADED_FROM_CARRIER, phoneId, -1);
263 && bindToConfigPackage(carrierPackageName, phoneId,
265 sendMessageDelayed(obtainMessage(EVENT_BIND_CARRIER_TIMEOUT, phoneId, -1),
269 broadcastConfigChangedIntent(phoneId);
276 carrierId = getCarrierIdForPhoneId(phoneId);
279 if (mServiceConnection[phoneId] != conn ||
288 carrierPackageName = getCarrierPackageForPhoneId(phoneId);
289 iccid = getIccIdForPhoneId(phoneId);
291 mConfigFromCarrierApp[phoneId] = config;
292 sendMessage(obtainMessage(EVENT_LOADED_FROM_CARRIER, phoneId, -1));
296 mContext.unbindService(mServiceConnection[phoneId]);
301 mContext.unbindService(mServiceConnection[phoneId]);
302 broadcastConfigChangedIntent(phoneId);
309 && mServiceConnection[phoneId] == null) {
312 broadcastConfigChangedIntent(phoneId);
373 private void broadcastConfigChangedIntent(int phoneId) {
376 SubscriptionManager.putPhoneIdAndSubIdExtra(intent, phoneId);
382 private boolean bindToConfigPackage(String pkgName, int phoneId, int eventId) {
383 log("Binding to " + pkgName + " for phone " + phoneId);
386 mServiceConnection[phoneId] = new CarrierServiceConnection(phoneId, eventId);
388 return mContext.bindService(carrierService, mServiceConnection[phoneId],
395 private CarrierIdentifier getCarrierIdForPhoneId(int phoneId) {
401 String spn = TelephonyManager.from(mContext).getSimOperatorNameForPhone(phoneId);
402 String simOperator = TelephonyManager.from(mContext).getSimOperatorNumericForPhone(phoneId);
408 Phone phone = PhoneFactory.getPhone(phoneId);
419 private String getCarrierPackageForPhoneId(int phoneId) {
422 new Intent(CarrierService.CARRIER_SERVICE_INTERFACE), phoneId);
430 private String getIccIdForPhoneId(int phoneId) {
431 if (!SubscriptionManager.isValidPhoneId(phoneId)) {
434 Phone phone = PhoneFactory.getPhone(phoneId);
604 * This reads config bundles for the given phoneId. That means getting the latest bundle from
608 private void updateConfigForPhoneId(int phoneId) {
611 if (mConfigFromCarrierApp[phoneId] != null &&
612 getCarrierPackageForPhoneId(phoneId) == null) {
613 mConfigFromCarrierApp[phoneId] = null;
615 mHandler.sendMessage(mHandler.obtainMessage(EVENT_FETCH_DEFAULT, phoneId, -1));
627 int phoneId = SubscriptionManager.getPhoneId(subId);
629 if (SubscriptionManager.isValidPhoneId(phoneId)) {
630 PersistableBundle config = mConfigFromDefaultApp[phoneId];
633 config = mConfigFromCarrierApp[phoneId];
642 int phoneId = SubscriptionManager.getPhoneId(subId);
643 if (!SubscriptionManager.isValidPhoneId(phoneId)) {
644 log("Ignore invalid phoneId: " + phoneId + " for subId: " + subId);
661 updateConfigForPhoneId(phoneId);
665 public void updateConfigForPhoneId(int phoneId, String simState) {
668 log("update config for phoneId: " + phoneId + " simState: " + simState);
669 if (!SubscriptionManager.isValidPhoneId(phoneId)) {
677 mHandler.sendMessage(mHandler.obtainMessage(EVENT_CLEAR_CONFIG, phoneId, -1));
681 updateConfigForPhoneId(phoneId);
703 int phoneId;
707 public CarrierServiceConnection(int phoneId, int eventId) {
708 this.phoneId = phoneId;
716 mHandler.sendMessage(mHandler.obtainMessage(eventId, phoneId, -1, this));
741 // We don't have a phoneId for arg1.