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:
@@ -21,8 +21,8 @@
|
||||
<manifest
|
||||
package="org.isoron.uhabits"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="36"
|
||||
android:versionName="1.7.9">
|
||||
android:versionCode="37"
|
||||
android:versionName="1.7.10">
|
||||
|
||||
<uses-permission android:name="android.permission.VIBRATE"/>
|
||||
|
||||
|
||||
@@ -239,7 +239,13 @@ public class NotificationTray
|
||||
|
||||
createAndroidNotificationChannel(context);
|
||||
int notificationId = getNotificationId(habit);
|
||||
notificationManager.notify(notificationId, builder.build());
|
||||
|
||||
try {
|
||||
notificationManager.notify(notificationId, builder.build());
|
||||
} catch(RuntimeException e) {
|
||||
builder.setSound(null);
|
||||
notificationManager.notify(notificationId, builder.build());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean shouldShowReminderToday()
|
||||
|
||||
Reference in New Issue
Block a user