Many fixes

This commit is contained in:
2025-07-15 16:46:03 +02:00
parent b473034703
commit 01c1ac3f5e
4 changed files with 8 additions and 40 deletions

View File

@ -1053,7 +1053,7 @@ public class Actions
{
Miscellaneous.logEvent("i", "StartOtherActivity", "Starting other Activity...", 4);
String params[];
String[] params;
if(param.contains(Action.actionParameter2Split))
params = param.split(Action.actionParameter2Split, -1);
@ -1113,7 +1113,7 @@ public class Actions
externalApplicationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Pack intents
if(params.length >= 4)
if(params.length >= 5)
{
if(Miscellaneous.isNumeric(startupType))
externalApplicationIntent = packParametersIntoIntent(externalApplicationIntent, params, 4);

View File

@ -243,7 +243,7 @@ public class AutomationService extends Service implements OnInitListener
updateNotification();
if (isMainActivityRunning(this))
if(isMainActivityRunning(this))
ActivityMainScreen.updateMainScreen();
this.isRunning = true;
@ -543,42 +543,6 @@ public class AutomationService extends Service implements OnInitListener
centralInstance = null;
Settings.serviceStartDone = false;
}
protected static Builder createDefaultNotificationBuilderOld()
{
Builder builder = new Builder(AutomationService.getInstance());
builder.setContentTitle("Automation");
if(Settings.showIconWhenServiceIsRunning)
{
if(BuildConfig.FLAVOR.equalsIgnoreCase(AutomationService.flavor_name_googleplay))
builder.setSmallIcon(R.drawable.crane);
else
builder.setSmallIcon(R.drawable.ic_launcher);
}
builder.setCategory(Notification.CATEGORY_SERVICE);
builder.setWhen(System.currentTimeMillis());
builder.setContentIntent(myPendingIntent);
Notification defaultNotification = builder.build();
defaultNotification.icon = R.drawable.crane;
defaultNotification.when = System.currentTimeMillis();
// defaultNotification.defaults |= Notification.DEFAULT_VIBRATE;
// defaultNotification.defaults |= Notification.DEFAULT_LIGHTS;
defaultNotification.flags |= Notification.FLAG_AUTO_CANCEL;
// defaultNotification.flags |= Notification.FLAG_SHOW_LIGHTS;
defaultNotification.flags |= Notification.FLAG_ONLY_ALERT_ONCE;
// defaultNotification.ledARGB = Color.YELLOW;
// defaultNotification.ledOnMS = 1500;
// defaultNotification.ledOffMS = 1500;
return builder;
}
protected static NotificationCompat.Builder createServiceNotificationBuilder()
{
@ -628,6 +592,9 @@ public class AutomationService extends Service implements OnInitListener
@SuppressWarnings("deprecation")
public static void updateNotification()
{
if(!Settings.showIconWhenServiceIsRunning && Build.VERSION.SDK_INT < Build.VERSION_CODES.O)
return;
AutomationService instance = getInstance();
if(instance != null)

View File

@ -801,7 +801,7 @@
<string name="languageChineseChina">Chino (China)</string>
<string name="wifiTriggerDisconnectionHint">Este activador será válido si acabas de desconectarte del wifi especificado anteriormente O mientras el servicio aún se está iniciando y si no estás conectado a ningún wifi. Si desea que el activador se active solo cuando se desconecte explícitamente de una determinada red WiFi, agregue otro activador \"el servicio no se está iniciando\".</string>
<string name="className">Nombre de la clase</string>
<string name="startAppByStartForegroundService">a través de startForegroundService((</string>
<string name="startAppByStartForegroundService">a través de startForegroundService()</string>
<string name="method">Método</string>
<string name="takeScreenshot">Tomar captura de pantalla</string>
<string name="android.permission.BIND_ACCESSIBILITY_SERVICE">Enlazar al servicio de accesibilidad</string>

View File

@ -7,5 +7,6 @@
* Fixed: Calendar events were not regarded if created after Automation service start
* Fixed: Bug in NFC trigger that affected only the Google Play version
* Fixed: Examples URL fixed
* Fixed: Service icon could not be hidden in Android 7 and below
* Added: Variable checks can now be inverted. Also regular expressions are now supported.
* Added: Setting to turn on/off console logging (logcat)