Merge pull request #251 from cyb3rko/increase-minSdkVersion

Increase minSdkVersion
This commit is contained in:
Jannis Mattheis
2022-10-22 10:10:04 +00:00
committed by GitHub
2 changed files with 14 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ android {
compileSdkVersion 30 compileSdkVersion 30
defaultConfig { defaultConfig {
applicationId "com.github.gotify" applicationId "com.github.gotify"
minSdkVersion 19 minSdkVersion 23
targetSdkVersion 30 targetSdkVersion 30
versionCode 26 versionCode 26
versionName "2.4.0" versionName "2.4.0"

View File

@@ -240,7 +240,9 @@ public class WebSocketService extends Service {
private void showForegroundNotification(String title, String message) { private void showForegroundNotification(String title, String message) {
Intent notificationIntent = new Intent(this, MessagesActivity.class); Intent notificationIntent = new Intent(this, MessagesActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); PendingIntent pendingIntent =
PendingIntent.getActivity(
this, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationCompat.Builder notificationBuilder = NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this, NotificationSupport.Channel.FOREGROUND); new NotificationCompat.Builder(this, NotificationSupport.Channel.FOREGROUND);
@@ -300,7 +302,11 @@ public class WebSocketService extends Service {
} }
PendingIntent contentIntent = PendingIntent contentIntent =
PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.getActivity(
this,
0,
intent,
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
NotificationCompat.Builder b = NotificationCompat.Builder b =
new NotificationCompat.Builder( new NotificationCompat.Builder(
@@ -353,7 +359,11 @@ public class WebSocketService extends Service {
public void showNotificationGroup(long priority) { public void showNotificationGroup(long priority) {
Intent intent = new Intent(this, MessagesActivity.class); Intent intent = new Intent(this, MessagesActivity.class);
PendingIntent contentIntent = PendingIntent contentIntent =
PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); PendingIntent.getActivity(
this,
0,
intent,
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
NotificationCompat.Builder b = NotificationCompat.Builder b =
new NotificationCompat.Builder( new NotificationCompat.Builder(