From ee882187fbf9eed30681fd08422e8677b47a51ee Mon Sep 17 00:00:00 2001 From: Stefan Niedermann Date: Thu, 16 Apr 2020 09:18:56 +0200 Subject: [PATCH] Move Deck exception classes into own files https://github.com/stefan-niedermann/nextcloud-deck/issues/208 --- .../integration/AppCannotHandelNotificationException.java | 4 ++++ .../client/integration/AppNotInstalledException.java | 4 ++++ .../nextcloud/client/integration/NotificationHandler.java | 6 ------ .../client/integration/deck/DeckNotificationHandler.java | 2 ++ 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 src/main/java/com/nextcloud/client/integration/AppCannotHandelNotificationException.java create mode 100644 src/main/java/com/nextcloud/client/integration/AppNotInstalledException.java diff --git a/src/main/java/com/nextcloud/client/integration/AppCannotHandelNotificationException.java b/src/main/java/com/nextcloud/client/integration/AppCannotHandelNotificationException.java new file mode 100644 index 0000000000..79872be01a --- /dev/null +++ b/src/main/java/com/nextcloud/client/integration/AppCannotHandelNotificationException.java @@ -0,0 +1,4 @@ +package com.nextcloud.client.integration; + +public class AppCannotHandelNotificationException extends Exception { +} diff --git a/src/main/java/com/nextcloud/client/integration/AppNotInstalledException.java b/src/main/java/com/nextcloud/client/integration/AppNotInstalledException.java new file mode 100644 index 0000000000..469330389d --- /dev/null +++ b/src/main/java/com/nextcloud/client/integration/AppNotInstalledException.java @@ -0,0 +1,4 @@ +package com.nextcloud.client.integration; + +public class AppNotInstalledException extends Exception { +} diff --git a/src/main/java/com/nextcloud/client/integration/NotificationHandler.java b/src/main/java/com/nextcloud/client/integration/NotificationHandler.java index a39b175e92..d71c2e3f25 100644 --- a/src/main/java/com/nextcloud/client/integration/NotificationHandler.java +++ b/src/main/java/com/nextcloud/client/integration/NotificationHandler.java @@ -12,10 +12,4 @@ public interface NotificationHandler { @NonNull Intent handleNotification(@NonNull final Notification notification, @NonNull final User user) throws AppNotInstalledException, AppCannotHandelNotificationException; - - class AppNotInstalledException extends Exception { - } - - class AppCannotHandelNotificationException extends Exception { - } } diff --git a/src/main/java/com/nextcloud/client/integration/deck/DeckNotificationHandler.java b/src/main/java/com/nextcloud/client/integration/deck/DeckNotificationHandler.java index bd91ecf941..6366198593 100644 --- a/src/main/java/com/nextcloud/client/integration/deck/DeckNotificationHandler.java +++ b/src/main/java/com/nextcloud/client/integration/deck/DeckNotificationHandler.java @@ -5,6 +5,8 @@ import android.content.Intent; import android.util.Log; import com.nextcloud.client.account.User; +import com.nextcloud.client.integration.AppCannotHandelNotificationException; +import com.nextcloud.client.integration.AppNotInstalledException; import com.nextcloud.client.integration.NotificationHandler; import com.owncloud.android.lib.resources.notifications.models.Notification;