From 5b5f4344daa4df023007cd59efdf8f36b00bb150 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Thu, 2 Nov 2023 21:34:12 +0200 Subject: [PATCH] Android: move referral global field to local variable in QtActivityBase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keep the variable where it belongs, it's not used anywhere else. Task-number: QTBUG-115017 Change-Id: Ia421eb0cd3f57be3601754f1df11e64f0267fa5d Reviewed-by: Tinja Paavoseppä --- .../jar/src/org/qtproject/qt/android/QtActivityBase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/android/jar/src/org/qtproject/qt/android/QtActivityBase.java b/src/android/jar/src/org/qtproject/qt/android/QtActivityBase.java index d68a838018..f9db1ff24a 100644 --- a/src/android/jar/src/org/qtproject/qt/android/QtActivityBase.java +++ b/src/android/jar/src/org/qtproject/qt/android/QtActivityBase.java @@ -51,11 +51,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) { - if (intent.getExtras() != null && intent.getExtras().getString(EXTRA_SOURCE_INFO) != null) + final String extraSourceInfoKey = "org.qtproject.qt.android.sourceInfo"; + + if (intent.getExtras() != null && intent.getExtras().getString(extraSourceInfoKey) != null) return; String browserApplicationId = ""; @@ -71,7 +71,7 @@ public class QtActivityBase extends Activity sourceInformation = referrer.toString().replaceFirst("android-app://", ""); } - intent.putExtra(EXTRA_SOURCE_INFO, sourceInformation); + intent.putExtra(extraSourceInfoKey, sourceInformation); } private void handleActivityRestart() {