aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2020-09-21 20:57:45 -0700
committerScott Jackson <daneren2005@gmail.com>2020-09-21 20:57:45 -0700
commit6bb874598c5e4bfa905ef0c7023af641ced914ce (patch)
tree576e81073041e0ad0503330a968f9c85a248c2d8 /app
parentc62b800dc5438081cea0a5a7b625d7e904da16bb (diff)
downloaddsub-6bb874598c5e4bfa905ef0c7023af641ced914ce.tar.gz
dsub-6bb874598c5e4bfa905ef0c7023af641ced914ce.tar.bz2
dsub-6bb874598c5e4bfa905ef0c7023af641ced914ce.zip
Fix shut up google notification playing when pressing play from new notification
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/service/DownloadService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
index aa9fcc66..77bc2516 100644
--- a/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
+++ b/app/src/main/java/github/daneren2005/dsub/service/DownloadService.java
@@ -310,7 +310,9 @@ public class DownloadService extends Service {
public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(intent, flags, startId);
lifecycleSupport.onStart(intent);
- if(Build.VERSION.SDK_INT >= 26 && !this.isForeground()) {
+
+ String action = intent.getAction();
+ if(Build.VERSION.SDK_INT >= 26 && !this.isForeground() && !"KEYCODE_MEDIA_START".equals(action)) {
Notifications.shutGoogleUpNotification(this);
}
return START_NOT_STICKY;