From 212c77952f59259cfbe24cc0f1404c538c717403 Mon Sep 17 00:00:00 2001 From: Robert Wittek Date: Mon, 1 Apr 2019 23:40:21 +0200 Subject: [PATCH] exclude battery saver options --- GeoClient/GeoClient.Android/MainActivity.cs | 12 +++++++----- .../GeoClient.Android/Properties/AndroidManifest.xml | 2 +- GeoClient/GeoClient/Views/AboutPage.xaml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/GeoClient/GeoClient.Android/MainActivity.cs b/GeoClient/GeoClient.Android/MainActivity.cs index 338335b..d542a62 100644 --- a/GeoClient/GeoClient.Android/MainActivity.cs +++ b/GeoClient/GeoClient.Android/MainActivity.cs @@ -51,7 +51,8 @@ protected override void OnCreate(Bundle savedInstanceState) RegistrationService.Instance.RegisterListener(this); RequestCameraPermissionIfNecessary(); - RequestBatteryOptimizationWhitelisting(); + // Do not request battery optimization to fulfill MDM restrictions. + // RequestBatteryOptimizationWhitelisting(); } protected override void OnDestroy() @@ -103,10 +104,11 @@ private bool IsDataSaverEnabled() private bool IsDeveloperModeActive() { - var intOfDevSetting = - Settings.Secure.GetInt(ContentResolver, Settings.Global.DevelopmentSettingsEnabled, 0); - Log.Debug(LoggerTag, "Developer setting enabled returned: " + intOfDevSetting); - return intOfDevSetting != 0; + // var intOfDevSetting = + // Settings.Secure.GetInt(ContentResolver, Settings.Global.DevelopmentSettingsEnabled, 0); + // Log.Debug(LoggerTag, "Developer setting enabled returned: " + intOfDevSetting); + // return intOfDevSetting != 0; + return false; } private void PerformXamarinStartup(Bundle savedInstanceState) diff --git a/GeoClient/GeoClient.Android/Properties/AndroidManifest.xml b/GeoClient/GeoClient.Android/Properties/AndroidManifest.xml index a0d081a..adffc31 100644 --- a/GeoClient/GeoClient.Android/Properties/AndroidManifest.xml +++ b/GeoClient/GeoClient.Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/GeoClient/GeoClient/Views/AboutPage.xaml b/GeoClient/GeoClient/Views/AboutPage.xaml index bac4398..9a3af4a 100644 --- a/GeoClient/GeoClient/Views/AboutPage.xaml +++ b/GeoClient/GeoClient/Views/AboutPage.xaml @@ -26,7 +26,7 @@ FontAttributes="Bold" FontSize="Large" />