Exemplo n.º 1
0
 public long addSimCard(SimCard simCard) {
   ContentValues content = new ContentValues();
   content.put("ssn", simCard.getSsn());
   content.put("number", simCard.getNumber());
   content.put("status", simCard.getStatus());
   return getWritableDatabase().insert(SimCard.NAME, null, content);
 }
Exemplo n.º 2
0
  public void dispose() {
    synchronized (PhoneProxy.lockForRadioTechnologyChange) {
      super.dispose();

      // Unregister from all former registered events
      mCM.unregisterForAvailable(this); // EVENT_RADIO_AVAILABLE
      mSIMRecords.unregisterForRecordsLoaded(this); // EVENT_SIM_RECORDS_LOADED
      mCM.unregisterForOffOrNotAvailable(this); // EVENT_RADIO_OFF_OR_NOT_AVAILABLE
      mCM.unregisterForOn(this); // EVENT_RADIO_ON
      mSST.unregisterForNetworkAttach(this); // EVENT_REGISTERED_TO_NETWORK
      mCM.unSetOnUSSD(this);
      mCM.unSetOnSuppServiceNotification(this);

      mPendingMMIs.clear();

      // Force all referenced classes to unregister their former registered events
      mStkService.dispose();
      mCT.dispose();
      mDataConnection.dispose();
      mSST.dispose();
      mIccFileHandler.dispose(); // instance of SimFileHandler
      mSIMRecords.dispose();
      mSimCard.dispose();
      mSimPhoneBookIntManager.dispose();
      mSimSmsIntManager.dispose();
      mSubInfo.dispose();
    }
  }