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

Commit

Permalink
Merge pull request #89 from grandcentrix/bugfix/clear_but_uses_abstra…
Browse files Browse the repository at this point in the history
…ct_class_instead_of_implementation

Weaken Parameter type for clearBut Methods
  • Loading branch information
passsy authored Feb 7, 2017
2 parents 192b10d + caccae5 commit 347a97f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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

0 comments on commit 347a97f

Please sign in to comment.