mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Fix crash preventing some Xiaomi devices from showing notifications
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
### 1.7.10 (June 15, 2019)
|
||||||
|
|
||||||
|
* Fix bug that prevented some devices from showing notifications.
|
||||||
|
|
||||||
### 1.7.8 (April 21, 2018)
|
### 1.7.8 (April 21, 2018)
|
||||||
|
|
||||||
* Add support for adaptive icons (Oreo)
|
* Add support for adaptive icons (Oreo)
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
<manifest
|
<manifest
|
||||||
package="org.isoron.uhabits"
|
package="org.isoron.uhabits"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:versionCode="36"
|
android:versionCode="37"
|
||||||
android:versionName="1.7.9">
|
android:versionName="1.7.10">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||||
|
|
||||||
|
|||||||
@@ -239,7 +239,13 @@ public class NotificationTray
|
|||||||
|
|
||||||
createAndroidNotificationChannel(context);
|
createAndroidNotificationChannel(context);
|
||||||
int notificationId = getNotificationId(habit);
|
int notificationId = getNotificationId(habit);
|
||||||
|
|
||||||
|
try {
|
||||||
notificationManager.notify(notificationId, builder.build());
|
notificationManager.notify(notificationId, builder.build());
|
||||||
|
} catch(RuntimeException e) {
|
||||||
|
builder.setSound(null);
|
||||||
|
notificationManager.notify(notificationId, builder.build());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldShowReminderToday()
|
private boolean shouldShowReminderToday()
|
||||||
|
|||||||
Reference in New Issue
Block a user