@Override
 public void onTerminate() {
   super.onTerminate();
   if (networkReceiver != null) {
     unregisterReceiver(networkReceiver);
   }
   backgroundTaskManager.shutdown();
   dbHelper.close();
 }
 @Override
 public void onCreate() {
   super.onCreate();
   dbHelper.getWritableDatabase();
   mi = ck(this);
   accountManager = new INotesAccountManager(this);
   accountManager.init();
   initMkDirs();
   initSetting();
   initTargetHeightWidth();
   registerNetWorkState();
   backgroundTaskManager = new BackgroundTaskManager(30000);
   resetSyncManager();
 }