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
fork-5.53.8
Corey Hunter 2016-10-23 02:06:01 -07:00 zatwierdzone przez Moxie Marlinspike
rodzic f5966af781
commit 9064c02fa8
1 zmienionych plików z 9 dodań i 2 usunięć

Wyświetl plik

@ -21,6 +21,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.util.Log;
import org.thoughtcrime.securesms.crypto.MasterSecret;
import org.thoughtcrime.securesms.service.KeyCachingService;
@ -57,10 +58,16 @@ public abstract class PassphraseActivity extends BaseActionBarActivity {
cleanup();
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();
}
@Override
public void onServiceDisconnected(ComponentName name) {
keyCachingService = null;