From 077bd07fcab73731b2e83cc290781c519496a8d4 Mon Sep 17 00:00:00 2001 From: <@localhost> Date: Sat, 14 Jul 2012 22:03:14 -0400 Subject: [PATCH] Added Flags to prevent the confirmation dialog from appearing in recents --- AutoPlayer/AndroidManifest.xml | 20 +++++++++++++------ .../android/AutoPlayer/HeadPhoneReceiver.java | 4 ++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/AutoPlayer/AndroidManifest.xml b/AutoPlayer/AndroidManifest.xml index 670cf21..a47293b 100644 --- a/AutoPlayer/AndroidManifest.xml +++ b/AutoPlayer/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="8" + android:versionName="1.1" > @@ -14,17 +14,22 @@ + android:theme="@style/MyTheme" + > + android:label="@string/app_name" + > - + + @@ -48,10 +53,13 @@ android:configChanges="keyboard|keyboardHidden|orientation" android:launchMode="singleInstance" android:theme="@style/MyDialogTheme" > + android:noHistory="true" + android:excludeFromRecents="true" + android:taskAffinity="" - \ No newline at end of file + diff --git a/AutoPlayer/src/com/TwentyCodes/android/AutoPlayer/HeadPhoneReceiver.java b/AutoPlayer/src/com/TwentyCodes/android/AutoPlayer/HeadPhoneReceiver.java index 224668a..ed848b1 100644 --- a/AutoPlayer/src/com/TwentyCodes/android/AutoPlayer/HeadPhoneReceiver.java +++ b/AutoPlayer/src/com/TwentyCodes/android/AutoPlayer/HeadPhoneReceiver.java @@ -56,7 +56,7 @@ public class HeadPhoneReceiver extends BroadcastReceiver { //Perform user's settings if(mSettings.getBoolean(AutoPlayerActivity.KEY_CONFIRM, false)) - context.startActivity(new Intent(context, ConfirmDialog.class).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); + context.startActivity(new Intent(context, ConfirmDialog.class).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)); else applySettings(); } @@ -120,4 +120,4 @@ public class HeadPhoneReceiver extends BroadcastReceiver { } } -} \ No newline at end of file +}