+ @Override
+ public void onBackPressed() {
+ if (currentFolder.isEmpty()) { // Exit Bookmarks if currently in the home folder.
+ super.onBackPressed();
+ } else { // Navigate up one folder.
+ // Place the former parent folder in `currentFolder`.
+ currentFolder = bookmarksDatabaseHelper.getParentFolder(currentFolder);
+
+ // Reload the `ListView`.
+ updateBookmarksListView(currentFolder);
+ }
+ }
+