move power manager check inside try/catch

This commit is contained in:
Kyle Spearrin 2018-09-23 08:08:38 -04:00
parent 5504298251
commit 03a55d38d3
1 changed files with 10 additions and 10 deletions

View File

@ -104,6 +104,8 @@ namespace Bit.Android
}
public override void OnAccessibilityEvent(AccessibilityEvent e)
{
try
{
var powerManager = (PowerManager)GetSystemService(PowerService);
if(Build.VERSION.SdkInt > BuildVersionCodes.KitkatWatch && !powerManager.IsInteractive)
@ -115,8 +117,6 @@ namespace Bit.Android
return;
}
try
{
if(SkipPackage(e?.PackageName))
{
return;