Esempio n. 1
0
    def get_card_status(self):
        self.dbg_msg ("get_card_status init")
        if not self.is_on() :
            return CARD_STATUS_OFF
        
        pin_status = self.pin_status()
        if pin_status == None:
            return CARD_STATUS_ERROR

        if pin_status == PIN_STATUS_NO_SIM :
            return CARD_STATUS_NO_SIM

        if pin_status == PIN_STATUS_SIM_FAILURE :
            return CARD_STATUS_NO_SIM

        if pin_status == PIN_STATUS_WAITING_PIN :	
            return CARD_STATUS_PIN_REQUIRED

        if pin_status == PIN_STATUS_WAITING_PUK:
            return CARD_STATUS_PUK_REQUIRED
        
        self.dbg_msg ("get_card_status init superclass")
        return MobileDevice.get_card_status(self)