mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-21 07:18:05 -04:00
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:
@@ -160,6 +160,13 @@ public class UpdateService extends IntentService implements ProgressListener {
|
||||
.setOngoing(true)
|
||||
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
||||
.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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user