V4.1.3d - added settings option to inhibit the battery optimisation dialog in case it is annoying.
This commit is contained in:
Binary file not shown.
@@ -3,7 +3,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="uk.org.openseizuredetector"
|
package="uk.org.openseizuredetector"
|
||||||
android:versionCode="115"
|
android:versionCode="115"
|
||||||
android:versionName="4.1.3c">
|
android:versionName="4.1.3d">
|
||||||
<!-- android:allowBackup="false" -->
|
<!-- android:allowBackup="false" -->
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
|
|||||||
@@ -229,9 +229,14 @@ public class StartupActivity extends AppCompatActivity {
|
|||||||
Log.i(TAG, "Power Management OK - we are ignoring Battery Optimizations");
|
Log.i(TAG, "Power Management OK - we are ignoring Battery Optimizations");
|
||||||
mBatteryOptDialogDisplayed = false;
|
mBatteryOptDialogDisplayed = false;
|
||||||
} else {
|
} else {
|
||||||
Log.e(TAG, "Power Management Problem - not ignoring Battery Optimisations");
|
boolean preventBatteryOptWarning = SP.getBoolean("PreventBatteryOptWarning", false);
|
||||||
//mUtil.showToast("WARNING - Phone is Optimising OpenSeizureDetector Battery Usage - this is likely to prevent it working correctly when running on battery!");
|
if (preventBatteryOptWarning) {
|
||||||
if (!mBatteryOptDialogDisplayed) showBatteryOptimisationWarningDialog();
|
Log.i(TAG,"PreventBatteryOptWarning is true, so not displaying battery optimisation dialog");
|
||||||
|
} else {
|
||||||
|
Log.e(TAG, "Power Management Problem - not ignoring Battery Optimisations");
|
||||||
|
//mUtil.showToast("WARNING - Phone is Optimising OpenSeizureDetector Battery Usage - this is likely to prevent it working correctly when running on battery!");
|
||||||
|
if (!mBatteryOptDialogDisplayed) showBatteryOptimisationWarningDialog();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,8 @@
|
|||||||
<string name="battery_usage_optimisation_dialog_text">
|
<string name="battery_usage_optimisation_dialog_text">
|
||||||
<b>WARNING: The Android System Battery Optimisation Settings are configured to \'Optimise\' OpenSeizureDetector.</b>\n\n
|
<b>WARNING: The Android System Battery Optimisation Settings are configured to \'Optimise\' OpenSeizureDetector.</b>\n\n
|
||||||
This means it is likely to be shutdown when operating on battery power, so will not work correctly\n\n
|
This means it is likely to be shutdown when operating on battery power, so will not work correctly\n\n
|
||||||
Please go into the Phone Settings and select <b>Apps->OpenSeizureDetector->Battery->Optimise battery usage</b> and set it so that OpenSeizureDetector is NOT optimised</string>
|
Please go into the Phone Settings and select <b>Apps->OpenSeizureDetector->Battery->Optimise battery usage</b> and set it so
|
||||||
|
that OpenSeizureDetector is NOT optimised (on Older versions of Andoroid this option is in </string>
|
||||||
<string name="local_data">Local Data</string>
|
<string name="local_data">Local Data</string>
|
||||||
<string name="shared_data">Shared Data</string>
|
<string name="shared_data">Shared Data</string>
|
||||||
<string name="prune_database">Prune Database</string>
|
<string name="prune_database">Prune Database</string>
|
||||||
@@ -467,4 +468,6 @@
|
|||||||
<string name="notes_about_event">notes about event</string>
|
<string name="notes_about_event">notes about event</string>
|
||||||
<string name="SpO2">O2 Sat</string>
|
<string name="SpO2">O2 Sat</string>
|
||||||
<string name="data_sharing">Data Sharing</string>
|
<string name="data_sharing">Data Sharing</string>
|
||||||
|
<string name="prevent_bat_opt_summary">Do not display the battery optimisation dialog on start-up (some phones report that OpenSeizureDetector is optimised, even if it is not, so the dialog is a nuissance)</string>
|
||||||
|
<string name="prevent_bat_opt_title">Inhibit Battery Optimisation Warning Dialog</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -69,6 +69,14 @@
|
|||||||
android:title="@string/auto_start_title"
|
android:title="@string/auto_start_title"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="PreventBatteryOptWarning"
|
||||||
|
android:summary="@string/prevent_bat_opt_summary"
|
||||||
|
android:title="@string/prevent_bat_opt_title"
|
||||||
|
android:enabled="true"
|
||||||
|
/>
|
||||||
<Preference
|
<Preference
|
||||||
android:key="SelectBLEDevice"
|
android:key="SelectBLEDevice"
|
||||||
android:title="@string/select_ble_device_title"
|
android:title="@string/select_ble_device_title"
|
||||||
|
|||||||
Reference in New Issue
Block a user