mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 22:43:38 +00:00
Improve #3990
By catching the crash Signal remains unlocked. The user can quickly retry sharing from the previous app and it will work, rather than having to return to the home screen and unlock Signal. Closes #5805 // FREEBIE
This commit is contained in:
parent
f5966af781
commit
9064c02fa8
@ -21,6 +21,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.ServiceConnection;
|
import android.content.ServiceConnection;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
||||||
import org.thoughtcrime.securesms.service.KeyCachingService;
|
import org.thoughtcrime.securesms.service.KeyCachingService;
|
||||||
@ -57,10 +58,16 @@ public abstract class PassphraseActivity extends BaseActionBarActivity {
|
|||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
|
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
|
||||||
if (nextIntent != null) startActivity(nextIntent);
|
if (nextIntent != null) {
|
||||||
|
try {
|
||||||
|
startActivity(nextIntent);
|
||||||
|
} catch (java.lang.SecurityException e) {
|
||||||
|
Log.w("PassphraseActivity",
|
||||||
|
"Access permission not passed from PassphraseActivity, retry sharing.");
|
||||||
|
}
|
||||||
|
}
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onServiceDisconnected(ComponentName name) {
|
public void onServiceDisconnected(ComponentName name) {
|
||||||
keyCachingService = null;
|
keyCachingService = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user