コード例 #1
0
 public void initialize() {
   try {
     createDB();
   } catch (IOException e) {
     Logging.Log(LOG_TAG, "Unable to create database");
     Logging.Log(LOG_TAG, e.getStackTrace().toString());
   }
   if (!needsUpgrade) {
     try {
       openDataBase();
     } catch (SQLException e) {
       Logging.Log(LOG_TAG, "Unable to open database");
       Logging.Log(LOG_TAG, e.getStackTrace().toString());
     }
   }
 }
コード例 #2
0
 public void openDB(String caller) {
   if (!db.isOpen()) {
     openDataBase();
     Logging.Log(LOG_TAG, "DB opened by: " + caller);
   }
 }