Merge branch 'Use_ServiceCompat_stopForeground' into 'master'
Use ServiceCompat.stopForeground(). See merge request fdroid/fdroidclient!956
This commit is contained in:
commit
81ba7148d3
@ -21,6 +21,7 @@ import android.util.Log;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.app.NotificationCompat;
|
import androidx.core.app.NotificationCompat;
|
||||||
|
import androidx.core.app.ServiceCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||||
|
|
||||||
@ -452,7 +453,7 @@ public class SwapService extends Service {
|
|||||||
if (timer != null) {
|
if (timer != null) {
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
}
|
}
|
||||||
stopForeground(true);
|
ServiceCompat.stopForeground(this, ServiceCompat.STOP_FOREGROUND_REMOVE);
|
||||||
|
|
||||||
deleteAllSwapRepos();
|
deleteAllSwapRepos();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user