bump version to 1.1.8
This commit is contained in:
parent
fbb805390c
commit
df3ae12a91
|
|
@ -132,6 +132,10 @@ Please use version 1.1.0+
|
||||||
|
|
||||||
CHANGE LOG
|
CHANGE LOG
|
||||||
===================================
|
===================================
|
||||||
|
1.1.8:<br/>
|
||||||
|
Remove SolidBadger, now solid launcher will use default badger.
|
||||||
|
|
||||||
|
|
||||||
1.1.7:<br/>
|
1.1.7:<br/>
|
||||||
add huawei launcher support. <br/>
|
add huawei launcher support. <br/>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,10 @@ android {
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
consumerProguardFiles 'proguard-rules.pro'
|
consumerProguardFiles 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lintOptions {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,9 @@ public class ShortcutBadgeException extends Exception {
|
||||||
public ShortcutBadgeException(String message) {
|
public ShortcutBadgeException(String message) {
|
||||||
super(message);
|
super(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ShortcutBadgeException(String message, Exception e) {
|
||||||
|
super(message, e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import android.content.pm.PackageManager;
|
||||||
import android.content.pm.ResolveInfo;
|
import android.content.pm.ResolveInfo;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import me.leolin.shortcutbadger.impl.*;
|
import me.leolin.shortcutbadger.impl.*;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
|
@ -41,7 +42,8 @@ public final class ShortcutBadger {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to update the notification count
|
* Tries to update the notification count
|
||||||
* @param context Caller context
|
*
|
||||||
|
* @param context Caller context
|
||||||
* @param badgeCount Desired badge count
|
* @param badgeCount Desired badge count
|
||||||
* @return true in case of success, false otherwise
|
* @return true in case of success, false otherwise
|
||||||
*/
|
*/
|
||||||
|
|
@ -57,7 +59,8 @@ public final class ShortcutBadger {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to update the notification count, throw a {@link ShortcutBadgeException} if it fails
|
* Tries to update the notification count, throw a {@link ShortcutBadgeException} if it fails
|
||||||
* @param context Caller context
|
*
|
||||||
|
* @param context Caller context
|
||||||
* @param badgeCount Desired badge count
|
* @param badgeCount Desired badge count
|
||||||
*/
|
*/
|
||||||
public static void applyCountOrThrow(Context context, int badgeCount) throws ShortcutBadgeException {
|
public static void applyCountOrThrow(Context context, int badgeCount) throws ShortcutBadgeException {
|
||||||
|
|
@ -77,6 +80,7 @@ public final class ShortcutBadger {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to remove the notification count
|
* Tries to remove the notification count
|
||||||
|
*
|
||||||
* @param context Caller context
|
* @param context Caller context
|
||||||
* @return true in case of success, false otherwise
|
* @return true in case of success, false otherwise
|
||||||
*/
|
*/
|
||||||
|
|
@ -86,6 +90,7 @@ public final class ShortcutBadger {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to remove the notification count, throw a {@link ShortcutBadgeException} if it fails
|
* Tries to remove the notification count, throw a {@link ShortcutBadgeException} if it fails
|
||||||
|
*
|
||||||
* @param context Caller context
|
* @param context Caller context
|
||||||
*/
|
*/
|
||||||
public static void removeCountOrThrow(Context context) throws ShortcutBadgeException {
|
public static void removeCountOrThrow(Context context) throws ShortcutBadgeException {
|
||||||
|
|
@ -108,8 +113,12 @@ public final class ShortcutBadger {
|
||||||
String currentHomePackage = resolveInfo.activityInfo.packageName;
|
String currentHomePackage = resolveInfo.activityInfo.packageName;
|
||||||
|
|
||||||
for (Class<? extends Badger> badger : BADGERS) {
|
for (Class<? extends Badger> badger : BADGERS) {
|
||||||
Badger shortcutBadger = badger.newInstance();
|
Badger shortcutBadger = null;
|
||||||
if (shortcutBadger.getSupportLaunchers().contains(currentHomePackage)) {
|
try {
|
||||||
|
shortcutBadger = badger.newInstance();
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
if (shortcutBadger != null && shortcutBadger.getSupportLaunchers().contains(currentHomePackage)) {
|
||||||
sShortcutBadger = shortcutBadger;
|
sShortcutBadger = shortcutBadger;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ buildscript {
|
||||||
POM_NAME = 'Shortcutbadger'
|
POM_NAME = 'Shortcutbadger'
|
||||||
POM_PACKAGING = 'aar'
|
POM_PACKAGING = 'aar'
|
||||||
POM_ARTIFACT_ID = 'shortcutbadger'
|
POM_ARTIFACT_ID = 'shortcutbadger'
|
||||||
VERSION_NAME = '1.1.7'
|
VERSION_NAME = '1.1.8'
|
||||||
VERSION_CODE = 1
|
VERSION_CODE = 1
|
||||||
GROUP = 'me.leolin'
|
GROUP = 'me.leolin'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue