]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkFolderDialog.java
Add a requests activity. https://redmine.stoutner.com/issues/170
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / dialogs / CreateBookmarkFolderDialog.java
index 98fb9dcbaf8690f223604dffdb1aa13ca19dfe60..670d237b5972a66f2cc3c1f82e115ad657e89043 100644 (file)
@@ -54,12 +54,8 @@ public class CreateBookmarkFolderDialog extends AppCompatDialogFragment {
     public void onAttach(Context context) {
         super.onAttach(context);
 
-        // Get a handle for `createBookmarkFolderListener` from `context`.
-        try {
-            createBookmarkFolderListener = (CreateBookmarkFolderListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement CreateBookmarkFolderListener.");
-        }
+        // Get a handle for `createBookmarkFolderListener` from the launching context.
+        createBookmarkFolderListener = (CreateBookmarkFolderListener) context;
     }
 
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.