Add message notification task stack

Closes #4893
// FREEBIE
This commit is contained in:
Christian Ascheberg 2015-12-15 15:04:47 +01:00 committed by Moxie Marlinspike
parent 6da86e482d
commit 694e6064bd
2 changed files with 10 additions and 2 deletions

View File

@ -197,7 +197,12 @@
<activity android:name=".ConversationActivity" <activity android:name=".ConversationActivity"
android:windowSoftInputMode="stateUnchanged" android:windowSoftInputMode="stateUnchanged"
android:launchMode="singleTask" android:launchMode="singleTask"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize" /> android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"
android:parentActivityName=".ConversationListActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.thoughtcrime.securesms.ConversationListActivity" />
</activity>
<activity android:name=".ConversationPopupActivity" <activity android:name=".ConversationPopupActivity"
android:windowSoftInputMode="stateVisible" android:windowSoftInputMode="stateVisible"

View File

@ -6,6 +6,7 @@ import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v4.app.TaskStackBuilder;
import org.thoughtcrime.securesms.ConversationActivity; import org.thoughtcrime.securesms.ConversationActivity;
import org.thoughtcrime.securesms.mms.SlideDeck; import org.thoughtcrime.securesms.mms.SlideDeck;
@ -69,7 +70,9 @@ public class NotificationItem {
intent.putExtra("thread_id", threadId); intent.putExtra("thread_id", threadId);
intent.setData((Uri.parse("custom://"+System.currentTimeMillis()))); intent.setData((Uri.parse("custom://"+System.currentTimeMillis())));
return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); return TaskStackBuilder.create(context)
.addNextIntentWithParentStack(intent)
.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);
} }