diff --git a/taskerpluginlibrary/src/main/java/com/joaomgcd/taskerpluginlibrary/action/ActionReceivers.kt b/taskerpluginlibrary/src/main/java/com/joaomgcd/taskerpluginlibrary/action/ActionReceivers.kt index 5b29148..c996117 100644 --- a/taskerpluginlibrary/src/main/java/com/joaomgcd/taskerpluginlibrary/action/ActionReceivers.kt +++ b/taskerpluginlibrary/src/main/java/com/joaomgcd/taskerpluginlibrary/action/ActionReceivers.kt @@ -3,6 +3,7 @@ package com.joaomgcd.taskerpluginlibrary.action import android.content.BroadcastReceiver import android.content.Context import android.content.Intent +import com.joaomgcd.taskerpluginlibrary.TaskerPluginConstants import com.joaomgcd.taskerpluginlibrary.extensions.canBindFireService import com.joaomgcd.taskerpluginlibrary.extensions.mayNeedToStartForeground import com.joaomgcd.taskerpluginlibrary.extensions.runFromTasker @@ -14,6 +15,8 @@ class BroadcastReceiverAction : BroadcastReceiver() { override fun onReceive(context: Context?, intent: Intent?) { resultCode = TaskerPlugin.Setting.RESULT_CODE_PENDING try { + intent?.extras?.putBoolean(TaskerPluginConstants.EXTRA_CAN_BIND_FIRE_SETTING, false) + runFromTasker(context, intent) } catch (ex: Exception) { ex.printStackTrace() @@ -30,4 +33,4 @@ class IntentServiceAction : IntentServiceParallel("IntentServiceTaskerAction") { startForegroundIfNeeded(mayNeedToStartForeground) } } -} \ No newline at end of file +} diff --git a/taskerpluginlibrary/src/main/java/net/dinglisch/android/tasker/TaskerPlugin.java b/taskerpluginlibrary/src/main/java/net/dinglisch/android/tasker/TaskerPlugin.java index d24b0a7..449097b 100644 --- a/taskerpluginlibrary/src/main/java/net/dinglisch/android/tasker/TaskerPlugin.java +++ b/taskerpluginlibrary/src/main/java/net/dinglisch/android/tasker/TaskerPlugin.java @@ -629,7 +629,12 @@ public static boolean signalFinish( Context context, Intent originalFireIntent, if (completionIntentUri != null) { try { - Intent completionIntent = Intent.parseUri(completionIntentString, Intent.URI_INTENT_SCHEME); + Intent completionIntentSource = Intent.parseUri(completionIntentString, Intent.URI_INTENT_SCHEME); + + // Create a new intent with manual copying to comply with the unsafe intent detection + Intent completionIntent = new Intent(completionIntentSource.getAction(), completionIntentSource.getData()); + completionIntent.setComponent(completionIntentSource.getComponent()); + completionIntentSource.putExtras(completionIntentSource.getExtras()); completionIntent.putExtra(EXTRA_RESULT_CODE, resultCode);