aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriele M <moto.falcon.git@gmail.com>2018-07-14 18:17:10 +0200
committerGabriele M <moto.falcon.git@gmail.com>2018-07-14 18:47:12 +0200
commit5648b3cd27b0ffd63f8097fd493bd16c48f60e37 (patch)
treee7cfe1a68dccd29e0456f5d51dda38d9c855e96a
parent4ec02fd780297c68dc5c2ae9144c5f56dfb400a1 (diff)
downloadandroid_packages_apps_Updater-5648b3cd27b0ffd63f8097fd493bd16c48f60e37.tar.gz
android_packages_apps_Updater-5648b3cd27b0ffd63f8097fd493bd16c48f60e37.tar.bz2
android_packages_apps_Updater-5648b3cd27b0ffd63f8097fd493bd16c48f60e37.zip
Don't use one shot PendingIntents for the notification actions
FLAG_ONE_SHOT doesn't make so much sense here, the intents are generic and can be repeated. Change-Id: Ib457d975387dfd838372639e2aaa40a3df6f4d15
-rw-r--r--src/org/lineageos/updater/ExportUpdateService.java3
-rw-r--r--src/org/lineageos/updater/controller/UpdaterService.java9
2 files changed, 4 insertions, 8 deletions
diff --git a/src/org/lineageos/updater/ExportUpdateService.java b/src/org/lineageos/updater/ExportUpdateService.java
index c1393f8..fad6377 100644
--- a/src/org/lineageos/updater/ExportUpdateService.java
+++ b/src/org/lineageos/updater/ExportUpdateService.java
@@ -210,7 +210,6 @@ public class ExportUpdateService extends Service {
private PendingIntent getStopPendingIntent() {
final Intent intent = new Intent(this, ExportUpdateService.class);
intent.setAction(ACTION_STOP_EXPORTING);
- return PendingIntent.getService(this, 0, intent,
- PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_UPDATE_CURRENT);
+ return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
}
}
diff --git a/src/org/lineageos/updater/controller/UpdaterService.java b/src/org/lineageos/updater/controller/UpdaterService.java
index dde8c04..3cb4ada 100644
--- a/src/org/lineageos/updater/controller/UpdaterService.java
+++ b/src/org/lineageos/updater/controller/UpdaterService.java
@@ -446,8 +446,7 @@ public class UpdaterService extends Service {
intent.setAction(ACTION_DOWNLOAD_CONTROL);
intent.putExtra(EXTRA_DOWNLOAD_ID, downloadId);
intent.putExtra(EXTRA_DOWNLOAD_CONTROL, DOWNLOAD_RESUME);
- return PendingIntent.getService(this, 0, intent,
- PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_UPDATE_CURRENT);
+ return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
}
private PendingIntent getPausePendingIntent(String downloadId) {
@@ -455,15 +454,13 @@ public class UpdaterService extends Service {
intent.setAction(ACTION_DOWNLOAD_CONTROL);
intent.putExtra(EXTRA_DOWNLOAD_ID, downloadId);
intent.putExtra(EXTRA_DOWNLOAD_CONTROL, DOWNLOAD_PAUSE);
- return PendingIntent.getService(this, 0, intent,
- PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_UPDATE_CURRENT);
+ return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
}
private PendingIntent getRebootPendingIntent() {
final Intent intent = new Intent(this, UpdaterReceiver.class);
intent.setAction(UpdaterReceiver.ACTION_INSTALL_REBOOT);
- return PendingIntent.getBroadcast(this, 0, intent,
- PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_UPDATE_CURRENT);
+ return PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
}
}