summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Mok <kmok@cyngn.com>2016-06-07 09:20:05 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-06-09 13:12:40 -0700
commit837b626c636f870048a6a724f9d094d2749f104e (patch)
treec7281f2a1a0a49506ac90cb9d3534639c4376bba
parente4554833bf7369b7cf2bf708b745e6f83ad9f192 (diff)
downloadandroid_packages_apps_SoundRecorder-stable/cm-13.0-ZNH2KB.tar.gz
android_packages_apps_SoundRecorder-stable/cm-13.0-ZNH2KB.tar.bz2
android_packages_apps_SoundRecorder-stable/cm-13.0-ZNH2KB.zip
Set notification to auto clean.stable/cm-13.0-ZNH2KB
There is currently no API to remove notification when application is killed manually. A workaround for it, is just to set AutoClean for the notification when user clicks it. An alternative way is to clear notification when application starts. We choose the 1st option. FEIJ-1070 Change-Id: Ia057f3a66cb7f95de3be4dcae3557d8bb5023891 (cherry picked from commit ee23f8e67fcd920126322fbc8c5ca7816f909759)
-rw-r--r--src/com/android/soundrecorder/SoundRecorder.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/soundrecorder/SoundRecorder.java b/src/com/android/soundrecorder/SoundRecorder.java
index 641ea02..d68202c 100644
--- a/src/com/android/soundrecorder/SoundRecorder.java
+++ b/src/com/android/soundrecorder/SoundRecorder.java
@@ -2074,6 +2074,7 @@ public class SoundRecorder extends Activity
.setContentIntent(pendingNotifIntent)
.setSmallIcon(onGoing ? R.drawable.record : R.drawable.record_disabled)
.setOngoing(onGoing)
+ .setAutoCancel(true)
.build();
NotificationManager notificationmanager = (NotificationManager)