Fix TrashActivity closing unexpectedly

This commit fixes an issue where the TrashActivity would close unexpectedly if the vault was not loaded. It overrides the onLocked method in TrashActivity to prevent it from being finished when the vault is locked.
pull/1699/head
google-labs-jules[bot] 2 months ago
parent 1fa0bb970c
commit cda3df9025

@ -244,7 +244,6 @@ public abstract class AegisActivity extends AppCompatActivity implements VaultMa
return !(this instanceof MainActivity)
&& !(this instanceof AuthActivity)
&& !(this instanceof IntroActivity)
&& !(this instanceof TrashActivity)
&& !_vaultManager.isVaultLoaded();
}

@ -70,4 +70,10 @@ public class TrashActivity extends AegisActivity implements TrashEntryAdapter.Tr
adapter.removeItem(entry);
});
}
@Override
public void onLocked(boolean userInitiated) {
// Do nothing. This will prevent the activity from being finished when the vault is locked.
// The onStart() method will handle the case where the vault is not loaded.
}
}

Loading…
Cancel
Save