aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-08-06 11:48:08 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-08-06 11:48:08 +0000
commit326cbd406461b727f9afd9ffe519732e2a20d1b3 (patch)
tree8e85925ed2a9e087fc3692618b0cd49ec644b09c /app/src/main/java
parent43dc0409acbefc9f486831d78767b2484bc6cb16 (diff)
downloadinfinity-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.java10
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