Compare commits

...

4 Commits

24 changed files with 55 additions and 8 deletions

View File

@ -11,8 +11,8 @@ android {
compileSdkVersion 33 compileSdkVersion 33
buildToolsVersion '29.0.2' buildToolsVersion '29.0.2'
useLibrary 'org.apache.http.legacy' useLibrary 'org.apache.http.legacy'
versionCode 139 versionCode 142
versionName "1.8" versionName "1.8.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -66,7 +66,6 @@
<uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/> <uses-permission android:name="com.wireguard.android.permission.CONTROL_TUNNELS"/>
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/> <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission <uses-permission
android:name="android.permission.WRITE_SECURE_SETTINGS" android:name="android.permission.WRITE_SECURE_SETTINGS"
tools:ignore="ProtectedPermissions" /> tools:ignore="ProtectedPermissions" />

View File

@ -1107,7 +1107,13 @@ public class Actions
externalApplicationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); externalApplicationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Pack intents // Pack intents
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 3); if(params.length >= 4)
{
if(Miscellaneous.isNumeric(params[3]))
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 4);
else
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 3);
}
if (params[2].equals(ActivityManageActionStartActivity.startByActivityString)) if (params[2].equals(ActivityManageActionStartActivity.startByActivityString))
automationServerRef.startActivity(externalApplicationIntent); automationServerRef.startActivity(externalApplicationIntent);

View File

@ -654,7 +654,10 @@ public class ActivityManageRule extends Activity
else if(types[i].toString().equals(Trigger_Enum.checkVariable.toString())) else if(types[i].toString().equals(Trigger_Enum.checkVariable.toString()))
items.add(new Item(typesLong[i].toString(), R.drawable.variable)); items.add(new Item(typesLong[i].toString(), R.drawable.variable));
else if(types[i].toString().equals(Trigger_Enum.calendarEvent.toString())) else if(types[i].toString().equals(Trigger_Enum.calendarEvent.toString()))
items.add(new Item(typesLong[i].toString(), R.drawable.calendar)); {
if(ActivityPermissions.isPermissionDeclaratedInManifest(ActivityManageRule.this, Manifest.permission.READ_CALENDAR))
items.add(new Item(typesLong[i].toString(), R.drawable.calendar));
}
else else
items.add(new Item(typesLong[i].toString(), R.drawable.placeholder)); items.add(new Item(typesLong[i].toString(), R.drawable.placeholder));
} }

View File

@ -321,7 +321,9 @@ public class AutomationService extends Service implements OnInitListener
ReceiverCoordinator.applySettingsAndRules(); ReceiverCoordinator.applySettingsAndRules();
DateTimeListener.setOrResetAlarms(); DateTimeListener.setOrResetAlarms();
CalendarReceiver.armOrRearmTimer();
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent) && ActivityPermissions.isPermissionDeclaratedInManifest(AutomationService.getInstance(), Manifest.permission.READ_CALENDAR) && ActivityPermissions.havePermission(Manifest.permission.READ_CALENDAR, AutomationService.getInstance()))
CalendarReceiver.armOrRearmTimer();
} }
@Override @Override

View File

@ -1,5 +1,6 @@
package com.jens.automation2; package com.jens.automation2;
import android.Manifest;
import android.os.Build; import android.os.Build;
import android.util.Log; import android.util.Log;
@ -212,7 +213,7 @@ public class ReceiverCoordinator
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.screenState)) if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.screenState))
ScreenStateReceiver.startScreenStateReceiver(AutomationService.getInstance()); ScreenStateReceiver.startScreenStateReceiver(AutomationService.getInstance());
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent)) if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent) && ActivityPermissions.isPermissionDeclaratedInManifest(AutomationService.getInstance(), Manifest.permission.READ_CALENDAR) && ActivityPermissions.havePermission(Manifest.permission.READ_CALENDAR, AutomationService.getInstance()))
CalendarReceiver.startCalendarReceiver(AutomationService.getInstance()); CalendarReceiver.startCalendarReceiver(AutomationService.getInstance());
} }
@ -469,7 +470,7 @@ public class ReceiverCoordinator
} }
} }
if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent)) if(Rule.isAnyRuleUsing(Trigger.Trigger_Enum.calendarEvent) && ActivityPermissions.isPermissionDeclaratedInManifest(AutomationService.getInstance(), Manifest.permission.READ_CALENDAR) && ActivityPermissions.havePermission(Manifest.permission.READ_CALENDAR, AutomationService.getInstance()))
{ {
if(!CalendarReceiver.getInstance().isListenerRunning()) if(!CalendarReceiver.getInstance().isListenerRunning())
CalendarReceiver.getInstance().startListener(AutomationService.getInstance()); CalendarReceiver.getInstance().startListener(AutomationService.getInstance());

View File

@ -0,0 +1 @@
* Kalendar Funktion aus Google Version entfernt

View File

@ -0,0 +1,3 @@
* Behoben: Kalender Auslöser wird jetzt in Play Version verborgen
* Behoben: Parameter wurde beim Starten anderer Apps nicht korrekt übergeben
* Behoben: Absturz beim Verlassen der Einstellungen

View File

@ -0,0 +1 @@
* Calendar trigger removed from Google version

View File

@ -0,0 +1,3 @@
* Fixed: Calendar trigger hidden from Play version
* Fixed: Parameters not correctly supplied when starting other apps
* Fixed: Crash when exiting settings while service is running

View File

@ -0,0 +1 @@
* Eliminado el activador de calendario de la versión de Google

View File

@ -0,0 +1,3 @@
* Corregido: Condición de calendario ahora es oculto en la versión Play
* Corregido: Los parámetros no se suministran correctamente al iniciar otras aplicaciones
* Corregido: Bloqueo al salir de la configuración mientras el servicio se está ejecutando

View File

@ -0,0 +1 @@
* Déclencheur d'agenda supprimé de la version Google

View File

@ -0,0 +1,3 @@
* Correction : Déclencheur de calendrier caché dans la version Play
* Correction : Les paramètres n'étaient pas correctement fournis lors du démarrage d'autres applications
* Correction : Plantage lors de la fermeture des paramètres pendant l'exécution du service

View File

@ -0,0 +1 @@
* Il trigger del calendario è stato rimosso dalla versione Google

View File

@ -0,0 +1,3 @@
* Risolto: trigger del calendario nascosto dalla versione Play
* Risolto: parametri non forniti correttamente all'avvio di altre app
* Risolto: arresto anomalo quando si esce dalle impostazioni mentre il servizio è in esecuzione

View File

@ -0,0 +1 @@
* Agendatrigger verwijderd uit Google-versie

View File

@ -0,0 +1,3 @@
* Opgelost: kalendertrigger verborgen voor Play-versie
* Opgelost: parameters worden niet correct opgegeven bij het starten van andere apps
* Opgelost: crash bij het afsluiten van instellingen terwijl de service actief is

View File

@ -0,0 +1 @@
* Wyzwalacz kalendarza usunięty z wersji Google

View File

@ -0,0 +1,3 @@
* Naprawiono: Wyzwalacz kalendarza ukryty w wersji Play
* Naprawiono: Parametry nie są poprawnie dostarczane podczas uruchamiania innych aplikacji
* Naprawiono: Awaria podczas wychodzenia z ustawień, gdy usługa jest uruchomiona

View File

@ -0,0 +1 @@
* Триггер календаря удален из версии Google

View File

@ -0,0 +1,3 @@
* Исправлено: Триггер календаря скрыт в игровой версии
* Исправлено: Параметры неправильно указываются при запуске других приложений.
* Исправлено: Сбой при выходе из настроек во время работы сервиса

View File

@ -0,0 +1 @@
* 日历触发器已从 Google 版本中删除

View File

@ -0,0 +1,3 @@
* 修复:播放版本中隐藏的日历触发器
* 修复:启动其他应用程序时未正确提供参数的问题
* 修复:服务运行时退出设置时崩溃