2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-05 16:45:08 +00:00

New interface for plugins

This commit is contained in:
Albert Vaca
2015-04-12 00:11:30 -07:00
parent 4d65382fa1
commit 25e1505df0
9 changed files with 99 additions and 193 deletions

View File

@@ -25,7 +25,6 @@ import android.app.AlertDialog;
import android.app.Notification;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
@@ -59,11 +58,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
return context.getResources().getString(R.string.pref_plugin_notifications_desc);
}
@Override
public Drawable getIcon() {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean hasSettings() {
return true;
@@ -79,11 +73,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
}
}
@Override
public boolean isEnabledByDefault() {
return true;
}
private boolean hasPermission() {
String notificationListenerList = Settings.Secure.getString(context.getContentResolver(), "enabled_notification_listeners");
return (notificationListenerList != null && notificationListenerList.contains(context.getPackageName()));
@@ -140,9 +129,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
}
}
@Override
public boolean onCreate() {
@@ -173,7 +159,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
}
@Override
public void onDestroy() {
@@ -190,9 +175,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
}
@Override
public void onNotificationRemoved(StatusBarNotification statusBarNotification) {
NotificationId id = NotificationId.fromNotification(statusBarNotification);
@@ -421,9 +403,4 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
}
}
@Override
public Button getInterfaceButton(Activity activity) {
return null;
}
}