My app implements a configuration activity for its widget exactly as described here.
Starting with Android 14, the activity can't be launched automatically in background, as stated here, but I have no control over the intent while implementing the widget configuration in this way, and i get the following error:
Without Android 14 BAL hardening this activity start would be allowed (missing opt in by PI sender)! [callingPackage: android; callingPackageTargetSdk: 34; callingUid: 1000; callingPid: -1; appSwitchState: 2; callingUidHasAnyVisibleWindow: false; callingUidProcState: PERSISTENT; isCallingUidPersistentSystemProcess: true; forcedBalByPiSender: BSP.NONE; intent: Intent { act=android.appwidget.action.APPWIDGET_CONFIGURE cmp=com.minar.birday/.activities.MinimalWidgetConfigurationActivity (has extras) }; callerApp: null; balAllowedByPiCreator: BSP.NONE; balAllowedByPiCreatorWithHardening: BSP.NONE; resultIfPiCreatorAllowsBal: BAL_ALLOW_ALLOWLISTED_UID; hasRealCaller: true; isCallForResult: true; isPendingIntent: true; realCallingPackage: bitpit.launcher; realCallingPackageTargetSdk: 34; realCallingUid: 10237; realCallingPid: 22638; realCallingUidHasAnyVisibleWindow: true; realCallingUidProcState: TOP; isRealCallingUidPersistentSystemProcess: false; originatingPendingIntent: PendingIntentRecord{cbf937 android startActivity}; realCallerApp: ProcessRecord{fef2b6a 22638:bitpit.launcher/u0a237}; realInVisibleTask: true; balAllowedByPiSender: BSP.ALLOW_FGS; resultIfPiSenderAllowsBal: BAL_ALLOW_VISIBLE_WINDOW]
The question is simple: how can I fix this and modify the intent to pass the Context.BIND_ALLOW_ACTIVITY_STARTS flag in it? I just want the activity to work just like it did in Android 13 and below in the simplest way possible.