Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<IntentServiceAction>(context, intent)
} catch (ex: Exception) {
ex.printStackTrace()
Expand All @@ -30,4 +33,4 @@ class IntentServiceAction : IntentServiceParallel("IntentServiceTaskerAction") {
startForegroundIfNeeded(mayNeedToStartForeground)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down