mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
debug check on screenshot protection
This commit is contained in:
parent
679859fb37
commit
73425c0052
4 changed files with 15 additions and 21 deletions
|
@ -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>();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue