Revert "Android: move referral global field to local variable in QtActivityBase"

This reverts commit 5b5f4344daa4df023007cd59efdf8f36b00bb150.

Reason for revert: Without the key being public, we would have to duplicate this variable in our application code when fetching the stored referrer.

Change-Id: I46ad3618da9912c41f8248f871c24dd41015af2b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 950998223b68a247ac96f7e3ef92db9f89bfec0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Julian Greilich 2024-02-22 10:58:59 +00:00 committed by Qt Cherry-pick Bot
parent ec9eb9d90b
commit 68d611a25c

View File

@ -27,11 +27,11 @@ public class QtActivityBase extends Activity
private QtActivityDelegate m_delegate;
public static final String EXTRA_SOURCE_INFO = "org.qtproject.qt.android.sourceInfo";
private void addReferrer(Intent intent)
{
final String extraSourceInfoKey = "org.qtproject.qt.android.sourceInfo";
if (intent.getExtras() != null && intent.getExtras().getString(extraSourceInfoKey) != null)
if (intent.getExtras() != null && intent.getExtras().getString(EXTRA_SOURCE_INFO) != null)
return;
String browserApplicationId = "";
@ -47,7 +47,7 @@ public class QtActivityBase extends Activity
sourceInformation = referrer.toString().replaceFirst("android-app://", "");
}
intent.putExtra(extraSourceInfoKey, sourceInformation);
intent.putExtra(EXTRA_SOURCE_INFO, sourceInformation);
}
// Append any parameters to your application.