@Override protected void onDestroy() { if (mPermissionDatabase != null) { mPermissionDatabase.close(); } super.onDestroy(); }