summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2021-05-19 11:43:23 +0200
committerAndy Shaw <andy.shaw@qt.io>2021-05-28 17:32:17 +0200
commit7724ec773a03d5956d952da70a2da599d3c056de (patch)
treebff97406938a4a633e78ae991ba634332139cedd
parentdc9ac506b72c98eb7ff788599ae062c36c214dd3 (diff)
Android: Reset m_usePrimaryClip when clearing the clip data
The variable needs to be set to false when we clear the clip data as there is no primary clip anymore so we should not try to access it when setting new data. Fixes: QTBUG-93831 Change-Id: I309270dc075fcb0457607561ee23e12f7eb6397f Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 96982bab0c5ff855100c1dcde23d090348be53db)
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtNative.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
index b31ed3577e..14e4357d63 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java
@@ -1023,6 +1023,7 @@ public class QtNative
{
if (Build.VERSION.SDK_INT >= 28 && m_clipboardManager != null)
m_clipboardManager.clearPrimaryClip();
+ m_usePrimaryClip = false;
}
private static void setClipboardText(String text)
{
@@ -1438,4 +1439,4 @@ public class QtNative
// service methods
public static native IBinder onBind(Intent intent);
// service methods
-} \ No newline at end of file
+}