mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-07 23:42:16 +00:00
Merge branch 'disappear-2' of github.com:bemusementpark/session-android into disappear-2
This commit is contained in:
@@ -25,8 +25,10 @@ import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
import android.content.pm.ServiceInfo;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Binder;
|
||||
import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import android.os.SystemClock;
|
||||
|
||||
@@ -250,7 +252,11 @@ public class KeyCachingService extends Service {
|
||||
builder.setContentIntent(buildLaunchIntent());
|
||||
|
||||
stopForeground(true);
|
||||
startForeground(SERVICE_RUNNING_ID, builder.build());
|
||||
if (Build.VERSION.SDK_INT >= 34) {
|
||||
startForeground(SERVICE_RUNNING_ID, builder.build(), ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE);
|
||||
} else {
|
||||
startForeground(SERVICE_RUNNING_ID, builder.build());
|
||||
}
|
||||
}
|
||||
|
||||
private PendingIntent buildLockIntent() {
|
||||
|
||||
Reference in New Issue
Block a user