Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Weaken Parameter type for clearBut Methods #89

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion library/src/main/java/net/grandcentrix/tray/Tray.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package net.grandcentrix.tray;

import net.grandcentrix.tray.core.AbstractTrayPreference;
import net.grandcentrix.tray.core.Preferences;
import net.grandcentrix.tray.core.TrayItem;
import net.grandcentrix.tray.provider.TrayProviderHelper;
Expand Down Expand Up @@ -79,7 +80,7 @@ public boolean clear() {
* @param modules modules excluded when deleting preferences
* @return true when successfully cleared the not stated modules
*/
public boolean clearBut(TrayPreferences... modules) {
public boolean clearBut(AbstractTrayPreference... modules) {
return mProviderHelper.clearBut(modules);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package net.grandcentrix.tray.provider;

import net.grandcentrix.tray.TrayPreferences;
import net.grandcentrix.tray.core.AbstractTrayPreference;
import net.grandcentrix.tray.core.TrayException;
import net.grandcentrix.tray.core.TrayItem;

Expand Down Expand Up @@ -70,11 +71,11 @@ public boolean clear() {
* @return true when successful, false otherwise. true doesn't indicate that something got
* cleared, it just means no error occurred
*/
public boolean clearBut(TrayPreferences... modules) {
public boolean clearBut(AbstractTrayPreference... modules) {
String selection = null;
String[] selectionArgs = new String[]{};

for (final TrayPreferences module : modules) {
for (final AbstractTrayPreference module : modules) {
if (module == null) {
continue;
}
Expand Down