Compare commits

..

No commits in common. "6f80caa1c69893e9c693d2dcb4f3518a12c463a1" and "ab98b4d1db0722f02f8874ca826e34bbbb3ea097" have entirely different histories.

20 changed files with 10 additions and 96 deletions

View File

@ -11,8 +11,8 @@ android {
compileSdkVersion 31
buildToolsVersion '29.0.2'
useLibrary 'org.apache.http.legacy'
versionCode 125
versionName "1.7.10"
versionCode 124
versionName "1.7.9"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -347,16 +347,7 @@ public class Rule implements Comparable<Rule>
if(oneTrigger.getTriggerType().equals(Trigger.Trigger_Enum.timeFrame))
{
if(oneTrigger.getTimeFrame().repetition > 0)
{
if(this.getLastExecution() != null)
{
Calendar now = Calendar.getInstance();
if (this.getLastExecution().getTimeInMillis() + oneTrigger.getTimeFrame().getRepetition() * 1000 <= now.getTimeInMillis())
return true;
}
else
return true;
}
return true;
}
else if(oneTrigger.getTriggerType().equals(Trigger.Trigger_Enum.broadcastReceived))
{

View File

@ -225,7 +225,7 @@ public class ActivityManageActionSendBroadcast extends Activity
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3)
{
if(supportedIntentTypes[arg2].equals("int") || supportedIntentTypes[arg2].equals("long") || supportedIntentTypes[arg2].equals("short"))
ActivityManageActionSendBroadcast.this.etParameterValue.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED);
ActivityManageActionSendBroadcast.this.etParameterValue.setInputType(InputType.TYPE_CLASS_NUMBER);
else if(supportedIntentTypes[arg2].equals("double") || supportedIntentTypes[arg2].equals("float"))
ActivityManageActionSendBroadcast.this.etParameterValue.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL);
else

View File

@ -268,7 +268,7 @@ public class ActivityManageActionStartActivity extends Activity
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3)
{
if(supportedIntentTypes[arg2].equals("int") || supportedIntentTypes[arg2].equals("long") || supportedIntentTypes[arg2].equals("short"))
ActivityManageActionStartActivity.this.etParameterValue.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_SIGNED);
ActivityManageActionStartActivity.this.etParameterValue.setInputType(InputType.TYPE_CLASS_NUMBER);
else if(supportedIntentTypes[arg2].equals("double") || supportedIntentTypes[arg2].equals("float"))
ActivityManageActionStartActivity.this.etParameterValue.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL);
else

View File

@ -111,8 +111,6 @@ import androidx.documentfile.provider.DocumentFile;
public class Miscellaneous extends Service
{
protected static String writeableFolderStringCache = null;
public static Context startupContext;
public static final String lineSeparator = System.getProperty("line.separator");
public static String downloadURL(String url, String username, String password)
@ -275,7 +273,7 @@ public class Miscellaneous extends Service
{
writeToLogFile(type, header, description);
if (!logCleanerRunning && Math.random() < 0.1) // tidy up with 10% probability
if(!logCleanerRunning && Math.random() < 0.1) // tidy up with 10% probability
{
rotateLogFile(getLogFile());
}
@ -559,10 +557,7 @@ public class Miscellaneous extends Service
returnContext = ActivityPermissions.getInstance().getApplicationContext();
if(returnContext != null)
return returnContext;
if(startupContext != null)
return startupContext;
return null;
}

View File

@ -421,18 +421,14 @@ public class PointOfInterest implements Comparable<PointOfInterest>
public boolean create(Context context)
{
for(PointOfInterest poi : PointOfInterest.pointOfInterestCollection)
{
if (poi.getName().equals(this.getName()))
if(poi.getName().equals(this.getName()))
{
Toast.makeText(context, context.getResources().getString(R.string.anotherPoiByThatName), Toast.LENGTH_LONG).show();
return false;
}
}
if(plausibilityCheck())
{
Miscellaneous.logEvent("i", "Creating POI", this.toStringLong(), 3);
PointOfInterest.pointOfInterestCollection.add(this);
PointOfInterest.writePoisToFile();
@ -494,10 +490,8 @@ public class PointOfInterest implements Comparable<PointOfInterest>
Check for change of rule name END
*/
if(plausibilityCheck())
if (plausibilityCheck())
{
Miscellaneous.logEvent("i", "Changing POI", "Old name: " + this.oldName + ", new data: " + this.toStringLong(), 3);
if(PointOfInterest.writePoisToFile())
{
AutomationService service = AutomationService.getInstance();

View File

@ -11,13 +11,12 @@ import com.jens.automation2.Settings;
public class StartupIntentReceiver extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
Settings.readFromPersistentStorage(context);
Miscellaneous.startupContext = context;
// Miscellaneous.logEvent("i", "Boot event", "Received event: " + intent.getAction(), 5);
if(Settings.startServiceAtSystemBoot)

View File

@ -771,10 +771,4 @@
<string name="checkVariableExplanation">Wenn Sie den Wert der Variablen leer lassen, darf sie nicht gesetzt sein, damit die Bedingung als erfüllt gilt.</string>
<string name="variableCheckString">wenn Variable %1$s den Wert %2$s hat</string>
<string name="variableCheckStringDeleted">wenn Variable %1$s nicht gesetzt ist</string>
<string name="messageType">Nachrichtentyp</string>
<string name="sms">SMS</string>
<string name="mms">MMS</string>
<string name="attachment">Dateianhang</string>
<string name="chooseFile">Datei wählen</string>
<string name="startAppByStartService">via startService()</string>
</resources>

View File

@ -770,10 +770,4 @@
<string name="VariableKey">Clave variable</string>
<string name="deleteVariable">Eliminar variable</string>
<string name="setVariable">Establecer una variable</string>
<string name="messageType">Tipo de mensaje</string>
<string name="sms">SMS</string>
<string name="mms">MMS</string>
<string name="attachment">Archivo adjunto</string>
<string name="chooseFile">elegir archivo</string>
<string name="startAppByStartService">via startService()</string>
</resources>

View File

@ -274,7 +274,6 @@
<string name="with">avec</string>
<string name="phoneNumber">Numéro de téléphone</string>
<string name="enterPhoneNumberBlankForAny">Saisissez un numéro de téléphone. Laissez vide pour nimporte quel numéro.</string>
<string name="enterPhoneNumber">Entrez le numéro de téléphone.</string>
<string name="phoneDirection">Sélectionnez le type \ndappel</string>
<string name="any">tout</string>
<string name="incoming">entrant</string>
@ -770,10 +769,4 @@
<string name="VariableKey">Clé variable</string>
<string name="deleteVariable">Supprimer la variable</string>
<string name="setVariable">Définir une variable</string>
<string name="messageType">Type de message</string>
<string name="sms">SMS</string>
<string name="mms">MMS</string>
<string name="attachment">Attachement</string>
<string name="chooseFile">Choisissez un fichier</string>
<string name="startAppByStartService">via startService()</string>
</resources>

View File

@ -771,10 +771,4 @@
<string name="checkVariableExplanation">Se si lascia vuoto il valore, la variabile non deve essere impostata affinché la condizione restituisca true.</string>
<string name="variableCheckString">Se la variabile %1$s è %2$s</string>
<string name="variableCheckStringDeleted">Se la variabile %1$s non è impostata</string>
<string name="messageType">Tipo di messaggio</string>
<string name="sms">SMS</string>
<string name="mms">MMS</string>
<string name="attachment">Allegato</string>
<string name="chooseFile">Scegli file</string>
<string name="startAppByStartService">tramite startService()</string>
</resources>

View File

@ -769,11 +769,5 @@
<string name="checkVariableExplanation">Als u de waarde leeg laat, mag de variabele niet worden ingesteld om de voorwaarde true te laten retourneren.</string>
<string name="variableCheckString">als variabele %1$s %2$s is</string>
<string name="variableCheckStringDeleted">als variabele %1$s niet is ingesteld</string>
<string name="messageType">Type bericht</string>
<string name="sms">SMS</string>
<string name="mms">MMS</string>
<string name="attachment">Bijlage</string>
<string name="chooseFile">kies bestand</string>
<string name="startAppByStartService">via startService()</string>
</resources>

View File

@ -828,10 +828,4 @@
<string name="checkVariableExplanation">Если оставить значение пустым, переменная не должна быть задана для того, чтобы условие возвращало значение true.</string>
<string name="variableCheckString">если переменная %1$s равно %2$s</string>
<string name="variableCheckStringDeleted">Если переменная %1$s не задана</string>
<string name="messageType">Тип сообщения</string>
<string name="sms">SMS</string>
<string name="mms">MMS</string>
<string name="attachment">Прикрепление</string>
<string name="chooseFile">выберите файл</string>
<string name="startAppByStartService">дорога startService()</string>
</resources>

View File

@ -1,4 +0,0 @@
* Behoben: Negative Ganzzahlen werden als Intent-Parameter akzeptiert
* Behoben: Mehrere parallele Zeiträume mit Wiederholung konnten dazu führen, daß alle zu häufig ausgeführt wurden
* Behoben: Automatischer Start der Anwendung beim Gerätestart konnte in manchen Fällen scheitern
* Übersetzungen aktualisiert

View File

@ -1,4 +0,0 @@
* Fixed: Now allowing negative integers as intent data
* Fixed: Multiple time frames with reoccurence configured would trigger to early executions
* Fixed: Automatic app start at boot might fail in some cases
* Translations updated

View File

@ -1,4 +0,0 @@
* Corregido: Ahora permite enteros negativos como datos de intención
* Corregido: Múltiples marcos de tiempo con la repetición configurada se desencadenarían en ejecuciones tempranas
* Corregido: el inicio automático de la aplicación en el arranque puede fallar en algunos casos
* Traducciones actualizadas

View File

@ -1,4 +0,0 @@
* Correction : Autorise désormais les entiers négatifs comme données d'intention
* Correction : Plusieurs délais avec récurrence configurée déclenchaient des exécutions anticipées
* Correction : le démarrage automatique de l'application au démarrage peut échouer dans certains cas
* Traductions mises à jour

View File

@ -1,4 +0,0 @@
* Risolto: ora consente numeri interi negativi come dati di intento
* Risolto: più intervalli di tempo con ripetizione configurata si attiverebbero per le esecuzioni anticipate
* Risolto: l'avvio automatico dell'app all'avvio potrebbe non riuscire in alcuni casi
* Traduzioni aggiornate

View File

@ -1,4 +0,0 @@
* Opgelost: nu negatieve gehele getallen toestaan als intentiegegevens
* Opgelost: Meerdere tijdframes met reoccurence geconfigureerd zouden leiden tot vroege uitvoeringen
* Opgelost: Automatische app-start bij het opstarten kan in sommige gevallen mislukken
* Vertalingen bijgewerkt

View File

@ -1,4 +0,0 @@
* Исправлено: Добавлено разрешение отрицательных целых чисел в качестве данных о намерениях
* Исправлено: Несколько таймфреймов с настроенным повторением запускали бы ранние выполнения
* Исправлено: Автоматический запуск приложения при загрузке может завершиться сбоем в некоторых случаях
* Переводы обновлены