Merge remote-tracking branch 'origin/development' into development

# Conflicts:
#	fastlane/metadata/android/en-US/changelogs/134.txt
This commit is contained in:
Jens 2023-08-30 23:25:13 +02:00
commit 1a60c88f35
3 changed files with 35 additions and 33 deletions

View File

@ -36,7 +36,7 @@ android {
{ {
dimension "version" dimension "version"
versionNameSuffix "-googlePlay" versionNameSuffix "-googlePlay"
targetSdkVersion 31 targetSdkVersion 32
} }
/* /*

View File

@ -41,8 +41,8 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
batteryIntentFilter = new IntentFilter(); batteryIntentFilter = new IntentFilter();
batteryIntentFilter.addAction(Intent.ACTION_BATTERY_CHANGED); batteryIntentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);
batteryIntentFilter.addAction(Intent.ACTION_BATTERY_LOW); batteryIntentFilter.addAction(Intent.ACTION_BATTERY_LOW);
// batteryIntentFilter.addAction(Intent.ACTION_POWER_CONNECTED); // batteryIntentFilter.addAction(Intent.ACTION_POWER_CONNECTED);
// batteryIntentFilter.addAction(Intent.ACTION_POWER_DISCONNECTED); // batteryIntentFilter.addAction(Intent.ACTION_POWER_DISCONNECTED);
} }
batteryStatus = automationServiceRef.registerReceiver(batteryInfoReceiverInstance, batteryIntentFilter); batteryStatus = automationServiceRef.registerReceiver(batteryInfoReceiverInstance, batteryIntentFilter);
@ -105,12 +105,12 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
try try
{ {
batteryLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); batteryLevel = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
// int scale = -1; // int scale = -1;
// int voltage = -1; // int voltage = -1;
// int temp = -1; // int temp = -1;
// scale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1); // scale = intent.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
// temp = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, -1); // temp = intent.getIntExtra(BatteryManager.EXTRA_TEMPERATURE, -1);
// voltage = intent.getIntExtra(BatteryManager.EXTRA_VOLTAGE, -1); // voltage = intent.getIntExtra(BatteryManager.EXTRA_VOLTAGE, -1);
Log.i("Battery", "Level: " + String.valueOf(batteryLevel)); Log.i("Battery", "Level: " + String.valueOf(batteryLevel));
this.actionBatteryLevel(context); this.actionBatteryLevel(context);
@ -121,7 +121,7 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
switch(statusPlugged) switch(statusPlugged)
{ {
case BatteryManager.BATTERY_PLUGGED_AC: case BatteryManager.BATTERY_PLUGGED_AC:
// Toast.makeText(context, "Regular charging", Toast.LENGTH_LONG).show(); // Toast.makeText(context, "Regular charging", Toast.LENGTH_LONG).show();
Miscellaneous.logEvent("i", "BatteryReceiver", "Regular charging.", 5); Miscellaneous.logEvent("i", "BatteryReceiver", "Regular charging.", 5);
this.actionCharging(context); this.actionCharging(context);
break; break;
@ -138,6 +138,7 @@ public class BatteryReceiver extends BroadcastReceiver implements AutomationList
this.actionCharging(context); this.actionCharging(context);
break; break;
case BatteryManager.BATTERY_STATUS_DISCHARGING: case BatteryManager.BATTERY_STATUS_DISCHARGING:
case BatteryManager.BATTERY_STATUS_NOT_CHARGING:
this.actionDischarging(context); this.actionDischarging(context);
break; break;
} }

View File

@ -1,3 +1,4 @@
* Fixed: Added overlay permission for start-phone-call action * Fixed: Added overlay permission for start-phone-call action
* Change: Icon changed in Play store version * Change: Icon changed in Play store version
* Change: Target-SDK raised in Play store version * Fixed: Trigger "battery is charging" would only fire once and not after disconnecting and connecting charger
* Change: Was forced to raise targetSdk to 32 for Google Play version. If that should break something, consider switching to the F-Droid or APK version.