Closed Bug 941345 Opened 11 years ago Closed 10 years ago

sim change not detected

Categories

(Firefox OS Graveyard :: RIL, defect)

x86
macOS
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED DUPLICATE of bug 999311
tracking-b2g backlog

People

(Reporter: dietrich, Unassigned)

References

Details

(Keywords: feature)

master + mozilla-central, Nexus 4 (JB). When i pull sim card out and put a new one in, it should show a notification saying the phone should be restarted.
Hi Dietrich, Is this bug about Gaia didn't report SIMcard missing(Bug 940297) or Gaia should asks the users to reboot ? Thanks
Hi Yoshi: I guess Dietrich is talking a feature in AOSP. When remove SIM -> Insert a new SIM. AOSP will pop a dailog to notify user there is a SIM hotswap occurred. After user click ok, device will reboot. // AOSP prompt strings <!-- See SIM_ADDED_DIALOG. This is the title of that dialog. --> <string name="sim_added_title">SIM card added</string> <!-- See SIM_ADDED_DIALOG. This is the message of that dialog. --> <string name="sim_added_message">Restart your device to access the mobile network.</string> <!-- See SIM_ADDED_DIALOG. This is the button of that dialog. --> <string name="sim_restart_button">Restart</string> // Code frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/UiccCard.java private void onIccSwap(boolean isAdded) { synchronized (mLock) { // TODO: Here we assume the device can't handle SIM hot-swap // and has to reboot. We may want to add a property, // e.g. REBOOT_ON_SIM_SWAP, to indicate if modem support // hot-swap. DialogInterface.OnClickListener listener = null; // TODO: SimRecords is not reset while SIM ABSENT (only reset while // Radio_off_or_not_available). Have to reset in both both // added or removed situation. listener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { synchronized (mLock) { if (which == DialogInterface.BUTTON_POSITIVE) { if (DBG) log("Reboot due to SIM swap"); PowerManager pm = (PowerManager) mContext .getSystemService(Context.POWER_SERVICE); pm.reboot("SIM is added."); } } } }; Resources r = Resources.getSystem(); String title = (isAdded) ? r.getString(R.string.sim_added_title) : r.getString(R.string.sim_removed_title); String message = (isAdded) ? r.getString(R.string.sim_added_message) : r.getString(R.string.sim_removed_message); String buttonTxt = r.getString(R.string.sim_restart_button); AlertDialog dialog = new AlertDialog.Builder(mContext) .setTitle(title) .setMessage(message) .setPositiveButton(buttonTxt, listener) .create(); dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); dialog.show(); } }
Correct, nothing at all happened.
Keywords: feature
Put it in backlog.
blocking-b2g: --- → backlog
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.