Added Flags to prevent the confirmation dialog from appearing in recents

This commit is contained in:
2012-07-14 22:03:14 -04:00
parent 069a42749d
commit 077bd07fca
2 changed files with 16 additions and 8 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.TwentyCodes.android.AutoPlayer"
android:versionCode="7"
android:versionName="1.0" >
android:versionCode="8"
android:versionName="1.1" >
<uses-sdk android:minSdkVersion="7" />
@@ -14,17 +14,22 @@
<application
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/MyTheme" >
android:theme="@style/MyTheme"
>
<activity
android:name=".AutoPlayerActivity"
android:label="@string/app_name" >
android:label="@string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.TwentyCodes.android.exception.ExceptionReportActivity" >
<activity android:name="com.TwentyCodes.android.exception.ExceptionReportActivity"
android:noHistory="true"
android:excludeFromRecents="true">
</activity>
<receiver android:name="HeadPhoneReceiver" >
@@ -48,6 +53,9 @@
android:configChanges="keyboard|keyboardHidden|orientation"
android:launchMode="singleInstance"
android:theme="@style/MyDialogTheme" >
android:noHistory="true"
android:excludeFromRecents="true"
android:taskAffinity=""
</activity>
<service android:name="com.TwentyCodes.android.exception.ReportPostingService" >

View File

@@ -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();
}