forked from leolin310148/ShortcutBadger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request leolin310148#51 from MajeurAndroid/master
Fixed context leak issue
- Loading branch information
Showing
16 changed files
with
201 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
ShortcutBadger/src/main/java/me/leolin/shortcutbadger/Badger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package me.leolin.shortcutbadger; | ||
|
||
import android.content.ComponentName; | ||
import android.content.Context; | ||
|
||
import java.util.List; | ||
|
||
public interface Badger { | ||
|
||
/** | ||
* Called when user attempts to update notification count | ||
* @param context Caller context | ||
* @param componentName Component containing package and class name of calling application's | ||
* launcher activity | ||
* @param badgeCount Desired notification count | ||
* @throws ShortcutBadgeException | ||
*/ | ||
void executeBadge(Context context, ComponentName componentName, int badgeCount) throws ShortcutBadgeException; | ||
|
||
/** | ||
* Called to let {@link ShortcutBadger} knows which launchers are supported by this badger. It should return a | ||
* {@link List<String>} containing supported launchers package names | ||
*/ | ||
List<String> getSupportLaunchers(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.