debug check on screenshot protection

This commit is contained in:
Kyle Spearrin 2017-07-24 15:04:31 -04:00
parent 679859fb37
commit 73425c0052
4 changed files with 15 additions and 21 deletions

View file

@ -56,7 +56,10 @@ namespace Bit.Android
Console.WriteLine("A OnCreate");
Window.SetSoftInputMode(SoftInput.StateHidden);
Window.AddFlags(WindowManagerFlags.Secure);
if(!App.Utilities.Helpers.InDebugMode())
{
Window.AddFlags(WindowManagerFlags.Secure);
}
var appIdService = Resolver.Resolve<IAppIdService>();
var authService = Resolver.Resolve<IAuthService>();

View file

@ -93,7 +93,7 @@ namespace Bit.Android
}
// 3. In debug mode
if(InDebugMode())
if(App.Utilities.Helpers.InDebugMode())
{
reregister = true;
}
@ -114,15 +114,6 @@ namespace Bit.Android
}
}
private bool InDebugMode()
{
#if DEBUG
return true;
#else
return false;
#endif
}
public override void OnTerminate()
{
base.OnTerminate();

View file

@ -104,7 +104,7 @@ namespace Bit.App
if(string.IsNullOrWhiteSpace(_uri))
{
var lastBuild = _settings.GetValueOrDefault<string>(LastBuildKey);
if(InDebugMode() || lastBuild == null || lastBuild != _appInfoService.Build)
if(Utilities.Helpers.InDebugMode() || lastBuild == null || lastBuild != _appInfoService.Build)
{
_settings.AddOrUpdateValue(LastBuildKey, _appInfoService.Build);
_databaseService.CreateTables();
@ -184,15 +184,6 @@ namespace Bit.App
}
}
private bool InDebugMode()
{
#if DEBUG
return true;
#else
return false;
#endif
}
private async Task FullSyncAsync()
{
if(_connectivity.IsConnected)

View file

@ -29,5 +29,14 @@ namespace Bit.App.Utilities
throw new Exception("Unsupported platform.");
}
}
public static bool InDebugMode()
{
#if DEBUG
return true;
#else
return false;
#endif
}
}
}