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"); Console.WriteLine("A OnCreate");
Window.SetSoftInputMode(SoftInput.StateHidden); Window.SetSoftInputMode(SoftInput.StateHidden);
Window.AddFlags(WindowManagerFlags.Secure); if(!App.Utilities.Helpers.InDebugMode())
{
Window.AddFlags(WindowManagerFlags.Secure);
}
var appIdService = Resolver.Resolve<IAppIdService>(); var appIdService = Resolver.Resolve<IAppIdService>();
var authService = Resolver.Resolve<IAuthService>(); var authService = Resolver.Resolve<IAuthService>();

View File

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

View File

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

View File

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