mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 11:05:25 +00:00
c2dcf7ae74
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.
46 lines
976 B
Java
46 lines
976 B
Java
package org.thoughtcrime.securesms;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
|
|
|
import com.actionbarsherlock.app.SherlockActivity;
|
|
|
|
public class PassphraseRequiredSherlockActivity extends SherlockActivity implements PassphraseRequiredActivity {
|
|
|
|
private final PassphraseRequiredMixin delegate = new PassphraseRequiredMixin();
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
delegate.onCreate(this, this);
|
|
}
|
|
|
|
@Override
|
|
protected void onResume() {
|
|
super.onResume();
|
|
delegate.onResume(this, this);
|
|
}
|
|
|
|
@Override
|
|
protected void onPause() {
|
|
super.onPause();
|
|
delegate.onPause(this, this);
|
|
}
|
|
|
|
@Override
|
|
protected void onDestroy() {
|
|
super.onDestroy();
|
|
delegate.onDestroy(this, this);
|
|
}
|
|
|
|
@Override
|
|
public void onMasterSecretCleared() {
|
|
finish();
|
|
}
|
|
|
|
@Override
|
|
public void onNewMasterSecret(MasterSecret masterSecret) {}
|
|
|
|
}
|