1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-06 10:34:07 +00:00

More null checks. Catch null exception in accessibility service.

This commit is contained in:
Kyle Spearrin
2017-02-25 16:10:18 -05:00
parent 910658aa93
commit 8e5a01d82c
5 changed files with 101 additions and 83 deletions

View File

@@ -213,29 +213,49 @@ namespace Bit.App.Pages
AlertNoConnection();
}
PasswordCell.InitEvents();
UsernameCell.InitEvents();
UriCell.InitEvents();
NameCell.InitEvents();
NotesCell.InitEvents();
FolderCell.InitEvents();
PasswordCell.Button.Clicked += PasswordButton_Clicked;
GenerateCell.Tapped += GenerateCell_Tapped;
DeleteCell.Tapped += DeleteCell_Tapped;
PasswordCell?.InitEvents();
UsernameCell?.InitEvents();
UriCell?.InitEvents();
NameCell?.InitEvents();
NotesCell?.InitEvents();
FolderCell?.InitEvents();
if(PasswordCell?.Button != null)
{
PasswordCell.Button.Clicked += PasswordButton_Clicked;
}
if(GenerateCell != null)
{
GenerateCell.Tapped += GenerateCell_Tapped;
}
if(DeleteCell != null)
{
DeleteCell.Tapped += DeleteCell_Tapped;
}
}
protected override void OnDisappearing()
{
base.OnDisappearing();
PasswordCell.Dispose();
UsernameCell.Dispose();
UriCell.Dispose();
NameCell.Dispose();
NotesCell.Dispose();
FolderCell.Dispose();
PasswordCell.Button.Clicked -= PasswordButton_Clicked;
GenerateCell.Tapped -= GenerateCell_Tapped;
DeleteCell.Tapped -= DeleteCell_Tapped;
PasswordCell?.Dispose();
UsernameCell?.Dispose();
UriCell?.Dispose();
NameCell?.Dispose();
NotesCell?.Dispose();
FolderCell?.Dispose();
if(PasswordCell?.Button != null)
{
PasswordCell.Button.Clicked -= PasswordButton_Clicked;
}
if(GenerateCell != null)
{
GenerateCell.Tapped -= GenerateCell_Tapped;
}
if(DeleteCell != null)
{
DeleteCell.Tapped -= DeleteCell_Tapped;
}
}
private void PasswordButton_Clicked(object sender, EventArgs e)