Backport repo update notification 2.X crash fix
Fixed by @pserwylo in master, backporting for 0.96.1. Fixes #421.
This commit is contained in:
parent
1ebe9df9a2
commit
d0af343dfd
@ -160,6 +160,13 @@ public class UpdateService extends IntentService implements ProgressListener {
|
|||||||
.setOngoing(true)
|
.setOngoing(true)
|
||||||
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
||||||
.setContentTitle(getString(R.string.update_notification_title));
|
.setContentTitle(getString(R.string.update_notification_title));
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
||||||
|
Intent intent = new Intent(this, FDroid.class);
|
||||||
|
// TODO: Is this the correct FLAG?
|
||||||
|
notificationBuilder.setContentIntent(PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT));
|
||||||
|
}
|
||||||
|
|
||||||
notificationManager.notify(NOTIFY_ID_UPDATING, notificationBuilder.build());
|
notificationManager.notify(NOTIFY_ID_UPDATING, notificationBuilder.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user