diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-08-06 11:48:08 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-08-06 11:48:08 +0000 |
commit | 326cbd406461b727f9afd9ffe519732e2a20d1b3 (patch) | |
tree | 8e85925ed2a9e087fc3692618b0cd49ec644b09c | |
parent | 43dc0409acbefc9f486831d78767b2484bc6cb16 (diff) | |
download | infinity-for-reddit-326cbd406461b727f9afd9ffe519732e2a20d1b3.tar infinity-for-reddit-326cbd406461b727f9afd9ffe519732e2a20d1b3.tar.gz infinity-for-reddit-326cbd406461b727f9afd9ffe519732e2a20d1b3.tar.bz2 infinity-for-reddit-326cbd406461b727f9afd9ffe519732e2a20d1b3.tar.lz infinity-for-reddit-326cbd406461b727f9afd9ffe519732e2a20d1b3.tar.xz infinity-for-reddit-326cbd406461b727f9afd9ffe519732e2a20d1b3.tar.zst infinity-for-reddit-326cbd406461b727f9afd9ffe519732e2a20d1b3.zip |
Fix Applying Material You notification cannot be dismissed.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java index 583686fa..66bd4e0b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/MaterialYouService.java @@ -82,11 +82,17 @@ public class MaterialYouService extends Service { MaterialYouUtils.changeTheme(this, executor, new Handler(), redditDataRoomDatabase, customThemeWrapper, lightThemeSharedPreferences, darkThemeSharedPreferences, amoledThemeSharedPreferences, () -> { - stopForeground(true); - stopSelf(); + stopService(); }); + } else { + stopService(); } return START_NOT_STICKY; } + + private void stopService() { + stopForeground(true); + stopSelf(); + } }
\ No newline at end of file |