Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3ce23e17 authored by Abhishek Adappa's avatar Abhishek Adappa Committed by Ricardo Cerqueira
Browse files

Don't display prompt when card inserted/removed

UiccCard displays a prompt to reboot the device when a card is
inserted or removed. Don't display this if the modem supports
hot swapping.

Change-Id: I43fc95e61382671f61286818304ec58e922e8605
parent ba19a968
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -228,6 +228,15 @@ public class UiccCard {
    }

    private void onIccSwap(boolean isAdded) {

        boolean isHotSwapSupported = mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_hotswapCapable);

        if(isHotSwapSupported) {
            //no need to prompt the user to reboot the device
            return;
        }

        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,