mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-20 11:52:07 +00:00
Workaround for Android bug when swiped from recent tasks list.
Closes #168 https://code.google.com/p/android/issues/detail?id=53313
This commit is contained in:
@@ -33,6 +33,7 @@ import android.util.Log;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
import org.thoughtcrime.securesms.DatabaseUpgradeActivity;
|
||||
import org.thoughtcrime.securesms.DummyActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.RoutingActivity;
|
||||
import org.thoughtcrime.securesms.crypto.DecryptingQueue;
|
||||
@@ -133,6 +134,17 @@ public class KeyCachingService extends Service {
|
||||
handleClearKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* Workaround for Android bug:
|
||||
* https://code.google.com/p/android/issues/detail?id=53313
|
||||
*/
|
||||
@Override
|
||||
public void onTaskRemoved(Intent rootIntent) {
|
||||
Intent intent = new Intent(this, DummyActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void handleActivityStarted() {
|
||||
Log.w("KeyCachingService", "Incrementing activity count...");
|
||||
|
||||
|
Reference in New Issue
Block a user