mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 23:53:40 +00:00
fix crash
This commit is contained in:
parent
951e6f6e0c
commit
01eb7945f6
@ -84,6 +84,7 @@ public class PassphrasePromptActivity extends BaseActionBarActivity {
|
|||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void onServiceDisconnected(ComponentName name) {
|
public void onServiceDisconnected(ComponentName name) {
|
||||||
|
keyCachingService.setMasterSecret(new Object());
|
||||||
keyCachingService = null;
|
keyCachingService = null;
|
||||||
}
|
}
|
||||||
}, Context.BIND_AUTO_CREATE);
|
}, Context.BIND_AUTO_CREATE);
|
||||||
@ -133,7 +134,9 @@ public class PassphrasePromptActivity extends BaseActionBarActivity {
|
|||||||
private void handleAuthenticated() {
|
private void handleAuthenticated() {
|
||||||
authenticated = true;
|
authenticated = true;
|
||||||
//TODO Replace with a proper call.
|
//TODO Replace with a proper call.
|
||||||
keyCachingService.setMasterSecret(new Object());
|
if (keyCachingService != null) {
|
||||||
|
keyCachingService.setMasterSecret(new Object());
|
||||||
|
}
|
||||||
|
|
||||||
// Finish and proceed with the next intent.
|
// Finish and proceed with the next intent.
|
||||||
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
|
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
|
||||||
@ -188,6 +191,8 @@ public class PassphrasePromptActivity extends BaseActionBarActivity {
|
|||||||
|
|
||||||
if (!keyguardManager.isKeyguardSecure()) {
|
if (!keyguardManager.isKeyguardSecure()) {
|
||||||
Log.w(TAG ,"Keyguard not secure...");
|
Log.w(TAG ,"Keyguard not secure...");
|
||||||
|
TextSecurePreferences.setScreenLockEnabled(getApplicationContext(), false);
|
||||||
|
TextSecurePreferences.setScreenLockTimeout(getApplicationContext(), 0);
|
||||||
handleAuthenticated();
|
handleAuthenticated();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user