mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-27 12:19:04 +00:00
Refactor MasterSecret initialization, access, and timeout paths.
1) Consolidate all of the KeyCachingService interaction into a single mixin. Activities extend delegates which call through to the mixin. 2) Switch Activity increment/decrement triggers from onStop to onPause in order to account for some screen locks that don't stop activities.
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
*/
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
@@ -40,7 +39,7 @@ import org.thoughtcrime.securesms.util.MemoryCleaner;
|
||||
* @author Moxie Marlinspike
|
||||
*/
|
||||
|
||||
public class ReceiveKeyActivity extends Activity {
|
||||
public class ReceiveKeyActivity extends PassphraseRequiredSherlockActivity {
|
||||
|
||||
private TextView descriptionText;
|
||||
private TextView signatureText;
|
||||
@@ -171,6 +170,7 @@ public class ReceiveKeyActivity extends Activity {
|
||||
}
|
||||
|
||||
private class VerifyIdentityListener implements View.OnClickListener {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ReceiveKeyActivity.this, VerifyIdentityActivity.class);
|
||||
intent.putExtra("recipient", recipient);
|
||||
@@ -181,6 +181,7 @@ public class ReceiveKeyActivity extends Activity {
|
||||
}
|
||||
|
||||
private class VerifySessionListener implements View.OnClickListener {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent = new Intent(ReceiveKeyActivity.this, VerifyKeysActivity.class);
|
||||
intent.putExtra("recipient", recipient);
|
||||
@@ -191,6 +192,7 @@ public class ReceiveKeyActivity extends Activity {
|
||||
}
|
||||
|
||||
private class OkListener implements View.OnClickListener {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
keyExchangeProcessor.processKeyExchangeMessage(keyExchangeMessage, threadId);
|
||||
finish();
|
||||
@@ -198,6 +200,7 @@ public class ReceiveKeyActivity extends Activity {
|
||||
}
|
||||
|
||||
private class CancelListener implements View.OnClickListener {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ReceiveKeyActivity.this.finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user